Dependency-free Python client for the Perigee Developer API
Project description
Perigee Python SDK
The official, standard-library-only Python client for the Perigee Developer API. It supports Python 3.10+ and has no runtime dependencies.
Install
python -m pip install perigee
Quick start
Public station and tide-prediction calls do not require a key:
from perigee import PerigeeClient
perigee = PerigeeClient()
stations = perigee.list_stations(q="Port Aransas", state="TX", limit=5)
predictions = perigee.tide_predictions("8775237", hours=24, interval="hilo")
print(stations.data)
print(predictions.request_id)
Authenticated decision calls use a server-side environment variable:
import os
from perigee import PerigeeClient
perigee = PerigeeClient(api_key=os.environ["PERIGEE_API_KEY"])
result = perigee.best_window(
stationId="9414290",
activity="fishing",
candidates=[
{"localDate": "2026-07-10", "localTime": "06:00"},
{"localDate": "2026-07-10", "localTime": "12:00"},
],
)
print(result.data["decision"])
print(result.request_id, result.monthly_remaining)
Other decision recipes follow the API's camel-case request fields:
evaluation = perigee.evaluate_rules(
stationId="9414290",
activity="boating",
localDate="2026-07-10",
localTime="09:00",
rules=[
{
"id": "confidence",
"kind": "minimum_confidence",
"minimum": "moderate",
}
],
)
change = perigee.material_change(
stationId="9414290",
activity="boating",
localDate="2026-07-10",
localTime="09:00",
baseline={
"decisionId": "previous-decision-id",
"evaluatedAt": "2026-07-09T12:00:00.000Z",
"state": "normal",
"confidence": "high",
"reasonCodes": ["signal.tide"],
"sources": [
{
"id": "tide-prediction",
"freshness": "fresh",
"sourceAt": "2026-07-09T11:00:00.000Z",
}
],
},
)
Responses and errors
Every successful call returns PerigeeResponse with:
data: the decoded API responserequest_id: the value to include in a support requestrate_remaining: remaining short-window allowance, when presentmonthly_remaining: remaining monthly allowance, when presentquota_warning: a proactive quota warning, when present
from perigee import (
PerigeeApiError,
PerigeeProtocolError,
PerigeeTransportError,
)
try:
result = perigee.trip_health(
stationId="9414290",
activity="fishing",
localDate="2026-07-10",
localTime="07:00",
)
except PerigeeApiError as error:
print(error.status, error.code, error.request_id, error.retry_after_seconds)
except PerigeeTransportError as error:
print(f"No response after {error.attempts} attempts")
except PerigeeProtocolError as error:
print(error.status, error.request_id)
The client retries network failures, HTTP 429, and HTTP 5xx responses with
bounded exponential backoff. Retry-After is honored up to a ten-second
client-side cap. Authenticated cross-origin redirects are refused so an API
key cannot be forwarded to a different origin. Configure the limits when
constructing the client:
perigee = PerigeeClient(
api_key=os.environ["PERIGEE_API_KEY"],
timeout_seconds=10,
max_retries=2,
)
Do not embed an API key in browser code, a mobile binary, logs, or source control. Use the request ID rather than credentials or full authorization headers when asking for support.
See the OpenAPI document for the complete response schemas and the developer status page during an incident. Use the public help and support surface for questions or issue reports.
Release history
SDK releases follow semantic versioning and published registry versions are immutable. See the packaged changelog before upgrading.
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 perigee-1.0.1.tar.gz.
File metadata
- Download URL: perigee-1.0.1.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
513429fe2a69eefecaf6a18081cf2130fd425d6ad7b78e319465eece0a466dd8
|
|
| MD5 |
13b2a818bf919df88f58a53c3716000f
|
|
| BLAKE2b-256 |
c460cdb22dd28bb0071c047ef02c93c2e7ad9044faea6b501aafc0acf055413c
|
Provenance
The following attestation bundles were made for perigee-1.0.1.tar.gz:
Publisher:
sdk-release.yml on RyanCardin15/perigee
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
perigee-1.0.1.tar.gz -
Subject digest:
513429fe2a69eefecaf6a18081cf2130fd425d6ad7b78e319465eece0a466dd8 - Sigstore transparency entry: 2146377600
- Sigstore integration time:
-
Permalink:
RyanCardin15/perigee@47ea18c0277bd3cab0e384bf7d48da4780557d68 -
Branch / Tag:
refs/tags/sdk-v1.0.1 - Owner: https://github.com/RyanCardin15
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-release.yml@47ea18c0277bd3cab0e384bf7d48da4780557d68 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file perigee-1.0.1-py3-none-any.whl.
File metadata
- Download URL: perigee-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a97701ad7ecf12f07f5152b06d30496a61ec7e013308da2bc9ba687068fc457e
|
|
| MD5 |
0933b8caafa0b47820d866e6a085113d
|
|
| BLAKE2b-256 |
cd67dd8bbc3ea7785ae69b21d03017cd9e4395d638480dd40f5e1469050e1de5
|
Provenance
The following attestation bundles were made for perigee-1.0.1-py3-none-any.whl:
Publisher:
sdk-release.yml on RyanCardin15/perigee
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
perigee-1.0.1-py3-none-any.whl -
Subject digest:
a97701ad7ecf12f07f5152b06d30496a61ec7e013308da2bc9ba687068fc457e - Sigstore transparency entry: 2146377655
- Sigstore integration time:
-
Permalink:
RyanCardin15/perigee@47ea18c0277bd3cab0e384bf7d48da4780557d68 -
Branch / Tag:
refs/tags/sdk-v1.0.1 - Owner: https://github.com/RyanCardin15
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-release.yml@47ea18c0277bd3cab0e384bf7d48da4780557d68 -
Trigger Event:
workflow_dispatch
-
Statement type: