pysesame2
Python API for Sesame Smartlock made by CANDY HOUSE, Inc.
API KEY
You have to generate apikey using candyhouse dashboard: https://my.candyhouse.co/
Installation
Install from pypi
# pip install pysesame2
Install from source
# python setup.py install
Example
python
from pysesame2 import get_sesames
sesames = get_sesames(YOUR_APIKEY)
sesame = sesames[0]
print(sesame)
print(sesame.get_status())
sesame.lock()
from uuid import UUID
from time import sleep
from pyseame2 import Sesame
device_id = UUID('YOUR DEVICE UUID')
sesame = Sesame(device_id, YOUR_APIKEY)
print(sesame.get_status())
task = sesame.async_lock()
while task.pooling() is False:
print('Processing...')
sleep(1)
print('Result: %s' % task.is_successful)
Command Line Interface
# sesame2 --apikey YOUR_APIKEY list
Device ID Serial Nickame
======================================================================
00000000-0000-0000-0000-000000000001 000000000001 MY-SESAME-LOCK-1
00000000-0000-0000-0000-000000000002 000000000002 MY-SESAME-LOCK-2
# sesame2 --apikey YOUR_APIKEY lock 00000000-0000-0000-0000-000000000001
# sesame2 --apikey YOUR_APIKEY status 00000000-0000-0000-0000-000000000001
Locked: True
Battery: 100
Responsive: True
Use sesame2 --help get more options
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pysesame2-1.0.2.tar.gz
(3.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 pysesame2-1.0.2.tar.gz.
File metadata
- Download URL: pysesame2-1.0.2.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7632af9a661e3dda5c32df5b2a44322ac2804f98615cc3c9c02d0491f63cbd65
|
|
| MD5 |
631b888a3669068d462a8d9a11d2de7d
|
|
| BLAKE2b-256 |
a8fb35e2973a441560ba7e7c6e4f265b64df8c9df4d3a61c1c3624d9a46f7265
|
File details
Details for the file pysesame2-1.0.2-py3-none-any.whl.
File metadata
- Download URL: pysesame2-1.0.2-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f03ec7c59863fc566415e3b53ff8d559b4d2d97fe38bcd72eec34fe64be443a7
|
|
| MD5 |
d1234df5dcb170325fc9e98f786fe5af
|
|
| BLAKE2b-256 |
205fa0f04fe50e8a4abe75148b641459dfa8ad4aadb00d083b1ccd82af795b89
|