aioNanoleaf package
An async Python wrapper for the Nanoleaf API.
Installation
pip install aionanoleaf
Usage
Import
from aionanoleaf import Nanoleaf
Create a aiohttp.ClientSession to make requests
from aiohttp import ClientSession
session = ClientSession()
Create a Nanoleaf instance
from aionanoleaf import Nanoleaf
light = Nanoleaf(session, "192.168.0.100")
Example
from aiohttp import ClientSession
from asyncio import run
import aionanoleaf
async def main():
async with ClientSession() as session:
nanoleaf = aionanoleaf.Nanoleaf(session, "192.168.0.73")
try:
await nanoleaf.authorize()
except aionanoleaf.Unauthorized as ex:
print("Not authorizing new tokens:", ex)
return
await nanoleaf.turn_on()
await nanoleaf.get_info()
print("Brightness:", nanoleaf.brightness)
await nanoleaf.deauthorize()
run(main())
Metadata
Release files for aionanoleaf4d 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aionanoleaf4d-0.2.4.tar.gz | 24.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aionanoleaf4d-0.2.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.1 kB
Release files / aionanoleaf4d-0.2.4.tar.gz
| Download URL | aionanoleaf4d-0.2.4.tar.gz |
|---|---|
| Size | 24.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38c0c98a927a0ce051f9417c1642f3ad729b0fbfb43ec1673fc45a0ed8b8b2ae
|
|
BLAKE2b-256 checksum How to use checksums |
bc0d57aa44999ff7f8f62cd02132aa9a6ca4c2ef7d27985e747d7723fcf67b93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.0
|
Release files / aionanoleaf4d-0.2.4-py3-none-any.whl
| Download URL | aionanoleaf4d-0.2.4-py3-none-any.whl |
|---|---|
| Size | 28.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5f60576f9bed0efa44b98662c602291c3a5bb713ab1b9c86468078bbe6daf3b
|
|
BLAKE2b-256 checksum How to use checksums |
eedced1b79a08592990cca763eb9f32959ddc92c9b65364744419a086ed7e7af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.0
|