A Python package to communicate with the laundrify API
Project description
laundrify_aio
laundrify_aio
is a python package to communicate with the laundrify API.
It has primarily been developed for the Home Assistant integration.
Usage Example
import asyncio
from laundrify_aio import LaundrifyAPI
async def main():
# Generate a new AuthCode in the laundrify App (`Smart-Home Integration -> Home Assistant -> Integration aktivieren`)
auth_code = '123-456'
# exchange your auth code for a long-lived access token
access_token = await LaundrifyAPI.exchange_auth_code(auth_code)
# initialize a new client with the previously obtained access token
laundrify_client = LaundrifyAPI(access_token)
# get all machines
machines = await laundrify_client.get_machines()
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
Development/Build
To build and publish the package, run the following:
# Make a source distribution and a wheel
python3 setup.py sdist bdist_wheel
# Make sure the long description will render correctly
twine check dist/*
# (optional) upload to TestPyPI
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
# upload to PyPI
twine upload dist/*
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
laundrify_aio-1.1.0.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for laundrify_aio-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8ce65d0c3fee1e070a3d8f76f62d655e95464f52a53a5310d564456587595ab |
|
MD5 | 09c0b035cecbd36a2433fd94ef5bf7ea |
|
BLAKE2b-256 | 3d6d1722c35ff163e4176b97eed68c27856147517436f6fa9a63b9800c7bf8d9 |