pyGuardPoint 2.0.0__tar.gz → 2.0.1__tar.gz
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.
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/PKG-INFO +3 -1
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_cardholders.py +15 -5
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_cardholders.py +14 -5
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/guardpoint_connection.py +9 -4
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint.egg-info/PKG-INFO +3 -1
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/setup.py +2 -1
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/LICENSE.txt +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/README.rst +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/CustomWebsocketTransport.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/CustomWebsocketTransportOld.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/__init__.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_accessgroups.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_alarmstates.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_alarmzones.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_areas.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_cardholdertypes.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_cards.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_controllers.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_customizedfields.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_departments.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_diagnostic.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_events.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_genericinformation.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_inputs.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_manualevents.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_ouputs.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_personaldetails.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_readers.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_scheduledmags.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_securitygroups.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_guardpoint_sites.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_odata_filter.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/_str_match_algo.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/__init__.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_accessgroups.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_alarmstates.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_alarmzones.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_areas.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_cardholdertypes.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_cards.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_controllers.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_customizedfields.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_departments.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_diagnostic.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_events.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_genericinformation.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_manualevents.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_ouputs.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_personaldetails.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_readers.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_scheduledmags.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_securitygroups.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_sites.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/guardpoint_connection_asyncio.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/guardpoint.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/guardpoint_asyncio.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/guardpoint_dataclasses.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/guardpoint_error.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/guardpoint_threaded.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/guardpoint_utils.py +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint.egg-info/SOURCES.txt +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint.egg-info/dependency_links.txt +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint.egg-info/not-zip-safe +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint.egg-info/requires.txt +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint.egg-info/top_level.txt +0 -0
- {pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/setup.cfg +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyGuardPoint
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.1
|
|
4
4
|
Summary: Python wrapper for GuardPoint 10 Access Control System
|
|
5
5
|
Author: John Owen
|
|
6
6
|
Maintainer-email: sales@sensoraccess.co.uk
|
|
7
|
+
License: Apache-2.0
|
|
7
8
|
Requires-Python: >3.9.0
|
|
8
9
|
Description-Content-Type: text/markdown
|
|
9
10
|
License-File: LICENSE.txt
|
|
@@ -16,6 +17,7 @@ Requires-Dist: python-Levenshtein
|
|
|
16
17
|
Dynamic: author
|
|
17
18
|
Dynamic: description
|
|
18
19
|
Dynamic: description-content-type
|
|
20
|
+
Dynamic: license
|
|
19
21
|
Dynamic: license-file
|
|
20
22
|
Dynamic: maintainer-email
|
|
21
23
|
Dynamic: requires-dist
|
|
@@ -280,8 +280,17 @@ class CardholdersAPI:
|
|
|
280
280
|
:raises ValueError: If neither `uid` nor `card_code` is provided.
|
|
281
281
|
"""
|
|
282
282
|
if card_code:
|
|
283
|
+
cards = self.get_cards(cardCode=card_code)
|
|
284
|
+
if len(cards) > 0:
|
|
285
|
+
if cards[0].cardholderUID is not None:
|
|
286
|
+
return self._get_card_holder(cards[0].cardholderUID)
|
|
287
|
+
else:
|
|
288
|
+
return None
|
|
289
|
+
else:
|
|
290
|
+
return None
|
|
283
291
|
# Part of the Cards_API
|
|
284
|
-
|
|
292
|
+
# (Broken API Call)
|
|
293
|
+
#return self.get_cardholder_by_card_code(card_code)
|
|
285
294
|
else:
|
|
286
295
|
return self._get_card_holder(uid)
|
|
287
296
|
|
|
@@ -336,10 +345,11 @@ class CardholdersAPI:
|
|
|
336
345
|
"securityGroup," \
|
|
337
346
|
"insideArea"
|
|
338
347
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
348
|
+
# Do not apply site filter, when looking for individuals
|
|
349
|
+
#if self.site_uid is not None:
|
|
350
|
+
# match_args = {'ownerSiteUID': self.site_uid}
|
|
351
|
+
# filter_str = _compose_filter(exact_match=match_args)
|
|
352
|
+
# url_query_params += ("&" + filter_str)
|
|
343
353
|
|
|
344
354
|
code, json_body = self.gp_json_query("GET", url=(url + url_query_params))
|
|
345
355
|
|
{pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_cardholders.py
RENAMED
|
@@ -194,8 +194,16 @@ class CardholdersAPI:
|
|
|
194
194
|
uid: str = None,
|
|
195
195
|
card_code: str = None):
|
|
196
196
|
if card_code:
|
|
197
|
+
cards = await self.get_cards(cardCode=card_code)
|
|
198
|
+
if len(cards) > 0:
|
|
199
|
+
if cards[0].cardholderUID is not None:
|
|
200
|
+
return await self._get_card_holder(cards[0].cardholderUID)
|
|
201
|
+
else:
|
|
202
|
+
return None
|
|
203
|
+
else:
|
|
204
|
+
return None
|
|
197
205
|
# Part of the Cards_API
|
|
198
|
-
return await self.get_cardholder_by_card_code(card_code)
|
|
206
|
+
# (Broken)return await self.get_cardholder_by_card_code(card_code)
|
|
199
207
|
else:
|
|
200
208
|
return await self._get_card_holder(uid)
|
|
201
209
|
|
|
@@ -237,10 +245,11 @@ class CardholdersAPI:
|
|
|
237
245
|
"securityGroup," \
|
|
238
246
|
"insideArea"
|
|
239
247
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
248
|
+
# Do not apply site filter, when looking for individuals
|
|
249
|
+
# if self.site_uid is not None:
|
|
250
|
+
# match_args = {'ownerSiteUID': self.site_uid}
|
|
251
|
+
# filter_str = _compose_filter(exact_match=match_args)
|
|
252
|
+
# url_query_params += ("&" + filter_str)
|
|
244
253
|
|
|
245
254
|
code, json_body = await self.gp_json_query("GET", url=(url + url_query_params))
|
|
246
255
|
|
|
@@ -208,10 +208,15 @@ class GuardPointConnection:
|
|
|
208
208
|
else:
|
|
209
209
|
raw_body = json.dumps(json_body)
|
|
210
210
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
211
|
+
if len(raw_body) == 0:
|
|
212
|
+
headers = headers or {
|
|
213
|
+
'Accept': 'application/json',
|
|
214
|
+
}
|
|
215
|
+
else:
|
|
216
|
+
headers = headers or {
|
|
217
|
+
'Content-Type': 'application/json',
|
|
218
|
+
'Accept': 'application/json'
|
|
219
|
+
}
|
|
215
220
|
|
|
216
221
|
if auth_str:
|
|
217
222
|
headers['Authorization'] = auth_str
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyGuardPoint
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.1
|
|
4
4
|
Summary: Python wrapper for GuardPoint 10 Access Control System
|
|
5
5
|
Author: John Owen
|
|
6
6
|
Maintainer-email: sales@sensoraccess.co.uk
|
|
7
|
+
License: Apache-2.0
|
|
7
8
|
Requires-Python: >3.9.0
|
|
8
9
|
Description-Content-Type: text/markdown
|
|
9
10
|
License-File: LICENSE.txt
|
|
@@ -16,6 +17,7 @@ Requires-Dist: python-Levenshtein
|
|
|
16
17
|
Dynamic: author
|
|
17
18
|
Dynamic: description
|
|
18
19
|
Dynamic: description-content-type
|
|
20
|
+
Dynamic: license
|
|
19
21
|
Dynamic: license-file
|
|
20
22
|
Dynamic: maintainer-email
|
|
21
23
|
Dynamic: requires-dist
|
|
@@ -5,7 +5,7 @@ long_description = open('README.rst').read()
|
|
|
5
5
|
setup(name="pyGuardPoint",
|
|
6
6
|
python_requires='>3.9.0',
|
|
7
7
|
packages=find_packages(),
|
|
8
|
-
version="2.0.
|
|
8
|
+
version="2.0.1",
|
|
9
9
|
author="John Owen",
|
|
10
10
|
description="Python wrapper for GuardPoint 10 Access Control System",
|
|
11
11
|
long_description_content_type='text/markdown',
|
|
@@ -13,5 +13,6 @@ setup(name="pyGuardPoint",
|
|
|
13
13
|
maintainer_email="sales@sensoraccess.co.uk",
|
|
14
14
|
install_requires=['validators', 'fuzzywuzzy', 'cryptography', 'pysignalr>=1.3.0', 'websockets', 'python-Levenshtein'],
|
|
15
15
|
#packages=['pyGuardPoint'],
|
|
16
|
+
license="Apache-2.0",
|
|
16
17
|
license_files=('LICENSE.txt',),
|
|
17
18
|
zip_safe=False)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_accessgroups.py
RENAMED
|
File without changes
|
{pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_alarmstates.py
RENAMED
|
File without changes
|
{pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_alarmzones.py
RENAMED
|
File without changes
|
{pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_areas.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_cards.py
RENAMED
|
File without changes
|
{pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_controllers.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_departments.py
RENAMED
|
File without changes
|
{pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_diagnostic.py
RENAMED
|
File without changes
|
{pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_events.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_manualevents.py
RENAMED
|
File without changes
|
{pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_ouputs.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_readers.py
RENAMED
|
File without changes
|
{pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_scheduledmags.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/_async_guardpoint_sites.py
RENAMED
|
File without changes
|
{pyguardpoint-2.0.0 → pyguardpoint-2.0.1}/pyGuardPoint/gp_asyncio/guardpoint_connection_asyncio.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|