Skip to main content

Zero-dependency Python client for the Posthorn HTTP API

Project description

python-posthorn

Zero-dependency Python client for Posthorn's HTTP API.

Install locally

pip install -e ./python-posthorn

Basic usage

from python_posthorn import PosthornClient

client = PosthornClient(
    "http://localhost:8888",
    "your-api-key",
    default_path="/api/transactional",
)

response = client.send({"message": "hello"})
print(response)

Features

  • GET /healthz
  • GET /metrics
  • authenticated JSON send requests
  • Idempotency-Key support
  • typed 200 success and dry-run responses
  • typed 422 validation errors
  • explicit exception classes for 401, 409, 429, and 502

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

python_posthorn-0.2.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file python_posthorn-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for python_posthorn-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dd7273e57924f285fd6e9d708f82f5ccd728df747f0c5181aa3334e3b304b996
MD5 d1c424cf36d6772256aa21ce210424aa
BLAKE2b-256 13266369ae70e305af124ff88d4d38c17680f6c1f09080c502ef9c814e2c2e9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_posthorn-0.2.0-py3-none-any.whl:

Publisher: pypi-publish.yml on monperrus/python-posthorn

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