postgrid-python
The official Python library for the PostGrid API
What it is and what it does
PostGrid Python is the official client library for accessing PostGrid's REST API from Python applications. It wraps the PostGrid print mail, address verification, and bulk verification services behind a typed, developer-friendly interface. The library provides both synchronous and asynchronous clients powered by httpx, with full type hints for request parameters and response objects using Pydantic models and TypedDicts.
The package is designed to handle common API patterns automatically: paginated list responses are wrapped in auto-iterating objects so you can loop through results without manually fetching pages, file uploads accept bytes or path-like objects, and errors are categorized into specific exception types (authentication, rate limit, connection, etc.) for granular error handling. It supports modern Python versions from 3.9 onward and includes optional aiohttp support for improved async concurrency.
Use it for:
- Integrate print mail services into a Python application to create and manage postal contacts and letters programmatically.
- Verify postal addresses in bulk or individually before sending physical mail to reduce delivery failures.
- Build async-first applications that need to batch address verification requests without blocking.
- Automate postal mail workflows with typed, IDE-assisted API calls and built-in pagination handling.
- Handle API errors gracefully with specific exception types for rate limits, authentication, and connection issues.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a typed Python client for the PostGrid REST API, supporting both synchronous and asynchronous access to print mail, address verification, and bulk verification services.
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and provides a well-typed interface to a specific service. Install it if you need to integrate PostGrid's print mail or address verification APIs into a Python application; skip it if you don't use PostGrid or prefer direct HTTP calls.
Install
postgrid-python on PyPI
pip
pip install postgrid-pythonuv
uv add postgrid-pythonpoetry
poetry add postgrid-pythonInstalling postgrid-python
Before you install
Low install friction with a pure-Python wheel and six common dependencies. Active maintenance with a recent release 60 days ago and current commit activity.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install postgrid-python
import os
from postgrid import PostGrid
client = PostGrid(print_mail_api_key=os.environ.get("POSTGRID_PRINT_MAIL_API_KEY"))
contact = client.print_mail.contacts.create(
address_line1="addressLine1",
country_code="countryCode",
first_name="firstName",
)
print(contact.id)
Requires Python 3.9 or later and a valid PostGrid API key set via environment variable or constructor argument.
Verify before relying
- Whether the library handles all PostGrid API endpoints or only a subset of the service.
- Performance characteristics of auto-pagination and whether it suits high-volume list operations.
- Specifics of retry behavior mentioned as '2 times' in the description excerpt.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — anyio, distro, httpx, pydantic, sniffio, typing-extensions |
| Maintenance | actively maintained — 60 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 249,796/month — #8,645 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: postgrid_python-2.3.0-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
composio-clientA Python client library for the Composio REST…
permissive · top 5,000 on PyPI
agentex-clientProvides a typed Python REST client for the…
permissive · top 15,000 on PyPI
cloudflareProvides a Python client library for the…
permissive · top 5,000 on PyPI
prelude-python-sdkProvides a typed Python client for the Prelude…
permissive · top 5,000 on PyPI
groqProvides a Python client library for accessing…
permissive · top 1,000 on PyPI
arcadepyProvides a typed Python client library for the…
permissive · top 15,000 on PyPI
orb-billingA Python client library for the Orb billing…
permissive · top 5,000 on PyPI
supermemoryProvides a Python client library for the…
permissive · top 15,000 on PyPI
opencode-aiProvides a Python client library for the…
permissive · top 15,000 on PyPI
parallel-webProvides a Python client library for the…
permissive · top 5,000 on PyPI