Skip to main content

Python SDK for the Pilot notification relay API

Project description

Pilot Python SDK

pip install pilot-sdk

Usage

from pilot_sdk import Pilot

pilot = Pilot("pk_your_api_key")
pilot.send("prod_errors", "Deploy failed on server 3")

Error handling

from pilot_sdk import Pilot, AuthError, RateLimitError, PaymentRequiredError, PilotError

pilot = Pilot("pk_your_api_key")

try:
    pilot.send("prod_errors", "Deploy failed")
except AuthError:
    print("Invalid API key")
except RateLimitError:
    print("Slow down — max 20 msg/sec per destination")
except PaymentRequiredError:
    print("Trial limit reached or subscription cancelled")
except PilotError as e:
    print(f"Error {e.status_code}: {e}")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pilot_sdk-0.1.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pilot_sdk-0.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file pilot_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: pilot_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pilot_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a8020024d67e9fd683904ef5e920da2633672bd3b43fd6859fc9af077196fbd9
MD5 28a986ed6173c57b6d464d89633f2140
BLAKE2b-256 7d5574e451532b061976f4c6d7b865d233e78fc4bb35585928460af48439656f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pilot_sdk-0.1.0.tar.gz:

Publisher: publish.yml on nexomechanics/pilot-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pilot_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pilot_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pilot_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49f105c4d55fe444c2b131eab8b8edbc298c2355727821b5b37a83859749792c
MD5 43a031f990b18397f8a88bba7c261739
BLAKE2b-256 ec6eba94207c50780b6f4c69cd7703b4203e41452b1d76e2f4a094e8c6da1496

See more details on using hashes here.

Provenance

The following attestation bundles were made for pilot_sdk-0.1.0-py3-none-any.whl:

Publisher: publish.yml on nexomechanics/pilot-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page