Skip to content

Instantly share code, notes, and snippets.

@dknowles2
Last active March 20, 2023 20:58
Show Gist options
  • Save dknowles2/3eebe440eeee490770cbfc0365272500 to your computer and use it in GitHub Desktop.
Save dknowles2/3eebe440eeee490770cbfc0365272500 to your computer and use it in GitHub Desktop.
Pyschlage Access Code Debug
#!/usr/bin/python3
from getpass import getpass
import pyschlage
from pyschlage.code import AccessCode
username = input("Schlage username: ")
password = getpass()
auth = pyschlage.Auth(username, password)
api = pyschlage.Schlage(auth)
locks = api.locks()
for lock in locks:
resp = auth.request("get", AccessCode.request_path(lock.device_id)).json()
if not isinstance(resp, dict):
print(resp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment