pythonNotamify Python SDK

The Notamify Python SDK is an open-source (MIT) library that streamlines NOTAM data fetching, listener management, and real-time webhook handling for the Notamify API v2 and Watcher API.

The Notamify Python SDKarrow-up-right is an open-source, MIT-licensed Python client that wraps both the Notamify API v2 and the Notamify Watcher API into a single, typed interface. It is designed to streamline NOTAM data fetching, eliminate boilerplate HTTP code, and make the Watcher API accessible with just a few lines of Python.

Key highlights:

  • Single NotamifyClient for both NOTAM queries and Watcher listener management

  • Fully typed with Pydantic v2 models — autocomplete and validation out of the box

  • Auto-paginating iterators for NOTAM endpoints

  • Built-in webhook signature verification

  • Embedded webhook receiver for local development and testing

  • Cloudflare tunnel integration for exposing local endpoints

  • Zero external HTTP dependencies (uses only urllib.request)

  • Requires Python 3.10+

Installation

pip install notamify-sdk

Or with uvarrow-up-right:

uv add notamify-sdk

Authentication

The SDK supports multiple ways to provide your API token:

Fetching NOTAMs

The SDK provides typed query models for each endpoint and two ways to fetch data: single-page methods and auto-paginating iterators.

Active NOTAMs

Nearby NOTAMs

Raw NOTAMs

Raw NOTAMs are returned without AI interpretation — useful for prefetching before pulling interpretations:

Historical NOTAMs


Async Briefings

The SDK wraps the two-step async briefing workflow:


Watcher API: Real-Time NOTAM Monitoring

The Watcher API is the push-based counterpart to the query endpoints. Instead of polling for NOTAMs, you register listeners with filters, and Notamify delivers matching NOTAMs to your webhook URL in real time.

The SDK makes this entire workflow — creating listeners, receiving webhooks, verifying signatures — straightforward.

Managing Listeners

Listener Filters

Filters control which NOTAMs are delivered to your webhook. Filters use OR logic within a field and AND logic across fields:

Lifecycle Events

Enable lifecycle tracking to receive notifications when NOTAMs you've already been delivered are cancelled or replaced:

When a previously delivered NOTAM is replaced or cancelled, Watcher sends a lifecycle event with a change object pointing to the original NOTAM. Lifecycle events are free — they do not consume credits.

Sandbox Testing

Test your webhook integration without waiting for real NOTAMs:

Webhook Secret Management


Receiving Webhooks

The SDK includes two tools for handling incoming webhook deliveries: signature verification and an embedded receiver for local development.

Signature Verification

Every webhook request from Notamify includes an X-Notamify-Signature header. Use the SDK to verify it:

Parsing Webhook Events

Local Development with Cloudflare Tunnels

To receive webhooks on your local machine, the SDK integrates with cloudflared to create a public tunnel:

Note: Requires the cloudflared binary in your PATH. Install it from Cloudflare's downloads pagearrow-up-right.

Please also note that Cloudflared itself might require time to propagate.


Error Handling

The SDK raises typed exceptions for all error conditions:

Exception
When

APIError

Any non-2xx HTTP response or connection failure

SignatureVerificationError

Webhook signature mismatch, expired timestamp, or missing header

CloudflaredError

cloudflared binary missing, tunnel creation failure, or timeout

pydantic.ValidationError

Invalid query parameters (e.g., per_page > 30, page < 1)


Complete Example: Production Watcher Service

A minimal production service that listens for NOTAM events and processes them:

Resources

Last updated