Skip to main content

python-discovery

PyPI Supported Python versions Downloads check Documentation Status OpenSSF Scorecard OpenSSF Best Practices

What is python-discovery?

python-discovery is a library for discovering Python interpreters installed on your machine. You may have multiple Python versions from system packages, pyenv, mise, asdf, uv, or the Windows registry (PEP 514). This library finds the right one for you.

Give it a requirement like python3.12 or >=3.11,<3.13, and it searches all known locations, verifies each candidate, and returns detailed metadata about the match. Results are cached to disk so repeated lookups are fast.

The library runs on Python 3.9+ and discovers interpreters as old as Python 3.6; anything older is skipped with a warning naming the version it found.

Usage

from pathlib import Path

from python_discovery import DiskCache, get_interpreter

cache = DiskCache(root=Path("~/.cache/python-discovery").expanduser())
result = get_interpreter("python3.12", cache=cache)
if result is not None:
    print(result.executable)  # /usr/bin/python3.12
    print(result.implementation)  # CPython
    print(result.version_info[:3])  # (3, 12, 1)

The get_interpreter() function accepts various specification formats:

  • Absolute path: /usr/bin/python3.12
  • Version: 3.12
  • Implementation prefix: cpython3.12
  • Version specifier: >=3.10, >=3.11,<3.13

Documentation

Full documentation is available at python-discovery.readthedocs.io

Metadata

Release files for python-discovery 1.9.5

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

Source distribution (sdist)

Source distribution for python-discovery 1.9.5
File Size Uploaded Provenance Actions
python_discovery-1.9.5.tar.gz 141.1 kB With provenance Details for python_discovery-1.9.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-discovery 1.9.5
File Interpreter ABI Platform Actions
python_discovery-1.9.5-py3-none-any.whl Python 3 none any Details for python_discovery-1.9.5-py3-none-any.whl

Total release size: 185.5 kB

Release files / python_discovery-1.9.5.tar.gz

Download URL python_discovery-1.9.5.tar.gz
Size 141.1 kB
Tags Source
SHA-256 checksum
How to use checksums
86279f5d2728bc067de28b7ddc571be2eacc2ae0e7048f8629d2481a0f8848a2
BLAKE2b-256 checksum
How to use checksums
685570b46fae646bc6f5cb5e82569949d925cff1c7b5ce20ec4a11e0d977f8c6
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 6, 2026.

Transparency log

Release files / python_discovery-1.9.5-py3-none-any.whl

Download URL python_discovery-1.9.5-py3-none-any.whl
Size 44.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1fae8fca11e4bc61e38491c2aafff29e430b3c5e272d51ae52fb895bc4c0fac
BLAKE2b-256 checksum
How to use checksums
ac3525bd092ca8a7e71192afdca67fbff4f797da74408e74ac3626e13b409ec0
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 6, 2026.

Transparency log

Security for python-discovery 1.9.5

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for python_discovery-1.9.5.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 6, 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.

Release history Release notifications | RSS feed

This release

1.9.5 This release

2 release files Full provenance

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