Skip to main content

Librería 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


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.6.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

OpenAccess-0.0.6-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file OpenAccess-0.0.6.tar.gz.

File metadata

  • Download URL: OpenAccess-0.0.6.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for OpenAccess-0.0.6.tar.gz
Algorithm Hash digest
SHA256 a65f0971d418a35ed2edef4553b4ab171869662a4562667e3d294c1351a5c431
MD5 446d399dd2d03644641473790ecc3b75
BLAKE2b-256 12fdf67f7cefda4df7b840a19f6cf94c42eac900374c3bf8b4311f819e13d3d9

See more details on using hashes here.

File details

Details for the file OpenAccess-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: OpenAccess-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for OpenAccess-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 137ee3323c4498dde5af1c4b798eac4d1f816b79c92cb1583465b1fa8dbd7b72
MD5 61f4e750e9fea234ebd81221dba2a790
BLAKE2b-256 c831b704a57d57af06912b778780ce21da01cfd311734e16add495c3abc9b3ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page