aioNanoleaf2 package
This async Python wrapper for the Nanoleaf API replaces the unmaintained aionanoleaf package.
The library includes:
- Support for Nanoleaf Essentials devices.
- Support for Screen Mirroring emersion modes (1D, 2D, 3D, 4D).
- Support for IPv6 hosts and RFC 6874 zone IDs.
- Connection leak protection via async response context managers.
- Resilient Server-Sent Events (SSE) streaming and binary UDP touch parsing.
Installation
pip install aionanoleaf2
Example
from aiohttp import ClientSession
from asyncio import run
import aionanoleaf2
async def test():
async with ClientSession() as session:
nanoleaf = aionanoleaf2.Nanoleaf(session, "192.168.1.28")
try:
await nanoleaf.authorize()
except aionanoleaf2.Unauthorized as ex:
print("Not authorized:", ex)
return
await nanoleaf.turn_on()
await nanoleaf.get_info()
print("IT'S WORKING!")
print("Host:", nanoleaf.host)
print("Port:", nanoleaf.port)
print("Name:", nanoleaf.name)
print("Manufacturer:", nanoleaf.manufacturer)
print("Model:", nanoleaf.model)
print("Serial number:", nanoleaf.serial_no)
print("Hardware version:", nanoleaf.hardware_version)
print("Firmware version:", nanoleaf.firmware_version)
print("On:", nanoleaf.is_on)
print("Brightness:", f"{nanoleaf.brightness} [{nanoleaf.brightness_min} - {nanoleaf.brightness_max}]")
print("Hue:", f"{nanoleaf.hue} [{nanoleaf.hue_min} - {nanoleaf.hue_max}]")
print("Saturation:", f"{nanoleaf.saturation} [{nanoleaf.saturation_min} - {nanoleaf.saturation_max}]")
print("Color temperature:", f"{nanoleaf.color_temperature} [{nanoleaf.color_temperature_min} - {nanoleaf.color_temperature_max}]")
print("Color mode:", nanoleaf.color_mode)
print("Effects:", nanoleaf.effects_list)
print("Selected effect:", nanoleaf.selected_effect)
print("Emersions:", nanoleaf.emersion_list)
print("Selected emersion:", nanoleaf.selected_emersion)
print("Panels:", len(nanoleaf.panels))
await nanoleaf.identify()
await nanoleaf.turn_off()
await nanoleaf.deauthorize()
run(test())
Metadata
Release files for aionanoleaf2 1.1.0
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 | |
|---|---|---|---|---|
| aionanoleaf2-1.1.0.tar.gz | 27.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aionanoleaf2-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 57.5 kB
Release files / aionanoleaf2-1.1.0.tar.gz
| Download URL | aionanoleaf2-1.1.0.tar.gz |
|---|---|
| Size | 27.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
618457e62a6dd7a5f1d6e89a10e18873999f1f6d1982a0fd3ccb653a1b96f60d
|
|
BLAKE2b-256 checksum How to use checksums |
036547237057ba6d4fd17ebcfb097a9e70c58eeba3089964faeaedb32511436a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.0
|
Release files / aionanoleaf2-1.1.0-py3-none-any.whl
| Download URL | aionanoleaf2-1.1.0-py3-none-any.whl |
|---|---|
| Size | 30.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36f12084e1f8218f3e448abe9706b7f2c1a64db18c71ee4845f64a1c6bbf11f8
|
|
BLAKE2b-256 checksum How to use checksums |
7ba7a56ac2afba9f683dd574b0008badb3a4d0c6c51ffb1fd78e9c3223b5c9b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.0
|
Security for aionanoleaf2 1.1.0
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.