pyGuardPoint 2.0.2__tar.gz → 2.0.4__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.2 → pyguardpoint-2.0.4}/PKG-INFO +1 -1
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_cardholders.py +11 -8
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_customizedfields.py +1 -1
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_cardholders.py +12 -9
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/guardpoint.py +1 -1
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/guardpoint_asyncio.py +5 -5
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint.egg-info/PKG-INFO +1 -1
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/setup.py +1 -1
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/LICENSE.txt +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/README.rst +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/CustomWebsocketTransport.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/CustomWebsocketTransportOld.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/__init__.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_accessgroups.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_alarmstates.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_alarmzones.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_areas.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_cardholdertypes.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_cards.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_controllers.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_departments.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_diagnostic.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_events.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_genericinformation.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_inputs.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_manualevents.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_ouputs.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_personaldetails.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_readers.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_scheduledmags.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_securitygroups.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_guardpoint_sites.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_odata_filter.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/_str_match_algo.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/__init__.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_accessgroups.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_alarmstates.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_alarmzones.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_areas.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_cardholdertypes.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_cards.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_controllers.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_customizedfields.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_departments.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_diagnostic.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_events.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_genericinformation.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_manualevents.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_ouputs.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_personaldetails.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_readers.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_scheduledmags.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_securitygroups.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_sites.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/guardpoint_connection_asyncio.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/guardpoint_connection.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/guardpoint_dataclasses.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/guardpoint_error.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/guardpoint_threaded.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/guardpoint_utils.py +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint.egg-info/SOURCES.txt +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint.egg-info/dependency_links.txt +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint.egg-info/not-zip-safe +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint.egg-info/requires.txt +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint.egg-info/top_level.txt +0 -0
- {pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/setup.cfg +0 -0
|
@@ -231,19 +231,22 @@ class CardholdersAPI:
|
|
|
231
231
|
if code == 201: # HTTP CREATED
|
|
232
232
|
new_cardholder = Cardholder(json_body)
|
|
233
233
|
if cardholder.cardholderPersonalDetail:
|
|
234
|
-
|
|
234
|
+
if len(cardholder.cardholderPersonalDetail.changed_attributes) > 0:
|
|
235
|
+
self.update_personal_details(cardholder_uid=new_cardholder.uid,
|
|
235
236
|
personal_details=cardholder.cardholderPersonalDetail)
|
|
236
237
|
if cardholder.cardholderCustomizedField:
|
|
237
|
-
|
|
238
|
-
|
|
238
|
+
if len(cardholder.cardholderCustomizedField.changed_attributes) > 0:
|
|
239
|
+
self.update_custom_fields(cardholder_uid=new_cardholder.uid,
|
|
240
|
+
customFields=cardholder.cardholderCustomizedField)
|
|
239
241
|
if cardholder.cards:
|
|
240
242
|
if isinstance(cardholder.cards, list):
|
|
241
243
|
for card in cardholder.cards:
|
|
242
|
-
if
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
244
|
+
if len(card.changed_attributes) > 0:
|
|
245
|
+
if validators.uuid(card.uid):
|
|
246
|
+
self.update_card(card)
|
|
247
|
+
else:
|
|
248
|
+
card.cardholderUID = new_cardholder.uid
|
|
249
|
+
self.new_card(card)
|
|
247
250
|
|
|
248
251
|
return self._get_card_holder(new_cardholder.uid)
|
|
249
252
|
|
|
@@ -68,7 +68,7 @@ class CustomizedFieldsAPI:
|
|
|
68
68
|
if not validators.uuid(cardholder_uid):
|
|
69
69
|
raise ValueError(f'Malformed Cardholder UID {cardholder_uid}')
|
|
70
70
|
|
|
71
|
-
url = "/odata/
|
|
71
|
+
url = "/odata/API_CardholderCustomizedFields"
|
|
72
72
|
url_query_params = f"({cardholder_uid})"
|
|
73
73
|
|
|
74
74
|
headers = {
|
{pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_cardholders.py
RENAMED
|
@@ -160,19 +160,22 @@ class CardholdersAPI:
|
|
|
160
160
|
if code == 201: # HTTP CREATED
|
|
161
161
|
new_cardholder = Cardholder(json_body)
|
|
162
162
|
if cardholder.cardholderPersonalDetail:
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
if len(cardholder.cardholderPersonalDetail.changed_attributes) > 0:
|
|
164
|
+
await self.update_personal_details(cardholder_uid=new_cardholder.uid,
|
|
165
|
+
personal_details=cardholder.cardholderPersonalDetail)
|
|
165
166
|
if cardholder.cardholderCustomizedField:
|
|
166
|
-
|
|
167
|
-
|
|
167
|
+
if len(cardholder.cardholderCustomizedField.changed_attributes) > 0:
|
|
168
|
+
await self.update_custom_fields(cardholder_uid=new_cardholder.uid,
|
|
169
|
+
customFields=cardholder.cardholderCustomizedField)
|
|
168
170
|
if cardholder.cards:
|
|
169
171
|
if isinstance(cardholder.cards, list):
|
|
170
172
|
for card in cardholder.cards:
|
|
171
|
-
if
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
173
|
+
if len(card.changed_attributes) > 0:
|
|
174
|
+
if validators.uuid(card.uid):
|
|
175
|
+
await self.update_card(card)
|
|
176
|
+
else:
|
|
177
|
+
card.cardholderUID = new_cardholder.uid
|
|
178
|
+
await self.new_card(card)
|
|
176
179
|
|
|
177
180
|
return await self._get_card_holder(new_cardholder.uid)
|
|
178
181
|
|
|
@@ -44,7 +44,7 @@ def stop_listening(client: SignalRClient):
|
|
|
44
44
|
class GuardPoint(GuardPointConnection, CardsAPI, CardholdersAPI, AreasAPI, SecurityGroupsAPI, CustomizedFieldsAPI,
|
|
45
45
|
PersonalDetailsAPI, ScheduledMagsAPI, CardholderTypesAPI, OutputsAPI, DiagnosticAPI, ReadersAPI,
|
|
46
46
|
ControllersAPI, AlarmStatesAPI, EventsAPI, DepartmentsAPI, SitesAPI, AccessGroupsAPI, GenericInfoAPI,
|
|
47
|
-
AlarmZonesAPI, InputsAPI, ManualEventsAPI):
|
|
47
|
+
AlarmZonesAPI, InputsAPI, ManualEventsAPI, AccessGroupsAPI):
|
|
48
48
|
"""
|
|
49
49
|
A class to interface with the GuardPoint system, providing various APIs for managing cards, cardholders, areas,
|
|
50
50
|
security groups, customized fields, personal details, scheduled mags, cardholder types, outputs, diagnostics,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
import logging
|
|
3
3
|
import validators
|
|
4
|
-
|
|
5
|
-
from
|
|
6
|
-
from .CustomWebsocketTransport import CustomWebsocketTransport
|
|
4
|
+
|
|
5
|
+
from .gp_asyncio._async_guardpoint_accessgroups import AccessGroupsAPI
|
|
7
6
|
from .gp_asyncio._async_guardpoint_manualevents import ManualEventsAPI
|
|
8
7
|
from .gp_asyncio._async_guardpoint_alarmzones import AlarmZonesAPI
|
|
9
8
|
from .gp_asyncio._async_guardpoint_cardholdertypes import CardholderTypesAPI
|
|
@@ -34,7 +33,8 @@ log = logging.getLogger(__name__)
|
|
|
34
33
|
class GuardPointAsyncIO(GuardPointConnection, CardsAPI, CardholdersAPI, AreasAPI, SecurityGroupsAPI,
|
|
35
34
|
CustomizedFieldsAPI, PersonalDetailsAPI, ScheduledMagsAPI, CardholderTypesAPI,
|
|
36
35
|
OutputsAPI, DiagnosticAPI, ReadersAPI, ControllersAPI, AlarmStatesAPI, EventsAPI,
|
|
37
|
-
DepartmentsAPI, SitesAPI, GenericInfoAPI, AlarmZonesAPI, ManualEventsAPI
|
|
36
|
+
DepartmentsAPI, SitesAPI, GenericInfoAPI, AlarmZonesAPI, ManualEventsAPI,
|
|
37
|
+
AccessGroupsAPI):
|
|
38
38
|
"""
|
|
39
39
|
Asynchronous interface for interacting with the GuardPoint system, providing various APIs for managing cards,
|
|
40
40
|
cardholders, areas, security groups, customized fields, personal details, scheduled mags, cardholder types,
|
|
@@ -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.4",
|
|
9
9
|
author="John Owen",
|
|
10
10
|
description="Python wrapper for GuardPoint 10 Access Control System",
|
|
11
11
|
long_description_content_type='text/markdown',
|
|
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.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_accessgroups.py
RENAMED
|
File without changes
|
{pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_alarmstates.py
RENAMED
|
File without changes
|
{pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_alarmzones.py
RENAMED
|
File without changes
|
{pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_areas.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_cards.py
RENAMED
|
File without changes
|
{pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_controllers.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_departments.py
RENAMED
|
File without changes
|
{pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_diagnostic.py
RENAMED
|
File without changes
|
{pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_events.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_manualevents.py
RENAMED
|
File without changes
|
{pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_ouputs.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_readers.py
RENAMED
|
File without changes
|
{pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_scheduledmags.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/pyGuardPoint/gp_asyncio/_async_guardpoint_sites.py
RENAMED
|
File without changes
|
{pyguardpoint-2.0.2 → pyguardpoint-2.0.4}/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
|