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.4.1.tar.gz (25.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.4.1-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pgns-0.4.1.tar.gz
  • Upload date:
  • Size: 25.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.4.1.tar.gz
Algorithm Hash digest
SHA256 2f737dff0a4cf807385115f76e507a88fb4ab5878f802c208fc7052036245033
MD5 557bcce0dfdab4b3759b926307dc0986
BLAKE2b-256 c3433bb515f3ae251f93dd664ea51b468363960c3b58f7fec5e88a49de2d04ba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pgns-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 20.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.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 78a65c108d3088fa5d6e70af4161f2b0fc55c130fd732559288bebec3189a184
MD5 f801bb0b7681fcb1e589e81c90ba6179
BLAKE2b-256 a886b360e8e0c88b6002d373b19cacc264da764ca61b7289a06cc13695477189

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