Packages
PGI provides pure Python bindings to GObject Introspection using ctypes and cffi, allowing access to GObject-based libraries from Python without compiled extensions.
No, not recommended for production use.
Parses PostgreSQL SQL statements into an abstract syntax tree and provides tools to inspect and prettify the parsed structure.
pgmpy provides data structures and algorithms for causal discovery, causal inference, probabilistic inference, parameter learning, and model validation across Bayesian networks, DAGs, and structural equation models.
Encodes PyArrow RecordBatches into PostgreSQL's native binary format for efficient bulk loading via COPY.
PGPy implements OpenPGP (RFC 4880) in pure Python, enabling you to load, create, and verify RSA, DSA, and ECDSA signatures, and encrypt/decrypt messages using RSA and ECDH.
PGPy13 is a Python library for OpenPGP encryption, decryption, and digital signature operations conforming to RFC 4880, with support for RSA, DSA, and ECDSA signatures and RSA/ECDH encryption.
However, be aware this is a temporary fork with minimal ongoing support—the maintainer will not accept pull requests or bug reports.
PgQueuer turns PostgreSQL into a background job queue, letting you enqueue, schedule, and process jobs transactionally within your existing database instead of running a separate message broker.
PgSanity validates PostgreSQL SQL syntax by wrapping the ecpg parser, reporting syntax errors with line numbers and exit codes suitable for CI/CD and pre-commit hooks.
Embeds a PostgreSQL server with pgvector extension into your Python application as pip-installable binaries, eliminating the need for users to install or manage PostgreSQL separately.
Executes PostgreSQL meta-commands (backslash commands) programmatically through a Python API, enabling applications to run special commands on a database connection.
Provides Python bindings for PGVecto.rs, a PostgreSQL vector database extension, with support for multiple vector types and integration with SQLAlchemy, Psycopg3, and Django.
Install only if you can tolerate stalled upstream development and verify compatibility with your PostgreSQL and PGVecto.rs versions independently.
Adds vector storage and similarity search support to PostgreSQL through Python ORMs and database drivers, enabling semantic search and embeddings workflows.
Install it if you need vector search in PostgreSQL from Python—it's the standard bridge between pgvector and popular ORMs.
pgzip is a multi-threaded gzip implementation that accelerates compression and decompression by parallelizing block-indexed gzip operations, maintaining compatibility with standard gzip files.
Phantom types enable you to create type-safe wrappers around base types (like strings or integers) with runtime predicates, allowing static type checkers and runtime validators to enforce constraints without shotgun parsing.
Install it if your codebase values type safety and parse-don't-validate patterns.
A Python client library for the Phaxio API that lets you send faxes, manage phone numbers, and interact with Phaxio's fax service programmatically.
Install only if you are already locked into Phaxio and can independently verify that the API surface matches your needs and that the package runs on your Python version.
Phidata is a framework for building multi-modal agents that can use tools, maintain memory, and reason to accomplish tasks—either individually or as coordinated teams.
However, the dormant maintenance status (564 days since last release) means you should verify compatibility with your Python version and dependencies before…
Phidget22 is the official Python library for communicating with Phidget hardware devices, providing lightweight bindings to the native phidget22 library for sensor and controller interfacing.
The main gotcha is platform-specific setup for certain hardware types on macOS, which is documented.
Phi_K computes a correlation coefficient that works consistently across categorical, ordinal, and interval variables, capturing non-linear dependencies while reverting to Pearson correlation for bivariate normal data.
However, the aging maintenance status (no release in 393 days) suggests checking whether active development continues before relying on it for production systems.
Generates Phoebus Display Builder XML format programmatically from Python, allowing you to create control system UI screens as code rather than through the graphical editor.
Install it if screen-as-code fits your workflow; skip it if you only occasionally edit screens in the GUI.
Maps international phone numbers and mobile network codes to ISO 3166-1 alpha-2 country codes, with optional lookup of network operator names.
Phonemizer converts written text into phonetic representations (IPA, SAMPA, or custom phoneme sets) across many languages using pluggable backends like espeak, festival, and segments.
The main gotcha is that you must install one of the external backends separately, but that is by design and well-documented.
Converts text to phonetic representations (phones) in multiple languages using pluggable backends like espeak, espeak-mbrola, festival, or segments.
Parse, validate, format, and analyze international phone numbers across all countries, with support for extracting geographic, carrier, and timezone information from phone number data.
Parses, validates, formats, and analyzes international phone numbers without geocoding or carrier metadata, using a lightweight port of Google's libphonenumber library.
Install it if you need phone number parsing and validation without the memory overhead of geocoding and carrier data.
Computes phonetic keys of strings using Soundex, NYSIIS, Metaphone, and Double Metaphone algorithms for fuzzy matching and phonetic indexing.
Phonic is a Python client library for accessing the Phonic APIs, which provide voice agent creation and management capabilities including real-time websocket communication.
Phonopy calculates phonon properties and vibrational spectra for crystal structures using a hybrid Python and Rust backend, with support for multiple crystal structure formats and analysis workflows.
Install only if your workflow requires phonon analysis; it is not a general-purpose tool.
Phonors provides Rust-accelerated numerical kernels for phonopy and phono3py, replacing their C implementations with faster Rust code to speed up phonon calculations.
Photutils provides tools for detecting and measuring astronomical sources in images, including background estimation, star finding, aperture photometry, PSF photometry, source segmentation, and isophote fitting.
Install it if you work with astronomical imaging data and need production-grade source detection or photometry tools.
Converts PHP serialized strings to JSON format, designed for fast bulk migration of PHP data by leveraging optimized JSON decoders.
phply is a lexer and parser for PHP source code that generates abstract syntax trees, enabling PHP code analysis and conversion to other formats like JSON or Jinja2 templates.
Converts Python objects to and from PHP serialization format, implementing the `dumps`/`loads` interface for cross-language data exchange.
Implements the Registry and Factory patterns to create configurable class registries that map keys to class constructors, with optional integration into setuptools entry points for third-party extensibility.
Decodes HEIF/HEIC image files and integrates with pillow for reading and conversion to other formats, supporting 8/10/12-bit color depths and depth images.
Piccolo is an async-first ORM and query builder for Python that supports both sync and async workflows, with built-in migrations, a playground, and admin interface.
Piccolo Admin is a web-based admin interface and content management system for Python applications, built on Piccolo ORM and ASGI, providing data management, filtering, media handling, and REST API capabilities.
Install it if you're using Piccolo ORM and need a modern, feature-rich admin UI, or if you want a self-contained CMS for ASGI applications.
Exposes Piccolo ORM tables as REST endpoints in ASGI applications and provides essential middleware for authentication, rate limiting, CSRF protection, and content security.
pick provides a Python library to create interactive terminal selection lists where users can browse and choose one or multiple options using keyboard navigation.
Install it if you need to add keyboard-driven menu selection to a CLI application.
Backports the pickle 5 protocol (PEP 574) and related pickle module improvements from Python 3.8.3 to earlier Python versions, allowing use of protocol 5 features on Python 3.5, 3.6, and 3.7.
Scans Python Pickle files and related serialized model formats to detect suspicious or malicious code execution patterns before loading them.