Skip to main content

Official Python SDK for the Pilot Status public API.

Project description

pilot-status (Python SDK)

SDK oficial em Python para consumir a API pública do Pilot Status.

Instalação

pip install pilot-status

Uso

Crie uma API key no painel e use somente no backend.

import os

from pilot_status import PilotStatusClient

client = PilotStatusClient(
    api_key=os.environ["PILOT_STATUS_API_KEY"],
)

accepted = client.messages.send(
    {
        "templateId": "onboarding-test",
        "destinationNumber": "+5511999999999",
        "variables": {"name": "João"},
    }
)

message = client.messages.get(accepted["id"])
print(message["status"])

Analytics

stats = client.analytics.get_dashboard_stats(tz="America/Sao_Paulo")
print(stats["totalSent"], stats["failureRate"])

Webhooks (parse/validação)

from pilot_status import parse_customer_webhook

def handler(payload: dict):
    event = parse_customer_webhook(payload)

    if event["event"] == "message.failed":
        print(event["data"]["errorMessage"])

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_status-0.1.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

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

pilot_status-0.1.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pilot_status-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c3ae8f6e97f1e3226641d743f927699a7e1b91bdb1ea3fd30910e8f0a54d26ba
MD5 3a0fe67f049c191aa4da250e75eb46dd
BLAKE2b-256 472c4f1fd95210dad80b28aaf00169ad798f9c3e9c9012cf49d03e77224ee774

See more details on using hashes here.

Provenance

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

Publisher: publish-pypi.yml on oismaelash/pilot-status-nextjs-typescript-frontend-backend

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_status-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for pilot_status-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a0961526557b35c6bf2a52b2825bfcd3192cfc9257d35a61f8db348495e096a4
MD5 b2c7fe4fdb5fe5c1a7b79408f4f76e60
BLAKE2b-256 53fd0d1d4999cb82cc20441fae0b870d16b890f0b5a5f0ce3f9a4f9f22c800fd

See more details on using hashes here.

Provenance

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

Publisher: publish-pypi.yml on oismaelash/pilot-status-nextjs-typescript-frontend-backend

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