tuya-api
tuya-api is a lib that make you easier to use tuya's api.
Install
pip install tuya-api
Example
import logging
import tornado.ioloop
import tornado.web
from tornado import gen
from tuya_api import Tuya
ty = Tuya(client_id='your client_id', secret='your secret', schema='you schema')
class TokenHandler(tornado.web.RequestHandler):
def data_received(self, chunk):
pass
@gen.coroutine
def get(self):
try:
ret = yield ty.get_access_token()
return self.write(ret)
except Exception as e:
logging.exception(e)
def main():
app = tornado.web.Application([
(r"/token", TokenHandler)
])
app.listen(8888)
print("=" * 100)
print("* Server: Success!")
print("* Host: http://localhost:8888")
print("* Quit the server with Control-C")
print("=" * 100)
tornado.ioloop.IOLoop.instance().start()
if __name__ == '__main__':
main()
Document
Author
Feiben(feiben.dev@gmail.com)
Metadata
Release files for tuya-api 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tuya_api-1.0.5.tar.gz | 5.8 kB | Without provenance | Details for tuya_api-1.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tuya_api-1.0.5-py3-none-any.whl | Python 3 | none | any | Details for tuya_api-1.0.5-py3-none-any.whl |
Total release size: 11.7 kB
Release files / tuya_api-1.0.5.tar.gz
| Download URL | tuya_api-1.0.5.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c595400d4ad7473f523605ec71234d2b087633092d84802a9f630297d370332
|
|
BLAKE2b-256 checksum How to use checksums |
e3c439b50437e1171882ab8a69f96ec2a7cbe4d48c4aa1759627782bcf493a3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2
|
Release files / tuya_api-1.0.5-py3-none-any.whl
| Download URL | tuya_api-1.0.5-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0e6f84e211f66699b1afbaf43bd0527ac9fea73e0382fbfb8a3fc7a3ae70234
|
|
BLAKE2b-256 checksum How to use checksums |
ed6d5c2868a5b135de5cc3100a9aec84b1b2060894074e0ac3b4225a783978fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2
|
Security for tuya-api 1.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.