agilicus 1.287.0__py3-none-any.whl → 1.287.3__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.
- agilicus/agilicus_api/api_client.py +1 -1
- agilicus/agilicus_api/configuration.py +1 -1
- agilicus/agilicus_api_README.md +1 -1
- agilicus/pagination/pagination.py +17 -6
- agilicus/pagination/pagination_test.py +18 -0
- {agilicus-1.287.0.dist-info → agilicus-1.287.3.dist-info}/METADATA +1 -1
- {agilicus-1.287.0.dist-info → agilicus-1.287.3.dist-info}/RECORD +10 -10
- {agilicus-1.287.0.dist-info → agilicus-1.287.3.dist-info}/LICENSE.txt +0 -0
- {agilicus-1.287.0.dist-info → agilicus-1.287.3.dist-info}/WHEEL +0 -0
- {agilicus-1.287.0.dist-info → agilicus-1.287.3.dist-info}/entry_points.txt +0 -0
@@ -77,7 +77,7 @@ class ApiClient(object):
|
|
77
77
|
self.default_headers[header_name] = header_value
|
78
78
|
self.cookie = cookie
|
79
79
|
# Set default User-Agent.
|
80
|
-
self.user_agent = 'OpenAPI-Generator/1.287.
|
80
|
+
self.user_agent = 'OpenAPI-Generator/1.287.3/python'
|
81
81
|
|
82
82
|
def __enter__(self):
|
83
83
|
return self
|
@@ -387,7 +387,7 @@ class Configuration(object):
|
|
387
387
|
"OS: {env}\n"\
|
388
388
|
"Python Version: {pyversion}\n"\
|
389
389
|
"Version of the API: 2025.04.17\n"\
|
390
|
-
"SDK Package Version: 1.287.
|
390
|
+
"SDK Package Version: 1.287.3".\
|
391
391
|
format(env=sys.platform, pyversion=sys.version)
|
392
392
|
|
393
393
|
def get_host_settings(self):
|
agilicus/agilicus_api_README.md
CHANGED
@@ -4,7 +4,7 @@ Agilicus is API-first. Modern software is controlled by other software, is open,
|
|
4
4
|
The `agilicus_api` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
5
5
|
|
6
6
|
- API version: 2025.04.17
|
7
|
-
- Package version: 1.287.
|
7
|
+
- Package version: 1.287.3
|
8
8
|
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
9
9
|
For more information, please visit [https://www.agilicus.com/api](https://www.agilicus.com/api)
|
10
10
|
|
@@ -3,6 +3,14 @@ import inspect
|
|
3
3
|
from typing import Callable
|
4
4
|
|
5
5
|
|
6
|
+
def _make_empty_callback(page_callback):
|
7
|
+
return lambda page: page_callback()
|
8
|
+
|
9
|
+
|
10
|
+
def _make_callback_with_page(page_callback):
|
11
|
+
return lambda page: page_callback(page)
|
12
|
+
|
13
|
+
|
6
14
|
def get_many_entries(
|
7
15
|
api_func: Callable,
|
8
16
|
response_list_key,
|
@@ -27,16 +35,19 @@ def get_many_entries(
|
|
27
35
|
kwargs[page_key] = ""
|
28
36
|
|
29
37
|
retval = []
|
38
|
+
page_callback_wrapper = None
|
39
|
+
if page_callback:
|
40
|
+
page_callback_wrapper = _make_empty_callback(page_callback)
|
41
|
+
|
42
|
+
args = inspect.getfullargspec(page_callback)
|
43
|
+
if "page" in args.args or "page" in args.kwonlyargs:
|
44
|
+
page_callback_wrapper = _make_callback_with_page(page_callback)
|
30
45
|
|
31
46
|
def apply_page(page):
|
32
47
|
retval.extend(page)
|
33
|
-
if not page_callback:
|
34
|
-
return
|
35
|
-
if len(inspect.getfullargspec(page_callback).args) > 0:
|
36
|
-
page_callback(page=page)
|
37
|
-
return
|
38
48
|
|
39
|
-
|
49
|
+
if page_callback_wrapper:
|
50
|
+
page_callback_wrapper(page)
|
40
51
|
|
41
52
|
list_resp = api_func(**kwargs)
|
42
53
|
page_items = list_resp.get(response_list_key) or []
|
@@ -91,3 +91,21 @@ def test_get_many_entries_invokes_callback_with_page():
|
|
91
91
|
assert [10, 8, 6, 4, 3, 2, 1, 0] == result
|
92
92
|
|
93
93
|
assert [[10, 8, 6], [4, 3, 2], [1, 0]] == calls
|
94
|
+
|
95
|
+
|
96
|
+
def test_get_many_entries_invokes_callback_args_but_not_page():
|
97
|
+
api = fakeAPI("items", "page_at_id")
|
98
|
+
api.add_page([10, 8, 6], 6)
|
99
|
+
api.add_page([4, 3, 2], 2)
|
100
|
+
api.add_page([1, 0], 0)
|
101
|
+
|
102
|
+
calls = []
|
103
|
+
|
104
|
+
def callback(other=None, arg=None):
|
105
|
+
calls.append(None)
|
106
|
+
|
107
|
+
result = get_many_entries(
|
108
|
+
api.do_list, api.item_key, page_size=3, page_callback=callback
|
109
|
+
)
|
110
|
+
assert [10, 8, 6, 4, 3, 2, 1, 0] == result
|
111
|
+
assert len(calls) == 3
|
@@ -71,9 +71,9 @@ agilicus/agilicus_api/api/users_api.py,sha256=vc1a6U7o4Pg_2A_FjPVIpiyRTIREZ58jpt
|
|
71
71
|
agilicus/agilicus_api/api/users_api_mock.py,sha256=aMSUc12JQAo1O9rp2YnyQldANFGlfi57fMnQyCIrJuE,17209
|
72
72
|
agilicus/agilicus_api/api/whoami_api.py,sha256=RNGWCYPit1iT7qrxDdOzyIKJkIdMuDryyKVmoxeg0qI,7941
|
73
73
|
agilicus/agilicus_api/api/whoami_api_mock.py,sha256=rlvZoWnMCqORMZBg7SOv6d3xp52kELdh6wXcCaIZ93w,346
|
74
|
-
agilicus/agilicus_api/api_client.py,sha256=
|
74
|
+
agilicus/agilicus_api/api_client.py,sha256=AR82JrtKvDbPzjbHXTjcc0FfgUcBPWEZQFyckdkoR1c,38845
|
75
75
|
agilicus/agilicus_api/apis/__init__.py,sha256=aJZD7x-umdSni6ZBr4XxzpH8pwtU9hA5LlCDxcqa1Q8,2224
|
76
|
-
agilicus/agilicus_api/configuration.py,sha256=
|
76
|
+
agilicus/agilicus_api/configuration.py,sha256=gwjOlpNACzl8hH8IR7SKWf_mXm3O9nuvM-1vg4W9-qY,18447
|
77
77
|
agilicus/agilicus_api/docs/APIKey.md,sha256=4cKuz4_l9HcEDnUrLwYbEnn9C2WoDayrjfrY1Ixgaf4,1747
|
78
78
|
agilicus/agilicus_api/docs/APIKeyIntrospect.md,sha256=nJ-zkuFm3JMbWFDYYN_vYyQk1snGBtBvIxtCQxamhAU,1019
|
79
79
|
agilicus/agilicus_api/docs/APIKeyIntrospectAuthorizationInfo.md,sha256=7RApOOLjvWQs5sw2jb25g7i3Kta1BiEY-s8VRXfppH8,725
|
@@ -2667,7 +2667,7 @@ agilicus/agilicus_api/test/test_x509_root_certificate.py,sha256=LV5_rQa2jhob7DzH
|
|
2667
2667
|
agilicus/agilicus_api/test/test_x509_root_certificate_spec.py,sha256=_csieI3dVbNe1oyoXCMPytlRUkatdg3rqVHNUASODf0,2832
|
2668
2668
|
agilicus/agilicus_api/test/test_x509_root_certificate_status.py,sha256=0vDt4PephnpGCV7pw8JSOcvJ9ifukwyE5zYlFFF-Z7c,2846
|
2669
2669
|
agilicus/agilicus_api/test/test_xss_settings.py,sha256=naM6PzbbiE5gF030lL5Ci5zfFcT-CVJzYZdMS9UNM8A,2746
|
2670
|
-
agilicus/agilicus_api_README.md,sha256=
|
2670
|
+
agilicus/agilicus_api_README.md,sha256=GWxaFdofRSoz1fl9StukP8a3WFgzQkAkJazN1R82HKo,171736
|
2671
2671
|
agilicus/aliases.ini,sha256=MxqiVo2f2xdUDVF1YDkNW36AIqN8hrYjlTVfraEUZXY,455
|
2672
2672
|
agilicus/amq.py,sha256=yxi-YTbJPVl10s78Hlr1dmrQR63iaSIoROGVILzFPmE,1775
|
2673
2673
|
agilicus/apps.py,sha256=Mdc_pRXyfa-IvIFH7gNbx0Ob64gUHggZyeSyLUDpjMs,54048
|
@@ -2736,8 +2736,8 @@ agilicus/output/table.py,sha256=o5kYgAtIAhei4ex7YZrTK9tDVarJQHzF2Yj42TXt21g,8744
|
|
2736
2736
|
agilicus/output/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2737
2737
|
agilicus/output/tests/column_builder_test.py,sha256=fKP4V5sqXtmEIr-Q0gWVSFdBqCUtugZkP6G5gML_T7I,2130
|
2738
2738
|
agilicus/pagination/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2739
|
-
agilicus/pagination/pagination.py,sha256=
|
2740
|
-
agilicus/pagination/pagination_test.py,sha256=
|
2739
|
+
agilicus/pagination/pagination.py,sha256=4DtFTRkk1HlF6dbjVaXFk3GgbAzDqhlXHRVs9hhOh9A,2339
|
2740
|
+
agilicus/pagination/pagination_test.py,sha256=6s4ARvxt8ku93Fjr4s_vmthT4z9RoXPGwTQRf3hEHLA,2874
|
2741
2741
|
agilicus/patches.py,sha256=qTqLOgCAcFZPcPOkgfqMnK9bnqTXMvj_0ERsjRFcZug,1384
|
2742
2742
|
agilicus/permissions.py,sha256=uB65yuDFICp1N10m0cdUjgizx9MQzAbLbAsBSTw1Rcc,2117
|
2743
2743
|
agilicus/policy/policies.py,sha256=eAy1iRlYKvkuc-10ssw_iuchY-I24LvtHiruvyzo5Pg,11440
|
@@ -2769,8 +2769,8 @@ agilicus/trusted_certs/trusted_certs_main.py,sha256=6dHHWXvNIcUa_nA9ptigL4Vibe4n
|
|
2769
2769
|
agilicus/users.py,sha256=bUFtVlTjUeEoQlzsQcfS8ChN0X9mbHs8v0xbkK-cldQ,41772
|
2770
2770
|
agilicus/version.py,sha256=G9OFdL1v_4dLDfk6I6taDNypM5bbO-JHAwilsu9LYgg,23
|
2771
2771
|
agilicus/whoami.py,sha256=kqghtWMgZOd2rhKmfguDwCTm6A3gNS8Kj-S2IBxBtl0,206
|
2772
|
-
agilicus-1.287.
|
2773
|
-
agilicus-1.287.
|
2774
|
-
agilicus-1.287.
|
2775
|
-
agilicus-1.287.
|
2776
|
-
agilicus-1.287.
|
2772
|
+
agilicus-1.287.3.dist-info/LICENSE.txt,sha256=Zq4tqiCroC2CVrBB_PWjapRdvpae23nljdiaSkOzUho,1061
|
2773
|
+
agilicus-1.287.3.dist-info/METADATA,sha256=ucRhEnUVsHCmKy5eP8O4UQ34Gch3efDx9ZQg7F_G6Zs,3878
|
2774
|
+
agilicus-1.287.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
2775
|
+
agilicus-1.287.3.dist-info/entry_points.txt,sha256=a66hGozzLkHu0IewFzIMbSAhMTNTddUaA2T3_16Gb_s,51
|
2776
|
+
agilicus-1.287.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|