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.6.0.tar.gz (30.9 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.6.0-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pgns-0.6.0.tar.gz
Algorithm Hash digest
SHA256 a09156af4e44341ccbbffa19a63c83442f5b95e1e9cc8196a21b0cb649a15a4c
MD5 eae3a2b42d8caf3a4e656a98a4b41745
BLAKE2b-256 851a18a4801626cbe2dc6ff87367399bf3b4b5ea2111cc800c4eb5b86f6cf44b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pgns-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 24.8 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.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33d5977d5cf5c04fe2a8ae2814234a5718d950f4c3f6d8bc40722bbece4694f0
MD5 e61be9f8cea256e5f3da2764803409c5
BLAKE2b-256 643c466f0624b44d45c6f3fce10587e46853412fe1ed4f40c38c39f2c281b4cc

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