Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 15 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,36 +57,24 @@ Environment variables (highest priority):

Default config file: `~/.config/notamify/config.json`

## Usage
## Qucik start

### Get active NOTAMs
```python
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)
from datetime import datetime, timedelta
from notamify_sdk import NotamifyClient, ActiveNotamsQuery

client = NotamifyClient(token="YOUR_API_KEY")

query = ActiveNotamsQuery(
location=["KJFK", "KLAX"],
starts_at=datetime.now(),
ends_at=datetime.now() + timedelta(days=1)
)
```

### Watcher flow
```
# Watcher sandbox flow
listener = client.create_listener(
"https://example.trycloudflare.com/webhooks/notamify",
Expand Down Expand Up @@ -140,8 +128,6 @@ 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/`.
Expand Down
Loading