What is PEP 723?
by Tim Hopper
PEP 723 defines a standard format for directly embedding dependency and environment information in Python scripts. This enables standalone scripts to specify their requirements without external configuration files.
Key Features
Metadata Format
- Uses commented TOML syntax
- Specifies dependencies
- Declares Python version requirements
- Supports environment markers
Integration
- Tool-agnostic specification
- Compatible with existing editors
- Supports script portability
Impact
This PEP simplifies script distribution and execution by allowing dependencies to be self-contained within the script file. Tools like uv provide native support for this specification. See How to write self-contained Python scripts using PEP 723 for a practical guide.
Learn More
Get Python tooling updates
Subscribe to the newsletterLast updated on