Python SDK for Notamify APIs
Project description
notamify-sdk (Python)
Python SDK for Notamify public APIs:
- Notamify API v2 (
https://api.notamify.com/api/v2) - Watcher API (
https://watcher.notamify.com)
Features
- Typed API client with one auth token
- Pydantic response/request models
- Pager-style NOTAM listing via
client.notams.*with item iteration andpager.pages - Supported NOTAM endpoints:
GET /notamsGET /notams/rawGET /notams/nearbyGET /notams/archivePOST /notams/briefingGET /notams/briefing/{uuid}POST /notams/prioritisation
- Watcher listener management + webhook logs/secrets
- Listener
modesupport (proddefault,sandboxfor test-only listeners) - Listener lifecycle support via
lifecycle.enabledandlifecycle.types - Sandbox test delivery endpoint (
POST /listeners/{id}/sandbox:send) - Webhook signature verification (
X-Notamify-Signature) - Typed webhook event models for
interpretationandlifecyclepayloads - Embedded receiver + cloudflared helper for local webhook testing
- Strict receiver mode fails fast when webhook secret is missing
Install
pip install notamify-sdk
Or with uv:
uv add notamify-sdk
For contributors working from a source checkout:
uv sync
Configuration
Environment variables (highest priority):
NOTAMIFY_TOKENNOTAMIFY_API_BASE_URLNOTAMIFY_WATCHER_BASE_URLNOTAMIFY_WEBHOOK_SECRETNOTAMIFY_CONFIG_FILE
Default config file: ~/.config/notamify/config.json
Usage
from notamify_sdk import NotamifyClient
client = NotamifyClient(token="YOUR_TOKEN")
# The API accepts at most 30 items per page.
active_notams = list(client.notams.active({
"location": ["KJFK", "KLAX"],
"per_page": 30,
}))
print(len(active_notams))
first_page = next(iter(client.notams.active({
"location": ["KJFK", "KLAX"],
"per_page": 30,
}).pages))
print(first_page.total_count)
job = client.create_async_briefing({
"locations": [{
"location": "KJFK",
"type": "origin",
"starts_at": "2026-02-25T10:00:00Z",
"ends_at": "2026-02-25T12:00:00Z",
}],
})
print(job.uuid)
# Watcher sandbox flow
listener = client.create_listener(
"https://example.trycloudflare.com/webhooks/notamify",
mode="sandbox",
lifecycle={"enabled": False},
)
print(listener.webhook_secret)
sandbox_result = client.send_sandbox_message(listener.id, "SANDBOX-NOTAM-1")
print(sandbox_result.notam_id)
Pagination
The SDK exposes two NOTAM access styles:
client.get_active_notams(...),client.get_raw_notams(...),client.get_nearby_notams(...), andclient.get_historical_notams(...)return a singleNotamListResultpage.client.notams.active(...),client.notams.raw(...),client.notams.nearby(...), andclient.notams.historical(...)return a pager that fetches all pages lazily as you iterate.
Use the pager when you want all NOTAMs across pages:
pager = client.notams.active(
{"location": ["KJFK", "KLAX"]},
per_page=30,
)
for notam in pager:
print(notam.id)
If you want everything in memory at once, materialize the pager with list(...):
all_notams = list(
client.notams.active(
{"location": ["KJFK", "KLAX"]},
per_page=30,
)
)
If you need page metadata such as page, per_page, or total_count, iterate over pager.pages:
pager = client.notams.active(
{"location": ["KJFK", "KLAX"]},
per_page=30,
)
for page in pager.pages:
print(page.page, page.total_count, len(page.notams))
The API allows at most 30 items per page. The SDK validates this with Pydantic and rejects larger per_page values.
Local Webhook Testing
The example scripts live in the repository and source distribution under examples/.
They are intended to be run from a source checkout or source distribution, not from an installed wheel alone.
- Production: implement the webhook endpoint in your own application code.
- Verify
X-Notamify-SignatureusingNOTAMIFY_WEBHOOK_SECRET. - Production watcher deliveries include
kind,event_id, andnotam. - Lifecycle watcher deliveries also include
change.changed_notam_idfor the original NOTAM that was cancelled or replaced. - Local development: expose your local app endpoint with
cloudflared, then set watcherwebhook_urlto that tunnel URL. - Sandbox test sends use the same webhook payload DTO as production sends, with mock NOTAM content.
Prerequisite: cloudflared must be installed and available in PATH.
export NOTAMIFY_TOKEN="your_notamify_token"
export LOCAL_APP_URL="http://127.0.0.1:8080/webhooks/notamify"
uv run python ./examples/local_service_run.py
Examples
examples/service_receiver.py: minimal production-style webhook receiverexamples/local_service_run.py: cloudflared tunnel + sandbox delivery flowexamples/notams_fetch.py: straightforward NOTAM query examplesexamples/README.md: setup notes and sample payloads
Development
uv run python -m unittest discover -s tests -p 'test_*.py'
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file notamify_sdk-0.2.0.tar.gz.
File metadata
- Download URL: notamify_sdk-0.2.0.tar.gz
- Upload date:
- Size: 31.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abeadf060d01b0aaf5a503bed2586d1036ddb83d52e28dca5dc10f228695c754
|
|
| MD5 |
dc2e29f1328c78cab3ef2a9547b8ddab
|
|
| BLAKE2b-256 |
b180760b33fec325dde301e11ba8e6477f3362ffd97fe94e78a398b89b3e79b0
|
Provenance
The following attestation bundles were made for notamify_sdk-0.2.0.tar.gz:
Publisher:
release.yml on skymerse/notamify-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
notamify_sdk-0.2.0.tar.gz -
Subject digest:
abeadf060d01b0aaf5a503bed2586d1036ddb83d52e28dca5dc10f228695c754 - Sigstore transparency entry: 1359261533
- Sigstore integration time:
-
Permalink:
skymerse/notamify-sdk-python@3e07941e86e2737f6121619010eecfa0c841ade5 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/skymerse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3e07941e86e2737f6121619010eecfa0c841ade5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file notamify_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: notamify_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08373af7693d8749b1d67e7be81eab13553ac5d8a33a96ac592bdcd221aa0dde
|
|
| MD5 |
729deb08d791a3271db5947366436ade
|
|
| BLAKE2b-256 |
818fde2d643bb520ff93654c0217608f3e3e9001b4af550b334a11c52c67d259
|
Provenance
The following attestation bundles were made for notamify_sdk-0.2.0-py3-none-any.whl:
Publisher:
release.yml on skymerse/notamify-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
notamify_sdk-0.2.0-py3-none-any.whl -
Subject digest:
08373af7693d8749b1d67e7be81eab13553ac5d8a33a96ac592bdcd221aa0dde - Sigstore transparency entry: 1359261544
- Sigstore integration time:
-
Permalink:
skymerse/notamify-sdk-python@3e07941e86e2737f6121619010eecfa0c841ade5 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/skymerse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3e07941e86e2737f6121619010eecfa0c841ade5 -
Trigger Event:
push
-
Statement type: