panther 5.0.0b1__py3-none-any.whl → 5.0.0b2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- panther/__init__.py +1 -1
- panther/db/queries/mongodb_queries.py +6 -4
- panther/main.py +10 -0
- {panther-5.0.0b1.dist-info → panther-5.0.0b2.dist-info}/METADATA +1 -1
- {panther-5.0.0b1.dist-info → panther-5.0.0b2.dist-info}/RECORD +9 -9
- {panther-5.0.0b1.dist-info → panther-5.0.0b2.dist-info}/WHEEL +1 -1
- {panther-5.0.0b1.dist-info → panther-5.0.0b2.dist-info}/entry_points.txt +0 -0
- {panther-5.0.0b1.dist-info → panther-5.0.0b2.dist-info}/licenses/LICENSE +0 -0
- {panther-5.0.0b1.dist-info → panther-5.0.0b2.dist-info}/top_level.txt +0 -0
panther/__init__.py
CHANGED
@@ -6,7 +6,6 @@ from sys import version_info
|
|
6
6
|
from typing import get_args, get_origin, Iterable, Sequence, Any, Union
|
7
7
|
|
8
8
|
from pydantic import BaseModel, ValidationError
|
9
|
-
from pymongo.results import InsertOneResult, InsertManyResult
|
10
9
|
|
11
10
|
from panther.db.connections import db
|
12
11
|
from panther.db.cursor import Cursor
|
@@ -17,11 +16,14 @@ from panther.exceptions import DatabaseError
|
|
17
16
|
|
18
17
|
try:
|
19
18
|
from bson.codec_options import CodecOptions
|
19
|
+
from pymongo.results import InsertOneResult, InsertManyResult
|
20
20
|
except ImportError:
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
21
|
+
# MongoDB-related libraries are not required by default.
|
22
|
+
# If the user intends to use MongoDB, they must install the required dependencies explicitly.
|
23
|
+
# This will be enforced in `panther.db.connections.MongoDBConnection.init`.
|
24
24
|
CodecOptions = type('CodecOptions', (), {})
|
25
|
+
InsertOneResult = type('InsertOneResult', (), {})
|
26
|
+
InsertManyResult = type('InsertManyResult', (), {})
|
25
27
|
|
26
28
|
if version_info >= (3, 11):
|
27
29
|
from typing import Self
|
panther/main.py
CHANGED
@@ -26,6 +26,16 @@ logger = logging.getLogger('panther')
|
|
26
26
|
|
27
27
|
class Panther:
|
28
28
|
def __init__(self, name: str, configs: str | None = None, urls: dict | None = None):
|
29
|
+
"""
|
30
|
+
Initialize a Panther application instance.
|
31
|
+
|
32
|
+
Args:
|
33
|
+
name: Typically set to `__name__`; used to determine the current directory of the application.
|
34
|
+
configs: The name of the module containing your configuration.
|
35
|
+
If the configuration is defined in the current file, you can also set this to `__name__`.
|
36
|
+
urls: A dictionary containing your URL routing.
|
37
|
+
If not provided, Panther will attempt to load `URLs` from the configs module.
|
38
|
+
"""
|
29
39
|
self._configs_module_name = configs
|
30
40
|
self._urls = urls
|
31
41
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
panther/__init__.py,sha256=
|
1
|
+
panther/__init__.py,sha256=EN8vI-Orve2wCHyNc_rtgpC7s2UUCP2lWlN3nc3w3Oc,115
|
2
2
|
panther/_load_configs.py,sha256=1mMZeULMIgCxuPIXjNCdMPpqpjBm_rf4IgiD7Zk5MWs,10964
|
3
3
|
panther/_utils.py,sha256=nJK4QdTB9SmcVoRKy3hRvcdvceVGlBQ-MQG38j1BLc8,4130
|
4
4
|
panther/app.py,sha256=x8UsN3Ct2LfnvyXHkX_yIimBV73W19sL5xxF3RSRaMw,11074
|
@@ -13,7 +13,7 @@ panther/exceptions.py,sha256=UEwpIIG57zNEm2CouU5Bi_mSUWYNEXi2FKqhjhMc4js,2288
|
|
13
13
|
panther/file_handler.py,sha256=I94tpbtTVniBnnUMkFr3Eis6kPDt8sLzS5u8TzFrR5I,1323
|
14
14
|
panther/generics.py,sha256=NVq43L8rz1jtMYD66O3p0DR295fiiongjq8bPIqBLeE,7261
|
15
15
|
panther/logging.py,sha256=SGgF9faQM1QmbmMPVc6m1DY-TbV329kTD8BuzGLx3I0,2073
|
16
|
-
panther/main.py,sha256=
|
16
|
+
panther/main.py,sha256=aEDGWjOe2rABEYyEkPGKLt4m45lJM6hEOGKYCiEHxk8,7599
|
17
17
|
panther/monitoring.py,sha256=C0tYBKGci6QR33CN-MixMzCP24ka0a6V0AU2H1sS4HU,1026
|
18
18
|
panther/pagination.py,sha256=VvvNsMObIarjUx9F8T91TX-9A2Ymy18Ms_hB60lZdEA,1641
|
19
19
|
panther/permissions.py,sha256=9-J5vzvEKa_PITwEVQbZZv8PG2FOu05YBlD5yMrKcfc,348
|
@@ -40,7 +40,7 @@ panther/db/models.py,sha256=gmqWjqbDE6DggTmUnqAipi9l0JfmDgiXttr9qCKK208,2793
|
|
40
40
|
panther/db/utils.py,sha256=ZZa3TMkuRtssl5ZRItFLonyxvMFsTq4fmTD4BblhLDA,1589
|
41
41
|
panther/db/queries/__init__.py,sha256=uF4gvBjLBJ-Yl3WLqoZEVNtHCVhFRKW3_Vi44pJxDNI,45
|
42
42
|
panther/db/queries/base_queries.py,sha256=GG3F9qFrIl6ibzvbjfDonztJvkUbjzPYHo8PNcdcj-0,3775
|
43
|
-
panther/db/queries/mongodb_queries.py,sha256=
|
43
|
+
panther/db/queries/mongodb_queries.py,sha256=QCP1ibnd-x8js8XIC4nhgdfiJAj1606CkpSQ_-j2y8Y,13394
|
44
44
|
panther/db/queries/pantherdb_queries.py,sha256=h6LNsEk7srJw-dpqTl46ZSAO5BLFGVymQ4JnU75B4zM,4611
|
45
45
|
panther/db/queries/queries.py,sha256=sTa0m9q8tf2ugbFDmj4GRfRQOyNFmSBFfDqIVcRjKIM,12433
|
46
46
|
panther/middlewares/__init__.py,sha256=8VXd-K3L0a5ZkGb-NUipn3K8wxWAVIiOM7fQrcm_dTM,87
|
@@ -67,9 +67,9 @@ panther/panel/templates/login.html,sha256=W6V1rgHAno7yTbP6Il38ZvJp4LdlJ8BjM4UuyP
|
|
67
67
|
panther/panel/templates/sidebar.html,sha256=XikovZsJrth0nvKogvZoh3Eb2Bq7xdeGTlsdlyud450,618
|
68
68
|
panther/panel/templates/table.html,sha256=fWdaIHEHAuwuPaAfOtXkD-3yvSocyDmtys00_D2yRh8,2176
|
69
69
|
panther/panel/templates/table.js,sha256=MTdf77571Gtmg4l8HkY-5fM-utIL3lc0O8hv6vLBCYk,10414
|
70
|
-
panther-5.0.
|
71
|
-
panther-5.0.
|
72
|
-
panther-5.0.
|
73
|
-
panther-5.0.
|
74
|
-
panther-5.0.
|
75
|
-
panther-5.0.
|
70
|
+
panther-5.0.0b2.dist-info/licenses/LICENSE,sha256=2aF1hL2aC0zRPjzUkSxJUzZbn2_uLoOkn7DHjzZni-I,1524
|
71
|
+
panther-5.0.0b2.dist-info/METADATA,sha256=2vCEzF7CRa35QMey3KB_c1tV5edvWU3oOwq2sa6b3hw,7026
|
72
|
+
panther-5.0.0b2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
73
|
+
panther-5.0.0b2.dist-info/entry_points.txt,sha256=6GPxYFGuzVfNB4YpHFJvYex6iWah5_tLnirAHwj2Qsg,51
|
74
|
+
panther-5.0.0b2.dist-info/top_level.txt,sha256=VbBs02JGXTIoHMzsX-eLOk2MCbBZzQbLhWiYpI7xI2g,8
|
75
|
+
panther-5.0.0b2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|