Skip to main content

Crate uv_python_discovery

Crate uv_python_discovery 

Source
Expand description

Discover and select Python installations for projects, scripts, and commands.

Structs§

CompatibleProjectPython
An interpreter that satisfies the Python requirement used to select it.
ProjectPythonRequest
The resolved Python request and requirement for a workspace or frozen lockfile.
ProjectPythonRequirement
A Python requirement and the source used to derive it.
PythonDownloadReporter
PythonInstallation
A Python interpreter and accompanying tools.
PythonNotFound
The result of failed Python installation discovery.
PythonVersionFile
A .python-version or .python-versions file.
VersionFileDiscoveryOptions

Enums§

ConfigDiscovery
Whether configuration files should be discovered.
DiscoveryError
EnvironmentIncompatibilityError
EnvironmentKind
Error
MissingPythonHint
The reason a managed Python download could not be used.
PythonRequestSource
PythonRequirementConflicts
The requirements that exclude a Python version, and where they were read.
PythonRequirementSource
The declarations used to compute a project’s Python requirement.
PythonSelectionError
A failure while discovering or validating a project or script interpreter.
ScriptInterpreter
An interpreter suitable for a PEP 723 script.
VersionFilePreference
Whether to prefer the .python-version or .python-versions file.

Statics§

PYTHON_VERSIONS_FILENAME
The file name for multiple Python version declarations.
PYTHON_VERSION_FILENAME
The file name for Python version pins.

Functions§

check_environment_compatibility
Check whether an environment satisfies the requested Python constraints.
find_all_python_installations
Find all Python installations that satisfy the given request, querying interpreters concurrently.
find_environment
Find a PythonEnvironment matching the given request and preference.
find_requires_python
Compute the Requires-Python bound for the Workspace.
format_requires_python_sources
init_script_python_requirement
Determine the RequiresPython requirement for a new PEP 723 script.
report_interpreter
Display a message about the interpreter that was selected for the operation.