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.2.0.tar.gz (2.3 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.2.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pilot_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 2.3 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.2.0.tar.gz
Algorithm Hash digest
SHA256 1cb109c8de8da95bb0bc5966fd5efbf87c5dc82b8031dc14f67e5e9eeed6f6ea
MD5 6de8e8f92e7314dce06c25039119c83c
BLAKE2b-256 8bfef2e41afa7c7059102f0e0174fbc14ddfc05b6d6abb6a2399e28cec0bb0c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pilot_sdk-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: pilot_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 2.9 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a93772d4c2988498d9ab5d6436efe3a415c63400cc3e8f4a072d9a1c5babb926
MD5 3dc4805b956cf024156dc4cefc6f7d7d
BLAKE2b-256 06b034fa070013348e88ff4e44b8c7ab37cb6e094aefb904d18737acced12124

See more details on using hashes here.

Provenance

The following attestation bundles were made for pilot_sdk-0.2.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