Expand description
Discover and select Python installations for projects, scripts, and commands.
Structs§
- Compatible
Project Python - An interpreter that satisfies the Python requirement used to select it.
- Project
Python Request - The resolved Python request and requirement for a workspace or frozen lockfile.
- Project
Python Requirement - A Python requirement and the source used to derive it.
- Python
Download Reporter - Python
Installation - A Python interpreter and accompanying tools.
- Python
NotFound - The result of failed Python installation discovery.
- Python
Version File - A
.python-versionor.python-versionsfile. - Version
File Discovery Options
Enums§
- Config
Discovery - Whether configuration files should be discovered.
- Discovery
Error - Environment
Incompatibility Error - Environment
Kind - Error
- Missing
Python Hint - The reason a managed Python download could not be used.
- Python
Request Source - Python
Requirement Conflicts - The requirements that exclude a Python version, and where they were read.
- Python
Requirement Source - The declarations used to compute a project’s Python requirement.
- Python
Selection Error - A failure while discovering or validating a project or script interpreter.
- Script
Interpreter - An interpreter suitable for a PEP 723 script.
- Version
File Preference - Whether to prefer the
.python-versionor.python-versionsfile.
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
PythonEnvironmentmatching the given request and preference. - find_
requires_ python - Compute the
Requires-Pythonbound for theWorkspace. - format_
requires_ python_ sources - init_
script_ python_ requirement - Determine the
RequiresPythonrequirement for a new PEP 723 script. - report_
interpreter - Display a message about the interpreter that was selected for the operation.