[go: up one dir, main page]

Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.
/ pyLatch Public archive

A simple and basic API wrapper for Latch written in Python

License

Notifications You must be signed in to change notification settings

rubegartor/pyLatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyLatch

https://img.shields.io/badge/Python-3.6%20%7C%203.7-blue.svg https://img.shields.io/badge/version-1.1.0-orange.svg https://img.shields.io/badge/API%20Version-v1.3-brightgreen.svg

A simple and basic API wrapper for Latch written in Python

Installation

# Windows
python -m pip install pyLatch
#Linux/OS X
python3 -m pip install pyLatch

Code Examples

Basic code:

import pyLatch
pyLatch.Latch('APPID', 'APPSECRET')

How to pair:

import pyLatch
latch = pyLatch.Latch('APPID', 'APPSECRET')
resp = latch.pair('pairCode')
# resp = {'data': {'accountId': 'accountID'}}

Obtaining status:

import pyLatch
latch = pyLatch.Latch('APPID', 'APPSECRET')
resp = latch.status('accountID')
# resp = {'data': {'operations': {'APP_ID': {'status': 'on'}}}}

Unpair account:

import pyLatch
latch = pyLatch.Latch('APPID', 'APPSECRET')
resp = latch.unpair('accountID')
# resp = {}

Use custom proxy:

import pyLatch
latch = pyLatch.Latch('APPID', 'APPSECRET')
latch.setProxy('PROXY_HOST', 'PROXY_PORT')

About

A simple and basic API wrapper for Latch written in Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages