packaging

Core Python utilities for versions, specifiers, markers, requirements, and metadata

Library
PyPI
v26.3
752 stars
Apache-2.0 OR BSD-2-Clause

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
85 /100 Excellent
Development Activity 96
Maintenance 72
Community 84
Maturity 60
Momentum 28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
86 /100 Excellent
Architecture 88
Code Quality 92
Innovation 85
Learning Curve 80

packaging is the reference implementation of Python’s packaging interoperability specifications, maintained by the PyPA. It provides battle-tested building blocks for handling PEP 440 versions, version specifiers, environment markers, requirements, wheel tags, and core metadata.

Used under the hood by pip, build, and much of the modern Python packaging ecosystem, packaging turns fuzzy string handling — like parsing “pytest>=6.2.0; python_version<‘3.11’” or comparing “2.0.0rc1” against “2.0” — into correct, spec-compliant behavior so you never have to reimplement it yourself.

What You Get

  • PEP 440 compliant Version parsing, normalization, and comparison
  • SpecifierSet handling for version constraints like >=1.0,<2.0
  • Environment marker evaluation (e.g. python_version, sys_platform)
  • Requirement parsing for PEP 508 dependency strings
  • Wheel compatibility tags and manylinux/musllinux platform detection
  • Core metadata and pylock (PEP 751) parsing plus SPDX license helpers

Common Use Cases

  • Comparing and sorting release versions in build or CI tooling
  • Validating whether an installed version satisfies a dependency constraint
  • Parsing dependency requirement strings and evaluating their markers
  • Selecting compatible wheels for the current interpreter and platform

Under The Hood

Architecture — packaging is organized as a set of independent, single-responsibility modules under src/packaging/: version.py (PEP 440 Version and comparison keys), specifiers.py (SpecifierSet), markers.py and a hand-written _tokenizer.py/_parser.py pair that drive PEP 508 requirement and marker parsing, requirements.py, tags.py with _manylinux.py/_musllinux.py and _elffile.py for platform detection, plus metadata.py, pylock.py, and a licenses/ package backed by a generated _spdx.py table. Each module can be imported in isolation; there is no central runtime or app lifecycle, only pure functions and value objects.

Tech Stack — It is pure Python targeting 3.9+ (including free-threaded builds and PyPy) with zero runtime dependencies, built with the flit_core backend and calendar versioning (YY.N). Development tooling includes nox for task orchestration, pytest with hypothesis property tests and coverage, pre-commit hooks, ASV benchmarks, and Sphinx (furo) docs published to Read the Docs.

Code Quality — The codebase is fully type-annotated with a shipped py.typed marker and makes deliberate use of modern typing (TypedDict, NamedTuple, Literal, Self). Testing is extensive: 19 dedicated test modules plus property-based and platform-specific suites (manylinux, musllinux, pylock, metadata) exercising the interoperability specs. Naming is precise and consistent, and version-conditional shims (e.g. a fallback deprecated decorator before Python 3.13) are handled cleanly.

API Design — The public API is deliberately minimal and ergonomic: high-level entry points like parse(), Version, SpecifierSet, Requirement, and Marker do the right thing with a single call, hiding the tokenizer/parser machinery behind private underscore modules. Behavior follows the published PyPA specifications, so the library is largely self-documenting for anyone familiar with PEP 440/508, and the hosted documentation covers every module.

Used by 40 apps in this directory

Python
94%
Apache 2.0

knowhere

AI Development · AI Memory · Developer Tools

3,755

Transform messy, unstructured documents into persistent, navigable memory that AI agents can actually use.

View details
83
Repo Health
75
Technical
66
Dependency
Built with
Python 94%
Updated 6 days ago
TypeScript
39%
Apache 2.0

Label Studio

AI Development · Data Engineering

28,540

Label Studio is an open-source, multi-type data labeling platform that lets teams annotate images, text, audio, video, and time series data with a configurable XML-based UI and export annotations in formats ready for any ML framework.

View details
93
Repo Health
87
Technical
64
Dependency
Built with
TypeScript 39%
JavaScript 27%
Python 25%
Updated 1 weeks ago
Rust
43%
Apache 2.0

LanceDB

AI Development · Databases

11,757

Open-source, embedded vector database built on the Lance columnar format for fast multimodal search across billions of vectors, backed by Y Combinator (W23).

View details
90
Repo Health
86
Technical
72
Dependency
Built with
Rust 43%
Python 27%
HTML 21%
Updated 6 days ago
Python
62%
Apache 2.0

marimo

Data Engineering · Developer Tools

23,309

A reactive Python notebook that eliminates hidden state, runs reproducibly, and deploys as a web app or script — stored as pure Python, built for the AI era.

View details
90
Repo Health
91
Technical
65
Dependency
Built with
Python 62%
TypeScript 37%
Updated 6 days ago
Python
58%
Apache 2.0

MLflow

AI Development · Monitoring

28,512

The open source AI engineering platform for debugging, evaluating, monitoring, and optimizing production LLMs and agents at scale.

View details
96
Repo Health
86
Technical
67
Dependency
Built with
Python 58%
TypeScript 35%
Updated 6 days ago
TypeScript
44%
Apache 2.0

OpenMetadata

AI Development · Analytics · Data Engineering

15,562

Open-source metadata platform that unifies data catalog, lineage, quality, and governance into a single searchable graph, with an MCP server that gives AI agents governed access to that context.

View details
93
Repo Health
85
Technical
74
Dependency
Built with
TypeScript 44%
Java 37%
Python 17%
Updated 6 days ago
Go
71%
Apache 2.0

OSV.dev

Security

3,001

Google's open-source vulnerability database that maps CVEs to exact package versions across 50+ ecosystems with a public API and data dumps.

View details
87
Repo Health
82
Technical
66
Dependency
Built with
Go 71%
Python 19%
Updated 1 weeks ago
TypeScript
50%
Other

Phase Console

Devops · Security

931

End-to-end encrypted secrets management for engineering teams — from local dev to Kubernetes production.

View details
85
Repo Health
73
Technical
63
Dependency
Built with
TypeScript 50%
Python 48%
Updated 1 weeks ago
Rust
63%
MIT

PostgresML

AI Development · Databases

6,823

Run ML training and LLM inference natively inside PostgreSQL with GPU acceleration — no data movement required.

View details
51
Repo Health
76
Technical
64
Dependency
Built with
Rust 63%
JavaScript 11%
Updated 1 years ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers