--- id: postgrid-python version: "2.3.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # postgrid-python — The official Python library for the PostGrid API License: permissive · Maintenance: active · Downloads: 249.8K/mo ## 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 above — 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 pip install postgrid-python uv add postgrid-python poetry add postgrid-python ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 249.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags postgrid api client python, print mail api library, address verification python, async http client wrapper, rest api client generator, typed api bindings, postal service integration, rest-api-client, async-support, typed-bindings [View on SkillFed](https://skillfed.io/packages/postgrid-python) · [View on PyPI](https://pypi.org/project/postgrid-python/)