Skip to main content

Python API for Sesame Smartlock made by CANDY HOUSE, Inc.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pysesame2, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size pysesame2-1.0.2-py3-none-any.whl (4.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size pysesame2-1.0.2.tar.gz (3.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page