Librería no oficial para leer comunicarse con un servidor de LENEL OpenAccess
Project description
Libreria para conectarse a LENEL OpenAccess
Ejemplo de uso:
app.py
from OpenAccess import *
from python-dotenv import dotenv_values
oa = OpenAccess()
config = dotenv_values(.env)
# Sign-In
result = oa.sign_in(config["USERNAME"], config["PASSWORD"], config["DIRECTORY"])
print(result)
print("Session_Token:", oa.session_token)
input("Press Enter to continue...")
# GetPanels
print("Get Panels")
panels = oa.retrieve_panels()
print (panels)
input("Get Readers... Press Enter to continue...")
# GerReaders PanelID = 9
readers = oa.retrieve_readers(9)
print(readers)
input("Get Cardholder where SSNO = xxxxx ... Press Enter to continue...")
# GetCardHolder Where SSNO = "80109842"
cardholder = oa.request_cardholder(autoload_badge=1, has_badges=1, cardholder_filter='SSNO="80109842"')
print(cardholder)
input("Get Cardholder where BadgeID = xxxxx ... Press Enter to continue...")
# GetCardHolder Where BadgeId = "1944"
cardholder = oa.request_cardholder(autoload_badge=1, has_badges=1, badges_filter='ID="1944"')
print(cardholder)
.env
USERNAME=<username>
PASSWORD=<password>
DIRECTORY=<directory>
API_URL=http://localhost:8080
DEFAULT_PAGE_SIZE=10
SUCCESS=success
ERROR=error
API_VERSION=1.0
APPLICATION_ID=OpenAccess_app_id
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
OpenAccess-0.0.8.tar.gz
(4.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file OpenAccess-0.0.8.tar.gz.
File metadata
- Download URL: OpenAccess-0.0.8.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
567308501788a63484107763d05cc41465c9780e36b36d94688551060037efe5
|
|
| MD5 |
a402bc48dbee7ffff8e98591a8040cd8
|
|
| BLAKE2b-256 |
cb9430427f4f8736550291c1c22be15ef11c1e3d5757e161aa6ea9f2a2ec1042
|
File details
Details for the file OpenAccess-0.0.8-py3-none-any.whl.
File metadata
- Download URL: OpenAccess-0.0.8-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6fc29621811e9445bd4a5789c0a8c008ad91f55c43c6ae65b16b74bb3a047ca
|
|
| MD5 |
1e4bc29dbd870a2b5fe6e7e4c842f842
|
|
| BLAKE2b-256 |
9d50cce7ea5d1589c9843d2f066cb8ec700add4d1d156bb45c493b8f97bb1940
|