Skip to main content

Python SDK for the pgns webhook relay API

Project description

pgns Python SDK

Python client library for the pgns webhook relay API.

Installation

pip install pgns

Quick Start

from pgns.client import PgnsClient

client = PgnsClient(api_key="your-api-key")

# List roosts
roosts = client.roosts.list()

# Send a pigeon
client.pigeons.send("rst_abc123", payload={"event": "user.created", "data": {"id": 1}})

Async Usage

from pgns.async_client import AsyncPgnsClient

async with AsyncPgnsClient(api_key="your-api-key") as client:
    roosts = await client.roosts.list()

Submodule Imports

The SDK provides targeted submodule imports for better discoverability:

from pgns.client import PgnsClient
from pgns.async_client import AsyncPgnsClient
from pgns.models import Roost, Destination
from pgns.errors import PigeonsError, WebhookVerificationError
from pgns.webhook import Webhook
from pgns.events import event_stream, async_event_stream
from pgns.types import DestinationType, DeliveryStatus

Root-level imports (from pgns.sdk import PgnsClient) are deprecated and will be removed in a future release.

Documentation

Full documentation is available at docs.pgns.io/sdks/python.

License

MIT

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

pgns-0.5.0.tar.gz (30.7 kB view details)

Uploaded Source

Built Distribution

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

pgns-0.5.0-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file pgns-0.5.0.tar.gz.

File metadata

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

File hashes

Hashes for pgns-0.5.0.tar.gz
Algorithm Hash digest
SHA256 e7ffa39d0f9de50c0467b18a411b042a87fbbe220cb9c10e9cffd6ab0ca18947
MD5 fcbe93a7b2af26dd7094e57d5100edbf
BLAKE2b-256 4b02657dc45db9034f17cb9d8a18d5f684da5fba14c4545d979f98e0932aa947

See more details on using hashes here.

File details

Details for the file pgns-0.5.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for pgns-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9405f848e0378245ceb3259dd336ebd98c7904d1a7ab546d875f059b15445e8f
MD5 47879faba6a00778899b9722ee3eb27a
BLAKE2b-256 3d96f6f7269642088501444cfdc89e846f9875fa0d238bad21c5add19506be80

See more details on using hashes here.

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