GeneralManager 0.13.1__py3-none-any.whl → 0.14.1__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.
@@ -48,7 +48,9 @@ class MutationPermission:
48
48
  PermissionError: If the user does not have permission.
49
49
  """
50
50
  errors = []
51
- Permission = cls(data, BasePermission.getUserWithId(request_user))
51
+ if not isinstance(request_user, (AbstractUser, AnonymousUser)):
52
+ request_user = BasePermission.getUserWithId(request_user)
53
+ Permission = cls(data, request_user)
52
54
  for key in data:
53
55
  if not Permission.checkPermission(key):
54
56
  errors.append(
@@ -5,20 +5,20 @@ def args_to_kwargs(
5
5
  args: tuple[Any, ...], keys: Iterable[Any], existing_kwargs: dict | None = None
6
6
  ):
7
7
  """
8
- Wandelt *args in **kwargs um und kombiniert sie mit bestehenden **kwargs.
8
+ Converts *args into **kwargs and combines them with existing **kwargs.
9
9
 
10
- :param args: Tuple der positional arguments (z. B. *args).
11
- :param keys: Liste der Schlüssel, die den Argumenten zugeordnet werden.
12
- :param existing_kwargs: Optionales Dictionary mit bereits existierenden Schlüssel-Wert-Zuordnungen.
13
- :return: Dictionary mit kombinierten **kwargs.
10
+ :param args: Tuple of positional arguments (e.g., *args).
11
+ :param keys: List of keys to associate with the arguments.
12
+ :param existing_kwargs: Optional dictionary of already existing key-value mappings.
13
+ :return: Dictionary of combined **kwargs.
14
14
  """
15
15
  keys = list(keys)
16
16
  if len(args) > len(keys):
17
- raise ValueError("Mehr args als keys vorhanden.")
17
+ raise TypeError("More positional arguments than keys provided.")
18
18
 
19
19
  kwargs = {key: value for key, value in zip(keys, args)}
20
20
  if existing_kwargs and any(key in kwargs for key in existing_kwargs):
21
- raise ValueError("Konflikte in bestehenden kwargs.")
21
+ raise TypeError("Conflicts in existing kwargs.")
22
22
  if existing_kwargs:
23
23
  kwargs.update(existing_kwargs)
24
24
 
@@ -1,14 +1,40 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GeneralManager
3
- Version: 0.13.1
3
+ Version: 0.14.1
4
4
  Summary: Modular Django-based data management framework with ORM, GraphQL, fine-grained permissions, rule validation, calculations and caching.
5
5
  Author-email: Tim Kleindick <tkleindick@yahoo.de>
6
- License-Expression: MIT
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Tim Kleindick
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+ Classifier: License :: OSI Approved :: MIT License
28
+ Classifier: Programming Language :: Python :: 3
29
+ Classifier: Programming Language :: Python :: 3.12
30
+ Classifier: Framework :: Django
31
+ Classifier: Intended Audience :: Developers
32
+ Classifier: Operating System :: OS Independent
7
33
  Requires-Python: >=3.12
8
34
  Description-Content-Type: text/markdown
9
35
  License-File: LICENSE
10
36
  Requires-Dist: asgiref>=3.8.1
11
- Requires-Dist: Django>=5.2
37
+ Requires-Dist: Django>=5.2.7
12
38
  Requires-Dist: django-simple-history>=3.8.0
13
39
  Requires-Dist: exrex>=0.12.0
14
40
  Requires-Dist: factory_boy>=3.3.3
@@ -1,11 +1,11 @@
1
1
  general_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- general_manager/apps.py,sha256=ii-48klC2kBRjxtdQU9-RtPq66lZ8fDa7BmqyH-mbzk,9904
3
- general_manager/api/graphql.py,sha256=x-ky5UTQc-ZM_RB__swtwc95QXmv-q-OqgiMzY8EUM0,39652
4
- general_manager/api/mutation.py,sha256=9T892INzH4ip5sX3_BxB2WX145zt8S_0HGVPhGzyXZA,6736
5
- general_manager/api/property.py,sha256=oc93p1P8dcIvrNorRuqD1EJVsd6eYttYhZuAS0s28gs,696
2
+ general_manager/apps.py,sha256=9wmfr2jw9kzIx41fNByAUmte_67s3R_CEM90eX9jcao,10087
3
+ general_manager/api/graphql.py,sha256=tcQPiUBfTsBSf5iqllPhFE1nMhFof6ql9m3tfxwLEEY,43016
4
+ general_manager/api/mutation.py,sha256=ExUizC5EJ1u_CyXi-i8WTY0Qh3w4X6dr-0XUq_n1sgM,6978
5
+ general_manager/api/property.py,sha256=6tLW7E74S57K3vUv1xWhxAqn2L_3qi73VhTNs9YbnKw,3104
6
6
  general_manager/bucket/baseBucket.py,sha256=RdEaUhbCVPGI9l9B3l9lC9Ma2pGjQx6NL1rlCEIPXEc,8243
7
- general_manager/bucket/calculationBucket.py,sha256=AWXftX9X3N6lwRNwCnLfgxDDKOquwtSWpIan_OxYsOc,19359
8
- general_manager/bucket/databaseBucket.py,sha256=sA7EAwEQxCYqlwI1l1Z6n4mgG2pEwkzeRdOBzdlzmbo,9554
7
+ general_manager/bucket/calculationBucket.py,sha256=y8xIQLAIWPN6e7zO0__M2vP0ynOjrBLRrr2MzcVUBsc,24978
8
+ general_manager/bucket/databaseBucket.py,sha256=n9JaJm6qrd18Y7IGK6x700Z30qtw35VH7zOf1O6nvOs,15007
9
9
  general_manager/bucket/groupBucket.py,sha256=CoXQoHtXcNa_KLnvUOMG1j1TcCNeenlIMb-ORrK08LQ,11381
10
10
  general_manager/cache/cacheDecorator.py,sha256=XQvs322lDDafecS6osPKmf7DyuZgDq8kuQaYpMeXXYg,3264
11
11
  general_manager/cache/cacheTracker.py,sha256=rRw3OhBDf86hTC2Xbt1ocRgZqwu8_kXk4lczamcADFg,2955
@@ -17,7 +17,7 @@ general_manager/factory/autoFactory.py,sha256=Lf3E9qi3mggIGK6ww_JxdZbK5BzWPWIEMv
17
17
  general_manager/factory/factories.py,sha256=cJEV79SRHNNqtBXgE0ix5KOxdAkmPmq_8YlwJ_IJ_CM,8295
18
18
  general_manager/factory/factoryMethods.py,sha256=9Bag891j0XHe3dUBAFi7gUKcKeUwcBZN3cDLBobyBiI,3225
19
19
  general_manager/interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
- general_manager/interface/baseInterface.py,sha256=cFsDU-nhj_O6Gir3eO0ukGKNn9Pplhe6gEMccHNi4O0,8648
20
+ general_manager/interface/baseInterface.py,sha256=DPBIljlmoOQqsKBf0jy-nC9RlrHz98tBru-iaibaDFc,9562
21
21
  general_manager/interface/calculationInterface.py,sha256=fTD3WQpsn3ImaxGW5S-JwVJyJJPoPp2mR6lAambdB8U,4755
22
22
  general_manager/interface/databaseBasedInterface.py,sha256=uB4_kJ1kNSK-QnUrFKR0zrDP-UulBKeeHIslXqEdU4Q,23058
23
23
  general_manager/interface/databaseInterface.py,sha256=NHXOJycY40pywzE1d_5Fi-pLVnmLR4OQwhAIHsgkM_g,7249
@@ -35,7 +35,7 @@ general_manager/permission/__init__.py,sha256=5UlDERN60Vn8obGVkT-cOM8kHjzmoxgK5w
35
35
  general_manager/permission/basePermission.py,sha256=DeiAX2sQQhtdquO13jys2MSkp0kPdg2oo7PSqB9q5Bw,5653
36
36
  general_manager/permission/fileBasedPermission.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
37
  general_manager/permission/managerBasedPermission.py,sha256=CANZu5sU-GhzoFdR87aJ0rX0_rC4a38nqV76IpzIPQQ,7893
38
- general_manager/permission/mutationPermission.py,sha256=tYeunZQOJiUkQIqW0lU0KafwJKaTkrHTYKi7zV0wqHI,2972
38
+ general_manager/permission/mutationPermission.py,sha256=qaawnyuqmnGKOcgkZuaCKK6rawEiVRxLdZbWEZFM1d4,3084
39
39
  general_manager/permission/permissionChecks.py,sha256=s4XBQtfWK_6_AByVRFbEE3_UD4rXU_9y58L5oeSPXLM,1876
40
40
  general_manager/permission/permissionDataManager.py,sha256=EzF-XKJZKvKdNpF77ATYJ_VXSF09L-HTFe8h8p-JdB4,1784
41
41
  general_manager/permission/utils.py,sha256=_cznQLk-wmK35pqs3dtgY6I94Ahyz_bTSmpkT0-MQnI,1277
@@ -43,7 +43,7 @@ general_manager/rule/__init__.py,sha256=4Har5cfPD1fmOsilTDod-ZUz3Com-tkl58jz7yY4
43
43
  general_manager/rule/handler.py,sha256=z8SFHTIZ0LbLh3fV56Mud0V4_OvWkqJjlHvFqau7Qfk,7334
44
44
  general_manager/rule/rule.py,sha256=3FVCKGL7BTVoStdgOTdWQwuoVRIxAIAilV4VOzouDpc,10759
45
45
  general_manager/utils/__init__.py,sha256=4IwKJzsNxGduF-Ej0u1BNHVaMhkql8PjHbVtx9DOTSY,76
46
- general_manager/utils/argsToKwargs.py,sha256=kmp1xonpQp4X_y8ZJG6c5uOW7zQwo0HtPqsHWVzXRSM,921
46
+ general_manager/utils/argsToKwargs.py,sha256=l_yJCan6UhwKpTBpIwG3FvOKXt4pJeD6rZuYP47U9Ss,892
47
47
  general_manager/utils/filterParser.py,sha256=wmR4YzsnYgjI2Co5eyvCFROldotAraHx_GiCDJo79IY,5410
48
48
  general_manager/utils/formatString.py,sha256=gZSbsKvpywBmf5bIx6YW43LmNJcqsCP7ZfrB7YPvaFo,1436
49
49
  general_manager/utils/jsonEncoder.py,sha256=TDsgFQvheITHZgdmn-m8tk1_QCzpT0XwEHo7bY3Qe-M,638
@@ -51,8 +51,8 @@ general_manager/utils/makeCacheKey.py,sha256=UlFsxHXgsYy69AAelkF6GDvY4h7AImT2bBn
51
51
  general_manager/utils/noneToZero.py,sha256=KfQtMQnrT6vsYST0K7lv6pVujkDcK3XL8czHYOhgqKQ,539
52
52
  general_manager/utils/pathMapping.py,sha256=pswtxZbvj4MdDN6o-y1qTjl6XFHvjDTe-H3NZyFTrPQ,6926
53
53
  general_manager/utils/testing.py,sha256=ElZ8p4iZHxsHjDN8Lm5TmI6527CW747ltDOmtY6gAhk,11872
54
- generalmanager-0.13.1.dist-info/licenses/LICENSE,sha256=YGFm0ieb4KpkMRRt2qnWue6uFh0cUMtobwEBkHwajhc,1450
55
- generalmanager-0.13.1.dist-info/METADATA,sha256=7rjGL5VGqFeJm-aM61LOfM8vGzZBYrmqDHK91iqE20I,6206
56
- generalmanager-0.13.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
57
- generalmanager-0.13.1.dist-info/top_level.txt,sha256=sTDtExP9ga-YP3h3h42yivUY-A2Q23C2nw6LNKOho4I,16
58
- generalmanager-0.13.1.dist-info/RECORD,,
54
+ generalmanager-0.14.1.dist-info/licenses/LICENSE,sha256=OezwCA4X2-xXmRDvMaqHvHCeUmGtyCYjZ8F3XUxSGwc,1069
55
+ generalmanager-0.14.1.dist-info/METADATA,sha256=MeVaDd1vot7gn7RxNVtaCjNbj28aVeAwDHuWW7Ke5O0,7696
56
+ generalmanager-0.14.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
57
+ generalmanager-0.14.1.dist-info/top_level.txt,sha256=sTDtExP9ga-YP3h3h42yivUY-A2Q23C2nw6LNKOho4I,16
58
+ generalmanager-0.14.1.dist-info/RECORD,,
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Tim Kleindick
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,29 +0,0 @@
1
- Non-Commercial MIT License
2
-
3
- Copyright (c) 2025 Tim Kleindick
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the “Software”), to deal
7
- in the Software **solely for non-commercial purposes**, including without
8
- limitation the rights to use, copy, modify, merge, publish, distribute,
9
- sublicense, and/or sell copies of the Software **for non-commercial use only**,
10
- and to permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- 1. Non-Commercial Use Only
14
- The Software may **not** be used for commercial purposes. “Commercial” means
15
- any activity intended for or directed toward commercial advantage or
16
- monetary compensation.
17
-
18
- 2. Copyright Notice & License Text
19
- The above copyright notice and this permission notice shall be included in
20
- all copies or substantial portions of the Software.
21
-
22
- 3. Disclaimer of Warranty
23
- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
- FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. IN NO EVENT SHALL
26
- THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER
27
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
- SOFTWARE.