Skip to main content

uv-metadata

Inspect Python package metadata as JSON from published packages, local wheels and sdists, project folders, and Git repositories.

# Inspect a published package
uvx uv-metadata requests

# Print a single value, suitable for scripts
uvx uv-metadata requests -kversion

# Combine a version constraint with a target Python version
uvx uv-metadata 'setuptools<70' -p3.7 -kversion

Published wheel metadata is streamed via HTTP range requests, usually fetching only a few KB. Local archives and metadata directories are read directly. Project folders run their build backend in a temporary environment; Git and other non-wheel URL references use a temporary package install without runtime dependencies. Your environment is not the install target.

Requires Python 3.10 or newer and uv. When launched with uvx or uv run, the tool uses the executable identified by $UV; otherwise it looks for uv on PATH.

Installation

Run directly with uvx, as above, or install a persistent command:

uv tool install uv-metadata
uv-metadata requests

Inputs

Omitting the package inspects the current project folder.

# Local project: prepare metadata through its PEP 517 build backend
uvx uv-metadata .

# Local wheel, sdist (.tar.gz or .zip), or extracted metadata directory
uvx uv-metadata ./dist/mypackage-1.0.0-py3-none-any.whl
uvx uv-metadata ./dist/mypackage-1.0.0.tar.gz
uvx uv-metadata ./mypackage-1.0.0.dist-info

# Remote wheel: stream its metadata
uvx uv-metadata https://example.com/mypackage-1.0.0-py3-none-any.whl
uvx uv-metadata 'mypackage @ https://example.com/mypackage-1.0.0-py3-none-any.whl'

# Git repository, optionally at a revision
uvx uv-metadata git+https://github.com/psf/requests@main

Existing filesystem paths take precedence over package names. Use a path prefix such as ./ when referring to a local file that may be missing, so it is treated as a path. Both .dist-info and .egg-info directories are accepted. Published packages without a wheel fall back to downloading and reading a source archive.

Output and options

The default output is an indented JSON object with sorted keys:

  • Metadata keys use lower_snake_case.
  • Single-value fields are strings; repeatable fields such as requires_dist are lists.
  • entry_points groups entries as {"group": {"name": "module:attr"}}.
  • top_level, when supplied by the package, lists top-level import names.
  • Empty fields and legacy UNKNOWN values are omitted.
  • description and dynamic are omitted unless --full is given.
# Raw string for a single-value key; JSON for a list or object
uvx uv-metadata flask -kversion
uvx uv-metadata flask -krequires_dist

# Include the long description and dynamic metadata declarations
uvx uv-metadata flask --full

# Print just the long description
uvx uv-metadata flask --full -kdescription

# Show full build-backend output when inspecting a project fails
uvx uv-metadata . -v

# Current option reference
uvx uv-metadata --help

-p / --python selects the Python target for package resolution, project metadata builds, and temporary installs. Reading an existing archive or metadata directory does not resolve it for another Python version. Without -p, published-package resolution seeks the latest release independently of the Python running this command.

A missing key or extraction failure exits with an error message on stderr and a nonzero status. --full is needed when selecting an otherwise omitted key, such as -kdescription.

Native uv proposal

This project is a Python reference implementation for the proposed native uv metadata subcommand discussed in astral-sh/uv#6037.

Metadata

Release files for uv-metadata 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uv-metadata 1.3.0
File Size Uploaded Provenance Actions
uv_metadata-1.3.0.tar.gz 49.1 kB With provenance Details for uv_metadata-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for uv-metadata 1.3.0
File Interpreter ABI Platform Actions
uv_metadata-1.3.0-py3-none-any.whl Python 3 none any Details for uv_metadata-1.3.0-py3-none-any.whl

Total release size: 58.5 kB

Release files / uv_metadata-1.3.0.tar.gz

Download URL uv_metadata-1.3.0.tar.gz
Size 49.1 kB
Tags Source
SHA-256 checksum
How to use checksums
71a962e237fb3cc724b49c55b7881909dcc575e62a6a4d230f72ce036bf12bb9
BLAKE2b-256 checksum
How to use checksums
b1e5902e57329791cc5e96ae9527dee31c53f080349dda324b4d2cac202626c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / uv_metadata-1.3.0-py3-none-any.whl

Download URL uv_metadata-1.3.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b764f95c4dba9b02af0ad0a2fe630b43bd939a082985201a31039868b6682d4
BLAKE2b-256 checksum
How to use checksums
6364c79b98ff4a711498824805a3a05afa28b274dc03b24eb9dd5da0e83e4b30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Security for uv-metadata 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for uv_metadata-1.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page