noonlight-dispatch
A small, typed, async Python client for the Noonlight
Dispatch API (/dispatch/v1). Built on httpx,
it accepts a shared client/session so it slots cleanly into apps like Home
Assistant.
It handles the Noonlight wire-format quirks for you: phone numbers are sent as
digits with a country code but no leading +, and US states as the uppercase
2-letter code.
Install
pip install noonlight-dispatch
Usage
import httpx
from noonlight_dispatch import NoonlightClient, SANDBOX_BASE_URL
async def main():
async with httpx.AsyncClient() as session:
client = NoonlightClient(session, "YOUR_TOKEN", base_url=SANDBOX_BASE_URL)
alarm = await client.create_alarm(
services=["police"],
name="Jane Doe",
phone="+1 (202) 555-0142", # stored/sent as 12025550142
address="123 Main St",
city="Springfield",
state="va", # sent as VA
zip_code="62704",
instructions="Triggered by Front Door motion", # -> instructions.entry
owner_id="Site A", # caller-defined site identifier
)
alarm_id = alarm["id"]
status = await client.get_alarm_status(alarm_id)
await client.cancel_alarm(alarm_id)
SANDBOX_BASE_URL never alerts real responders — use it for testing.
PRODUCTION_BASE_URL is the default.
Errors
All failures raise a subclass of NoonlightError:
NoonlightAuthError— token rejected (401/403)NoonlightConnectionError— unreachable / timeoutNoonlightResponseError— unexpected status or body (carries.status_code)
Development
pip install -e ".[test]"
pytest
License
MIT
Metadata
Release files for noonlight-dispatch 0.1.2
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 |
|---|---|---|---|---|
| noonlight_dispatch-0.1.2.tar.gz | 6.4 kB | Without provenance | Details for noonlight_dispatch-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| noonlight_dispatch-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for noonlight_dispatch-0.1.2-py3-none-any.whl |
Total release size: 12.5 kB
Release files / noonlight_dispatch-0.1.2.tar.gz
| Download URL | noonlight_dispatch-0.1.2.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22d6b3bd0fa8114245302999a7982c374795625418ea017205c295de5de0314c
|
|
BLAKE2b-256 checksum How to use checksums |
f487a546a742dd6d20987ee7de5355d5cd18d6a569bae576f834c0c3fe572904
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / noonlight_dispatch-0.1.2-py3-none-any.whl
| Download URL | noonlight_dispatch-0.1.2-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ba69414c403c38471a23af3e8cbb0ed08af10ceb052e0c8ac79c138719853bb0
|
|
BLAKE2b-256 checksum How to use checksums |
40fdc11d81905ddf5b54ba1ba53d0bf1a169e31f30fea2e0233dc39fd03090ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for noonlight-dispatch 0.1.2
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.