pub struct EnvVars;Expand description
Declares all environment variable used throughout uv and its crates.
Implementations§
Source§impl EnvVars
impl EnvVars
Sourcepub const UV: &'static str = "UV"
pub const UV: &'static str = "UV"
The path to the binary that was used to invoke uv.
This is propagated to all subprocesses spawned by uv.
If the executable was invoked through a symbolic link, some platforms will return the path of the symbolic link and other platforms will return the path of the symbolic link’s target.
See https://doc.rust-lang.org/std/env/fn.current_exe.html#security for security considerations.
Sourcepub const UV_OFFLINE: &'static str = "UV_OFFLINE"
pub const UV_OFFLINE: &'static str = "UV_OFFLINE"
Equivalent to the --offline command-line argument. If set, uv will disable network access.
Sourcepub const UV_DEFAULT_INDEX: &'static str = "UV_DEFAULT_INDEX"
pub const UV_DEFAULT_INDEX: &'static str = "UV_DEFAULT_INDEX"
Equivalent to the --default-index command-line argument. If set, uv will use
this URL as the default index when searching for packages.
Sourcepub const UV_INDEX: &'static str = "UV_INDEX"
pub const UV_INDEX: &'static str = "UV_INDEX"
Equivalent to the --index command-line argument. If set, uv will use this
space-separated list of URLs as additional indexes when searching for packages.
Sourcepub const UV_INDEX_URL: &'static str = "UV_INDEX_URL"
pub const UV_INDEX_URL: &'static str = "UV_INDEX_URL"
Equivalent to the --index-url command-line argument. If set, uv will use this
URL as the default index when searching for packages.
(Deprecated: use UV_DEFAULT_INDEX instead.)
Sourcepub const UV_EXTRA_INDEX_URL: &'static str = "UV_EXTRA_INDEX_URL"
pub const UV_EXTRA_INDEX_URL: &'static str = "UV_EXTRA_INDEX_URL"
Equivalent to the --extra-index-url command-line argument. If set, uv will
use this space-separated list of URLs as additional indexes when searching for packages.
(Deprecated: use UV_INDEX instead.)
Sourcepub const UV_FIND_LINKS: &'static str = "UV_FIND_LINKS"
pub const UV_FIND_LINKS: &'static str = "UV_FIND_LINKS"
Equivalent to the --find-links command-line argument. If set, uv will use this
comma-separated list of additional locations to search for packages.
Sourcepub const UV_NO_SOURCES: &'static str = "UV_NO_SOURCES"
pub const UV_NO_SOURCES: &'static str = "UV_NO_SOURCES"
Equivalent to the --no-sources command-line argument. If set, uv will ignore
[tool.uv.sources] annotations when resolving dependencies.
Sourcepub const UV_CACHE_DIR: &'static str = "UV_CACHE_DIR"
pub const UV_CACHE_DIR: &'static str = "UV_CACHE_DIR"
Equivalent to the --cache-dir command-line argument. If set, uv will use this
directory for caching instead of the default cache directory.
Sourcepub const UV_CREDENTIALS_DIR: &'static str = "UV_CREDENTIALS_DIR"
pub const UV_CREDENTIALS_DIR: &'static str = "UV_CREDENTIALS_DIR"
The directory for storage of credentials when using a plain text backend.
Sourcepub const UV_NO_CACHE: &'static str = "UV_NO_CACHE"
pub const UV_NO_CACHE: &'static str = "UV_NO_CACHE"
Equivalent to the --no-cache command-line argument. If set, uv will not use the
cache for any operations.
Sourcepub const UV_RESOLUTION: &'static str = "UV_RESOLUTION"
pub const UV_RESOLUTION: &'static str = "UV_RESOLUTION"
Equivalent to the --resolution command-line argument. For example, if set to
lowest-direct, uv will install the lowest compatible versions of all direct dependencies.
Sourcepub const UV_PRERELEASE: &'static str = "UV_PRERELEASE"
pub const UV_PRERELEASE: &'static str = "UV_PRERELEASE"
Equivalent to the --prerelease command-line argument. For example, if set to
allow, uv will allow pre-release versions for all dependencies.
Sourcepub const UV_FORK_STRATEGY: &'static str = "UV_FORK_STRATEGY"
pub const UV_FORK_STRATEGY: &'static str = "UV_FORK_STRATEGY"
Equivalent to the --fork-strategy argument. Controls version selection during universal
resolution.
Sourcepub const UV_SYSTEM_PYTHON: &'static str = "UV_SYSTEM_PYTHON"
pub const UV_SYSTEM_PYTHON: &'static str = "UV_SYSTEM_PYTHON"
Equivalent to the --system command-line argument. If set to true, uv will
use the first Python interpreter found in the system PATH.
WARNING: UV_SYSTEM_PYTHON=true is intended for use in continuous integration (CI)
or containerized environments and should be used with caution, as modifying the system
Python can lead to unexpected behavior.
Sourcepub const UV_PYTHON: &'static str = "UV_PYTHON"
pub const UV_PYTHON: &'static str = "UV_PYTHON"
Equivalent to the --python command-line argument. If set to a path, uv will use
this Python interpreter for all operations.
Sourcepub const UV_BREAK_SYSTEM_PACKAGES: &'static str = "UV_BREAK_SYSTEM_PACKAGES"
pub const UV_BREAK_SYSTEM_PACKAGES: &'static str = "UV_BREAK_SYSTEM_PACKAGES"
Equivalent to the --break-system-packages command-line argument. If set to true,
uv will allow the installation of packages that conflict with system-installed packages.
WARNING: UV_BREAK_SYSTEM_PACKAGES=true is intended for use in continuous integration
(CI) or containerized environments and should be used with caution, as modifying the system
Python can lead to unexpected behavior.
Sourcepub const UV_NATIVE_TLS: &'static str = "UV_NATIVE_TLS"
pub const UV_NATIVE_TLS: &'static str = "UV_NATIVE_TLS"
Equivalent to the --native-tls command-line argument. If set to true, uv will
use the system’s trust store instead of the bundled webpki-roots crate.
Sourcepub const UV_INDEX_STRATEGY: &'static str = "UV_INDEX_STRATEGY"
pub const UV_INDEX_STRATEGY: &'static str = "UV_INDEX_STRATEGY"
Equivalent to the --index-strategy command-line argument.
For example, if set to unsafe-best-match, uv will consider versions of a given package
available across all index URLs, rather than limiting its search to the first index URL
that contains the package.
Sourcepub const UV_REQUIRE_HASHES: &'static str = "UV_REQUIRE_HASHES"
pub const UV_REQUIRE_HASHES: &'static str = "UV_REQUIRE_HASHES"
Equivalent to the --require-hashes command-line argument. If set to true,
uv will require that all dependencies have a hash specified in the requirements file.
Sourcepub const UV_CONSTRAINT: &'static str = "UV_CONSTRAINT"
pub const UV_CONSTRAINT: &'static str = "UV_CONSTRAINT"
Equivalent to the --constraints command-line argument. If set, uv will use this
file as the constraints file. Uses space-separated list of files.
Sourcepub const UV_BUILD_CONSTRAINT: &'static str = "UV_BUILD_CONSTRAINT"
pub const UV_BUILD_CONSTRAINT: &'static str = "UV_BUILD_CONSTRAINT"
Equivalent to the --build-constraints command-line argument. If set, uv will use this file
as constraints for any source distribution builds. Uses space-separated list of files.
Sourcepub const UV_OVERRIDE: &'static str = "UV_OVERRIDE"
pub const UV_OVERRIDE: &'static str = "UV_OVERRIDE"
Equivalent to the --overrides command-line argument. If set, uv will use this file
as the overrides file. Uses space-separated list of files.
Sourcepub const UV_EXCLUDE: &'static str = "UV_EXCLUDE"
pub const UV_EXCLUDE: &'static str = "UV_EXCLUDE"
Equivalent to the --excludes command-line argument. If set, uv will use this
as the excludes file. Uses space-separated list of files.
Sourcepub const UV_LINK_MODE: &'static str = "UV_LINK_MODE"
pub const UV_LINK_MODE: &'static str = "UV_LINK_MODE"
Equivalent to the --link-mode command-line argument. If set, uv will use this as
a link mode.
Sourcepub const UV_NO_BUILD_ISOLATION: &'static str = "UV_NO_BUILD_ISOLATION"
pub const UV_NO_BUILD_ISOLATION: &'static str = "UV_NO_BUILD_ISOLATION"
Equivalent to the --no-build-isolation command-line argument. If set, uv will
skip isolation when building source distributions.
Sourcepub const UV_CUSTOM_COMPILE_COMMAND: &'static str = "UV_CUSTOM_COMPILE_COMMAND"
pub const UV_CUSTOM_COMPILE_COMMAND: &'static str = "UV_CUSTOM_COMPILE_COMMAND"
Equivalent to the --custom-compile-command command-line argument.
Used to override uv in the output header of the requirements.txt files generated by
uv pip compile. Intended for use-cases in which uv pip compile is called from within a wrapper
script, to include the name of the wrapper script in the output file.
Sourcepub const UV_KEYRING_PROVIDER: &'static str = "UV_KEYRING_PROVIDER"
pub const UV_KEYRING_PROVIDER: &'static str = "UV_KEYRING_PROVIDER"
Equivalent to the --keyring-provider command-line argument. If set, uv
will use this value as the keyring provider.
Sourcepub const UV_CONFIG_FILE: &'static str = "UV_CONFIG_FILE"
pub const UV_CONFIG_FILE: &'static str = "UV_CONFIG_FILE"
Equivalent to the --config-file command-line argument. Expects a path to a
local uv.toml file to use as the configuration file.
Sourcepub const UV_NO_CONFIG: &'static str = "UV_NO_CONFIG"
pub const UV_NO_CONFIG: &'static str = "UV_NO_CONFIG"
Equivalent to the --no-config command-line argument. If set, uv will not read
any configuration files from the current directory, parent directories, or user configuration
directories.
Sourcepub const UV_ISOLATED: &'static str = "UV_ISOLATED"
pub const UV_ISOLATED: &'static str = "UV_ISOLATED"
Equivalent to the --isolated command-line argument. If set, uv will avoid discovering
a pyproject.toml or uv.toml file.
Sourcepub const UV_EXCLUDE_NEWER: &'static str = "UV_EXCLUDE_NEWER"
pub const UV_EXCLUDE_NEWER: &'static str = "UV_EXCLUDE_NEWER"
Equivalent to the --exclude-newer command-line argument. If set, uv will
exclude distributions published after the specified date.
Sourcepub const UV_PYTHON_PREFERENCE: &'static str = "UV_PYTHON_PREFERENCE"
pub const UV_PYTHON_PREFERENCE: &'static str = "UV_PYTHON_PREFERENCE"
Whether uv should prefer system or managed Python versions.
Sourcepub const UV_MANAGED_PYTHON: &'static str = "UV_MANAGED_PYTHON"
pub const UV_MANAGED_PYTHON: &'static str = "UV_MANAGED_PYTHON"
Require use of uv-managed Python versions.
Sourcepub const UV_NO_MANAGED_PYTHON: &'static str = "UV_NO_MANAGED_PYTHON"
pub const UV_NO_MANAGED_PYTHON: &'static str = "UV_NO_MANAGED_PYTHON"
Disable use of uv-managed Python versions.
Sourcepub const UV_PYTHON_DOWNLOADS: &'static str = "UV_PYTHON_DOWNLOADS"
pub const UV_PYTHON_DOWNLOADS: &'static str = "UV_PYTHON_DOWNLOADS"
Equivalent to the
python-downloads setting and, when disabled, the
--no-python-downloads option. Whether uv should allow Python downloads.
Sourcepub const UV_LIBC: &'static str = "UV_LIBC"
pub const UV_LIBC: &'static str = "UV_LIBC"
Overrides the environment-determined libc on linux systems when filling in the current platform
within Python version requests. Options are: gnu, gnueabi, gnueabihf, musl, and none.
Sourcepub const UV_COMPILE_BYTECODE: &'static str = "UV_COMPILE_BYTECODE"
pub const UV_COMPILE_BYTECODE: &'static str = "UV_COMPILE_BYTECODE"
Equivalent to the --compile-bytecode command-line argument. If set, uv
will compile Python source files to bytecode after installation.
Sourcepub const UV_COMPILE_BYTECODE_TIMEOUT: &'static str = "UV_COMPILE_BYTECODE_TIMEOUT"
pub const UV_COMPILE_BYTECODE_TIMEOUT: &'static str = "UV_COMPILE_BYTECODE_TIMEOUT"
Timeout (in seconds) for bytecode compilation.
Sourcepub const UV_NO_EDITABLE: &'static str = "UV_NO_EDITABLE"
pub const UV_NO_EDITABLE: &'static str = "UV_NO_EDITABLE"
Equivalent to the --no-editable command-line argument. If set, uv
installs or exports any editable dependencies, including the project and any workspace
members, as non-editable.
Sourcepub const UV_DEV: &'static str = "UV_DEV"
pub const UV_DEV: &'static str = "UV_DEV"
Equivalent to the --dev command-line argument. If set, uv will include
development dependencies.
Sourcepub const UV_NO_DEV: &'static str = "UV_NO_DEV"
pub const UV_NO_DEV: &'static str = "UV_NO_DEV"
Equivalent to the --no-dev command-line argument. If set, uv will exclude
development dependencies.
Sourcepub const UV_NO_GROUP: &'static str = "UV_NO_GROUP"
pub const UV_NO_GROUP: &'static str = "UV_NO_GROUP"
Equivalent to the --no-group command-line argument. If set, uv will disable
the specified dependency groups for the given space-delimited list of packages.
Sourcepub const UV_NO_DEFAULT_GROUPS: &'static str = "UV_NO_DEFAULT_GROUPS"
pub const UV_NO_DEFAULT_GROUPS: &'static str = "UV_NO_DEFAULT_GROUPS"
Equivalent to the --no-default-groups command-line argument. If set, uv will
not select the default dependency groups defined in tool.uv.default-groups.
Sourcepub const UV_NO_BINARY: &'static str = "UV_NO_BINARY"
pub const UV_NO_BINARY: &'static str = "UV_NO_BINARY"
Equivalent to the --no-binary command-line argument. If set, uv will install
all packages from source. The resolver will still use pre-built wheels to
extract package metadata, if available.
Sourcepub const UV_NO_BINARY_PACKAGE: &'static str = "UV_NO_BINARY_PACKAGE"
pub const UV_NO_BINARY_PACKAGE: &'static str = "UV_NO_BINARY_PACKAGE"
Equivalent to the --no-binary-package command line argument. If set, uv will
not use pre-built wheels for the given space-delimited list of packages.
Sourcepub const UV_NO_BUILD: &'static str = "UV_NO_BUILD"
pub const UV_NO_BUILD: &'static str = "UV_NO_BUILD"
Equivalent to the --no-build command-line argument. If set, uv will not build
source distributions.
Sourcepub const UV_NO_BUILD_PACKAGE: &'static str = "UV_NO_BUILD_PACKAGE"
pub const UV_NO_BUILD_PACKAGE: &'static str = "UV_NO_BUILD_PACKAGE"
Equivalent to the --no-build-package command line argument. If set, uv will
not build source distributions for the given space-delimited list of packages.
Sourcepub const UV_PUBLISH_URL: &'static str = "UV_PUBLISH_URL"
pub const UV_PUBLISH_URL: &'static str = "UV_PUBLISH_URL"
Equivalent to the --publish-url command-line argument. The URL of the upload
endpoint of the index to use with uv publish.
Sourcepub const UV_PUBLISH_TOKEN: &'static str = "UV_PUBLISH_TOKEN"
pub const UV_PUBLISH_TOKEN: &'static str = "UV_PUBLISH_TOKEN"
Equivalent to the --token command-line argument in uv publish. If set, uv
will use this token (with the username __token__) for publishing.
Sourcepub const UV_PUBLISH_INDEX: &'static str = "UV_PUBLISH_INDEX"
pub const UV_PUBLISH_INDEX: &'static str = "UV_PUBLISH_INDEX"
Equivalent to the --index command-line argument in uv publish. If
set, uv the index with this name in the configuration for publishing.
Sourcepub const UV_PUBLISH_USERNAME: &'static str = "UV_PUBLISH_USERNAME"
pub const UV_PUBLISH_USERNAME: &'static str = "UV_PUBLISH_USERNAME"
Equivalent to the --username command-line argument in uv publish. If
set, uv will use this username for publishing.
Sourcepub const UV_PUBLISH_PASSWORD: &'static str = "UV_PUBLISH_PASSWORD"
pub const UV_PUBLISH_PASSWORD: &'static str = "UV_PUBLISH_PASSWORD"
Equivalent to the --password command-line argument in uv publish. If
set, uv will use this password for publishing.
Sourcepub const UV_PUBLISH_CHECK_URL: &'static str = "UV_PUBLISH_CHECK_URL"
pub const UV_PUBLISH_CHECK_URL: &'static str = "UV_PUBLISH_CHECK_URL"
Don’t upload a file if it already exists on the index. The value is the URL of the index.
Sourcepub const UV_NO_SYNC: &'static str = "UV_NO_SYNC"
pub const UV_NO_SYNC: &'static str = "UV_NO_SYNC"
Equivalent to the --no-sync command-line argument. If set, uv will skip updating
the environment.
Sourcepub const UV_LOCKED: &'static str = "UV_LOCKED"
pub const UV_LOCKED: &'static str = "UV_LOCKED"
Equivalent to the --locked command-line argument. If set, uv will assert that the
uv.lock remains unchanged.
Sourcepub const UV_FROZEN: &'static str = "UV_FROZEN"
pub const UV_FROZEN: &'static str = "UV_FROZEN"
Equivalent to the --frozen command-line argument. If set, uv will run without
updating the uv.lock file.
Sourcepub const UV_PREVIEW: &'static str = "UV_PREVIEW"
pub const UV_PREVIEW: &'static str = "UV_PREVIEW"
Equivalent to the --preview argument. Enables preview mode.
Sourcepub const UV_PREVIEW_FEATURES: &'static str = "UV_PREVIEW_FEATURES"
pub const UV_PREVIEW_FEATURES: &'static str = "UV_PREVIEW_FEATURES"
Equivalent to the --preview-features argument. Enables specific preview features.
Sourcepub const UV_GITHUB_TOKEN: &'static str = "UV_GITHUB_TOKEN"
pub const UV_GITHUB_TOKEN: &'static str = "UV_GITHUB_TOKEN"
Equivalent to the --token argument for self update. A GitHub token for authentication.
Sourcepub const UV_NO_VERIFY_HASHES: &'static str = "UV_NO_VERIFY_HASHES"
pub const UV_NO_VERIFY_HASHES: &'static str = "UV_NO_VERIFY_HASHES"
Equivalent to the --no-verify-hashes argument. Disables hash verification for
requirements.txt files.
Sourcepub const UV_INSECURE_HOST: &'static str = "UV_INSECURE_HOST"
pub const UV_INSECURE_HOST: &'static str = "UV_INSECURE_HOST"
Equivalent to the --allow-insecure-host argument.
Sourcepub const UV_INSECURE_NO_ZIP_VALIDATION: &'static str = "UV_INSECURE_NO_ZIP_VALIDATION"
pub const UV_INSECURE_NO_ZIP_VALIDATION: &'static str = "UV_INSECURE_NO_ZIP_VALIDATION"
Disable ZIP validation for streamed wheels and ZIP-based source distributions.
WARNING: Disabling ZIP validation can expose your system to security risks by bypassing integrity checks and allowing uv to install potentially malicious ZIP files. If uv rejects a ZIP file due to failing validation, it is likely that the file is malformed; consider filing an issue with the package maintainer.
Sourcepub const UV_CONCURRENT_DOWNLOADS: &'static str = "UV_CONCURRENT_DOWNLOADS"
pub const UV_CONCURRENT_DOWNLOADS: &'static str = "UV_CONCURRENT_DOWNLOADS"
Sets the maximum number of in-flight concurrent downloads that uv will perform at any given time.
Sourcepub const UV_CONCURRENT_BUILDS: &'static str = "UV_CONCURRENT_BUILDS"
pub const UV_CONCURRENT_BUILDS: &'static str = "UV_CONCURRENT_BUILDS"
Sets the maximum number of source distributions that uv will build concurrently at any given time.
Sourcepub const UV_CONCURRENT_INSTALLS: &'static str = "UV_CONCURRENT_INSTALLS"
pub const UV_CONCURRENT_INSTALLS: &'static str = "UV_CONCURRENT_INSTALLS"
Controls the number of threads used when installing and unzipping packages.
Sourcepub const UV_NO_PROGRESS: &'static str = "UV_NO_PROGRESS"
pub const UV_NO_PROGRESS: &'static str = "UV_NO_PROGRESS"
Equivalent to the --no-progress command-line argument. Disables all progress output. For
example, spinners and progress bars.
Sourcepub const UV_TOOL_DIR: &'static str = "UV_TOOL_DIR"
pub const UV_TOOL_DIR: &'static str = "UV_TOOL_DIR"
Specifies the directory where uv stores managed tools.
Sourcepub const UV_TOOL_BIN_DIR: &'static str = "UV_TOOL_BIN_DIR"
pub const UV_TOOL_BIN_DIR: &'static str = "UV_TOOL_BIN_DIR"
Specifies the “bin” directory for installing tool executables.
Sourcepub const UV_INIT_BUILD_BACKEND: &'static str = "UV_INIT_BUILD_BACKEND"
pub const UV_INIT_BUILD_BACKEND: &'static str = "UV_INIT_BUILD_BACKEND"
Equivalent to the --build-backend argument for uv init. Determines the default backend
to use when creating a new project.
Sourcepub const UV_PROJECT_ENVIRONMENT: &'static str = "UV_PROJECT_ENVIRONMENT"
pub const UV_PROJECT_ENVIRONMENT: &'static str = "UV_PROJECT_ENVIRONMENT"
Specifies the path to the directory to use for a project virtual environment.
See the project documentation for more details.
Sourcepub const UV_PYTHON_BIN_DIR: &'static str = "UV_PYTHON_BIN_DIR"
pub const UV_PYTHON_BIN_DIR: &'static str = "UV_PYTHON_BIN_DIR"
Specifies the directory to place links to installed, managed Python executables.
Sourcepub const UV_PYTHON_INSTALL_DIR: &'static str = "UV_PYTHON_INSTALL_DIR"
pub const UV_PYTHON_INSTALL_DIR: &'static str = "UV_PYTHON_INSTALL_DIR"
Specifies the directory for storing managed Python installations.
Sourcepub const UV_PYTHON_INSTALL_BIN: &'static str = "UV_PYTHON_INSTALL_BIN"
pub const UV_PYTHON_INSTALL_BIN: &'static str = "UV_PYTHON_INSTALL_BIN"
Whether to install the Python executable into the UV_PYTHON_BIN_DIR directory.
Sourcepub const UV_PYTHON_INSTALL_REGISTRY: &'static str = "UV_PYTHON_INSTALL_REGISTRY"
pub const UV_PYTHON_INSTALL_REGISTRY: &'static str = "UV_PYTHON_INSTALL_REGISTRY"
Whether to install the Python executable into the Windows registry.
Sourcepub const UV_PYTHON_DOWNLOADS_JSON_URL: &'static str = "UV_PYTHON_DOWNLOADS_JSON_URL"
pub const UV_PYTHON_DOWNLOADS_JSON_URL: &'static str = "UV_PYTHON_DOWNLOADS_JSON_URL"
Managed Python installations information is hardcoded in the uv binary.
This variable can be set to a local path or URL pointing to a JSON list of Python installations to override the hardcoded list.
This allows customizing the URLs for downloads or using slightly older or newer versions
of Python than the ones hardcoded into this build of uv.
Sourcepub const UV_PYTHON_CACHE_DIR: &'static str = "UV_PYTHON_CACHE_DIR"
pub const UV_PYTHON_CACHE_DIR: &'static str = "UV_PYTHON_CACHE_DIR"
Specifies the directory for caching the archives of managed Python installations before installation.
Sourcepub const UV_PYTHON_INSTALL_MIRROR: &'static str = "UV_PYTHON_INSTALL_MIRROR"
pub const UV_PYTHON_INSTALL_MIRROR: &'static str = "UV_PYTHON_INSTALL_MIRROR"
Managed Python installations are downloaded from the Astral
python-build-standalone project.
This variable can be set to a mirror URL to use a different source for Python installations.
The provided URL will replace https://github.com/astral-sh/python-build-standalone/releases/download in, e.g.,
https://github.com/astral-sh/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-install_only.tar.gz.
Distributions can be read from a local directory by using the file:// URL scheme.
Sourcepub const UV_PYPY_INSTALL_MIRROR: &'static str = "UV_PYPY_INSTALL_MIRROR"
pub const UV_PYPY_INSTALL_MIRROR: &'static str = "UV_PYPY_INSTALL_MIRROR"
Managed PyPy installations are downloaded from python.org.
This variable can be set to a mirror URL to use a
different source for PyPy installations. The provided URL will replace
https://downloads.python.org/pypy in, e.g.,
https://downloads.python.org/pypy/pypy3.8-v7.3.7-osx64.tar.bz2.
Distributions can be read from a local directory by using the file:// URL scheme.
Sourcepub const UV_PYTHON_CPYTHON_BUILD: &'static str = "UV_PYTHON_CPYTHON_BUILD"
pub const UV_PYTHON_CPYTHON_BUILD: &'static str = "UV_PYTHON_CPYTHON_BUILD"
Pin managed CPython versions to a specific build version.
For CPython, this should be the build date (e.g., “20250814”).
Sourcepub const UV_PYTHON_PYPY_BUILD: &'static str = "UV_PYTHON_PYPY_BUILD"
pub const UV_PYTHON_PYPY_BUILD: &'static str = "UV_PYTHON_PYPY_BUILD"
Pin managed PyPy versions to a specific build version.
For PyPy, this should be the PyPy version (e.g., “7.3.20”).
Sourcepub const UV_PYTHON_GRAALPY_BUILD: &'static str = "UV_PYTHON_GRAALPY_BUILD"
pub const UV_PYTHON_GRAALPY_BUILD: &'static str = "UV_PYTHON_GRAALPY_BUILD"
Pin managed GraalPy versions to a specific build version.
For GraalPy, this should be the GraalPy version (e.g., “24.2.2”).
Sourcepub const UV_PYTHON_PYODIDE_BUILD: &'static str = "UV_PYTHON_PYODIDE_BUILD"
pub const UV_PYTHON_PYODIDE_BUILD: &'static str = "UV_PYTHON_PYODIDE_BUILD"
Pin managed Pyodide versions to a specific build version.
For Pyodide, this should be the Pyodide version (e.g., “0.28.1”).
Sourcepub const UV_VENV_CLEAR: &'static str = "UV_VENV_CLEAR"
pub const UV_VENV_CLEAR: &'static str = "UV_VENV_CLEAR"
Equivalent to the --clear command-line argument. If set, uv will remove any
existing files or directories at the target path.
Sourcepub const UV_VENV_SEED: &'static str = "UV_VENV_SEED"
pub const UV_VENV_SEED: &'static str = "UV_VENV_SEED"
Install seed packages (one or more of: pip, setuptools, and wheel) into the virtual environment
created by uv venv.
Note that setuptools and wheel are not included in Python 3.12+ environments.
Sourcepub const UV_TEST_PYTHON_PATH: &'static str = "UV_TEST_PYTHON_PATH"
pub const UV_TEST_PYTHON_PATH: &'static str = "UV_TEST_PYTHON_PATH"
Used to override PATH to limit Python executable availability in the test suite.
Sourcepub const UV_SHOW_RESOLUTION: &'static str = "UV_SHOW_RESOLUTION"
pub const UV_SHOW_RESOLUTION: &'static str = "UV_SHOW_RESOLUTION"
Include resolver and installer output related to environment modifications.
Sourcepub const UV_UPDATE_SCHEMA: &'static str = "UV_UPDATE_SCHEMA"
pub const UV_UPDATE_SCHEMA: &'static str = "UV_UPDATE_SCHEMA"
Use to update the json schema files.
Sourcepub const UV_NO_WRAP: &'static str = "UV_NO_WRAP"
pub const UV_NO_WRAP: &'static str = "UV_NO_WRAP"
Use to disable line wrapping for diagnostics.
Sourcepub const UV_COMMIT_HASH: &'static str = "UV_COMMIT_HASH"
pub const UV_COMMIT_HASH: &'static str = "UV_COMMIT_HASH"
Used to set the uv commit hash at build time via build.rs.
Sourcepub const UV_COMMIT_SHORT_HASH: &'static str = "UV_COMMIT_SHORT_HASH"
pub const UV_COMMIT_SHORT_HASH: &'static str = "UV_COMMIT_SHORT_HASH"
Used to set the uv commit short hash at build time via build.rs.
Sourcepub const UV_COMMIT_DATE: &'static str = "UV_COMMIT_DATE"
pub const UV_COMMIT_DATE: &'static str = "UV_COMMIT_DATE"
Used to set the uv commit date at build time via build.rs.
Sourcepub const UV_LAST_TAG: &'static str = "UV_LAST_TAG"
pub const UV_LAST_TAG: &'static str = "UV_LAST_TAG"
Used to set the uv tag at build time via build.rs.
Sourcepub const UV_LAST_TAG_DISTANCE: &'static str = "UV_LAST_TAG_DISTANCE"
pub const UV_LAST_TAG_DISTANCE: &'static str = "UV_LAST_TAG_DISTANCE"
Used to set the uv tag distance from head at build time via build.rs.
Sourcepub const UV_INTERNAL__PARENT_INTERPRETER: &'static str = "UV_INTERNAL__PARENT_INTERPRETER"
pub const UV_INTERNAL__PARENT_INTERPRETER: &'static str = "UV_INTERNAL__PARENT_INTERPRETER"
Used to set the spawning/parent interpreter when using –system in the test suite.
Sourcepub const UV_INTERNAL__SHOW_DERIVATION_TREE: &'static str = "UV_INTERNAL__SHOW_DERIVATION_TREE"
pub const UV_INTERNAL__SHOW_DERIVATION_TREE: &'static str = "UV_INTERNAL__SHOW_DERIVATION_TREE"
Used to force showing the derivation tree during resolver error reporting.
Sourcepub const UV_INTERNAL__TEST_DIR: &'static str = "UV_INTERNAL__TEST_DIR"
pub const UV_INTERNAL__TEST_DIR: &'static str = "UV_INTERNAL__TEST_DIR"
Used to set a temporary directory for some tests.
Sourcepub const UV_INTERNAL__TEST_PYTHON_MANAGED: &'static str = "UV_INTERNAL__TEST_PYTHON_MANAGED"
pub const UV_INTERNAL__TEST_PYTHON_MANAGED: &'static str = "UV_INTERNAL__TEST_PYTHON_MANAGED"
Used to force treating an interpreter as “managed” during tests.
Sourcepub const XDG_CONFIG_DIRS: &'static str = "XDG_CONFIG_DIRS"
pub const XDG_CONFIG_DIRS: &'static str = "XDG_CONFIG_DIRS"
Path to system-level configuration directory on Unix systems.
Sourcepub const SYSTEMDRIVE: &'static str = "SYSTEMDRIVE"
pub const SYSTEMDRIVE: &'static str = "SYSTEMDRIVE"
Path to system-level configuration directory on Windows systems.
Sourcepub const APPDATA: &'static str = "APPDATA"
pub const APPDATA: &'static str = "APPDATA"
Path to user-level configuration directory on Windows systems.
Sourcepub const USERPROFILE: &'static str = "USERPROFILE"
pub const USERPROFILE: &'static str = "USERPROFILE"
Path to root directory of user’s profile on Windows systems.
Sourcepub const XDG_CONFIG_HOME: &'static str = "XDG_CONFIG_HOME"
pub const XDG_CONFIG_HOME: &'static str = "XDG_CONFIG_HOME"
Path to user-level configuration directory on Unix systems.
Sourcepub const XDG_CACHE_HOME: &'static str = "XDG_CACHE_HOME"
pub const XDG_CACHE_HOME: &'static str = "XDG_CACHE_HOME"
Path to cache directory on Unix systems.
Sourcepub const XDG_DATA_HOME: &'static str = "XDG_DATA_HOME"
pub const XDG_DATA_HOME: &'static str = "XDG_DATA_HOME"
Path to directory for storing managed Python installations and tools.
Sourcepub const XDG_BIN_HOME: &'static str = "XDG_BIN_HOME"
pub const XDG_BIN_HOME: &'static str = "XDG_BIN_HOME"
Path to directory where executables are installed.
Sourcepub const SSL_CERT_FILE: &'static str = "SSL_CERT_FILE"
pub const SSL_CERT_FILE: &'static str = "SSL_CERT_FILE"
Custom certificate bundle file path for SSL connections.
Takes precedence over UV_NATIVE_TLS when set.
Sourcepub const SSL_CERT_DIR: &'static str = "SSL_CERT_DIR"
pub const SSL_CERT_DIR: &'static str = "SSL_CERT_DIR"
Custom path for certificate bundles for SSL connections.
Multiple entries are supported separated using a platform-specific
delimiter (: on Unix, ; on Windows).
Takes precedence over UV_NATIVE_TLS when set.
Sourcepub const SSL_CLIENT_CERT: &'static str = "SSL_CLIENT_CERT"
pub const SSL_CLIENT_CERT: &'static str = "SSL_CLIENT_CERT"
If set, uv will use this file for mTLS authentication. This should be a single file containing both the certificate and the private key in PEM format.
Sourcepub const HTTP_PROXY: &'static str = "HTTP_PROXY"
pub const HTTP_PROXY: &'static str = "HTTP_PROXY"
Proxy for HTTP requests.
Sourcepub const HTTPS_PROXY: &'static str = "HTTPS_PROXY"
pub const HTTPS_PROXY: &'static str = "HTTPS_PROXY"
Proxy for HTTPS requests.
Sourcepub const NO_PROXY: &'static str = "NO_PROXY"
pub const NO_PROXY: &'static str = "NO_PROXY"
Comma-separated list of hostnames (e.g., example.com) and/or patterns (e.g., 192.168.1.0/24) that should bypass the proxy.
Sourcepub const UV_UPLOAD_HTTP_TIMEOUT: &'static str = "UV_UPLOAD_HTTP_TIMEOUT"
pub const UV_UPLOAD_HTTP_TIMEOUT: &'static str = "UV_UPLOAD_HTTP_TIMEOUT"
Timeout (in seconds) for only upload HTTP requests. (default: 900 s)
Sourcepub const UV_HTTP_TIMEOUT: &'static str = "UV_HTTP_TIMEOUT"
pub const UV_HTTP_TIMEOUT: &'static str = "UV_HTTP_TIMEOUT"
Timeout (in seconds) for HTTP requests. (default: 30 s)
Sourcepub const UV_HTTP_RETRIES: &'static str = "UV_HTTP_RETRIES"
pub const UV_HTTP_RETRIES: &'static str = "UV_HTTP_RETRIES"
The number of retries for HTTP requests. (default: 3)
Sourcepub const UV_REQUEST_TIMEOUT: &'static str = "UV_REQUEST_TIMEOUT"
pub const UV_REQUEST_TIMEOUT: &'static str = "UV_REQUEST_TIMEOUT"
Timeout (in seconds) for HTTP requests. Equivalent to UV_HTTP_TIMEOUT.
Sourcepub const HTTP_TIMEOUT: &'static str = "HTTP_TIMEOUT"
pub const HTTP_TIMEOUT: &'static str = "HTTP_TIMEOUT"
Timeout (in seconds) for HTTP requests. Equivalent to UV_HTTP_TIMEOUT.
Sourcepub const PYC_INVALIDATION_MODE: &'static str = "PYC_INVALIDATION_MODE"
pub const PYC_INVALIDATION_MODE: &'static str = "PYC_INVALIDATION_MODE"
The validation modes to use when run with --compile.
See PycInvalidationMode.
Sourcepub const VIRTUAL_ENV: &'static str = "VIRTUAL_ENV"
pub const VIRTUAL_ENV: &'static str = "VIRTUAL_ENV"
Used to detect an activated virtual environment.
Sourcepub const CONDA_PREFIX: &'static str = "CONDA_PREFIX"
pub const CONDA_PREFIX: &'static str = "CONDA_PREFIX"
Used to detect the path of an active Conda environment.
Sourcepub const CONDA_DEFAULT_ENV: &'static str = "CONDA_DEFAULT_ENV"
pub const CONDA_DEFAULT_ENV: &'static str = "CONDA_DEFAULT_ENV"
Used to determine the name of the active Conda environment.
Sourcepub const CONDA_ROOT: &'static str = "_CONDA_ROOT"
pub const CONDA_ROOT: &'static str = "_CONDA_ROOT"
Used to determine the root install path of Conda.
Sourcepub const DEPENDABOT: &'static str = "DEPENDABOT"
pub const DEPENDABOT: &'static str = "DEPENDABOT"
Used to determine if we’re running in Dependabot.
Sourcepub const VIRTUAL_ENV_DISABLE_PROMPT: &'static str = "VIRTUAL_ENV_DISABLE_PROMPT"
pub const VIRTUAL_ENV_DISABLE_PROMPT: &'static str = "VIRTUAL_ENV_DISABLE_PROMPT"
If set to 1 before a virtual environment is activated, then the
virtual environment name will not be prepended to the terminal prompt.
Sourcepub const PROMPT: &'static str = "PROMPT"
pub const PROMPT: &'static str = "PROMPT"
Used to detect the use of the Windows Command Prompt (as opposed to PowerShell).
Sourcepub const NU_VERSION: &'static str = "NU_VERSION"
pub const NU_VERSION: &'static str = "NU_VERSION"
Used to detect NuShell usage.
Sourcepub const FISH_VERSION: &'static str = "FISH_VERSION"
pub const FISH_VERSION: &'static str = "FISH_VERSION"
Used to detect Fish shell usage.
Sourcepub const BASH_VERSION: &'static str = "BASH_VERSION"
pub const BASH_VERSION: &'static str = "BASH_VERSION"
Used to detect Bash shell usage.
Sourcepub const ZSH_VERSION: &'static str = "ZSH_VERSION"
pub const ZSH_VERSION: &'static str = "ZSH_VERSION"
Used to detect Zsh shell usage.
Sourcepub const ZDOTDIR: &'static str = "ZDOTDIR"
pub const ZDOTDIR: &'static str = "ZDOTDIR"
Used to determine which .zshenv to use when Zsh is being used.
Sourcepub const KSH_VERSION: &'static str = "KSH_VERSION"
pub const KSH_VERSION: &'static str = "KSH_VERSION"
Used to detect Ksh shell usage.
Sourcepub const MACOSX_DEPLOYMENT_TARGET: &'static str = "MACOSX_DEPLOYMENT_TARGET"
pub const MACOSX_DEPLOYMENT_TARGET: &'static str = "MACOSX_DEPLOYMENT_TARGET"
Used with --python-platform macos and related variants to set the
deployment target (i.e., the minimum supported macOS version).
Defaults to 13.0, the least-recent non-EOL macOS version at time of writing.
Sourcepub const IPHONEOS_DEPLOYMENT_TARGET: &'static str = "IPHONEOS_DEPLOYMENT_TARGET"
pub const IPHONEOS_DEPLOYMENT_TARGET: &'static str = "IPHONEOS_DEPLOYMENT_TARGET"
Used with --python-platform arm64-apple-ios and related variants to set the
deployment target (i.e., the minimum supported iOS version).
Defaults to 13.0.
Sourcepub const ANDROID_API_LEVEL: &'static str = "ANDROID_API_LEVEL"
pub const ANDROID_API_LEVEL: &'static str = "ANDROID_API_LEVEL"
Used with --python-platform aarch64-linux-android and related variants to set the
Android API level. (i.e., the minimum supported Android API level).
Defaults to 24.
Sourcepub const NO_COLOR: &'static str = "NO_COLOR"
pub const NO_COLOR: &'static str = "NO_COLOR"
Disables colored output (takes precedence over FORCE_COLOR).
See no-color.org.
Sourcepub const FORCE_COLOR: &'static str = "FORCE_COLOR"
pub const FORCE_COLOR: &'static str = "FORCE_COLOR"
Forces colored output regardless of terminal support.
See force-color.org.
Sourcepub const CLICOLOR_FORCE: &'static str = "CLICOLOR_FORCE"
pub const CLICOLOR_FORCE: &'static str = "CLICOLOR_FORCE"
Use to control color via anstyle.
Sourcepub const LOCALAPPDATA: &'static str = "LOCALAPPDATA"
pub const LOCALAPPDATA: &'static str = "LOCALAPPDATA"
Used to look for Microsoft Store Pythons installations.
Sourcepub const GIT_DIR: &'static str = "GIT_DIR"
pub const GIT_DIR: &'static str = "GIT_DIR"
Path to the .git directory. Ignored by uv when performing fetch.
Sourcepub const GIT_WORK_TREE: &'static str = "GIT_WORK_TREE"
pub const GIT_WORK_TREE: &'static str = "GIT_WORK_TREE"
Path to the git working tree. Ignored by uv when performing fetch.
Sourcepub const GIT_INDEX_FILE: &'static str = "GIT_INDEX_FILE"
pub const GIT_INDEX_FILE: &'static str = "GIT_INDEX_FILE"
Path to the index file for staged changes. Ignored by uv when performing fetch.
Sourcepub const GIT_OBJECT_DIRECTORY: &'static str = "GIT_OBJECT_DIRECTORY"
pub const GIT_OBJECT_DIRECTORY: &'static str = "GIT_OBJECT_DIRECTORY"
Path to where git object files are located. Ignored by uv when performing fetch.
Sourcepub const GIT_ALTERNATE_OBJECT_DIRECTORIES: &'static str = "GIT_ALTERNATE_OBJECT_DIRECTORIES"
pub const GIT_ALTERNATE_OBJECT_DIRECTORIES: &'static str = "GIT_ALTERNATE_OBJECT_DIRECTORIES"
Alternate locations for git objects. Ignored by uv when performing fetch.
Sourcepub const GIT_SSL_NO_VERIFY: &'static str = "GIT_SSL_NO_VERIFY"
pub const GIT_SSL_NO_VERIFY: &'static str = "GIT_SSL_NO_VERIFY"
Disables SSL verification for git operations.
Sourcepub const GIT_ALLOW_PROTOCOL: &'static str = "GIT_ALLOW_PROTOCOL"
pub const GIT_ALLOW_PROTOCOL: &'static str = "GIT_ALLOW_PROTOCOL"
Sets allowed protocols for git operations.
When uv is in “offline” mode, only the “file” protocol is allowed.
Sourcepub const GIT_SSH_COMMAND: &'static str = "GIT_SSH_COMMAND"
pub const GIT_SSH_COMMAND: &'static str = "GIT_SSH_COMMAND"
Sets the SSH command used when Git tries to establish a connection using SSH.
Sourcepub const GIT_TERMINAL_PROMPT: &'static str = "GIT_TERMINAL_PROMPT"
pub const GIT_TERMINAL_PROMPT: &'static str = "GIT_TERMINAL_PROMPT"
Disable interactive git prompts in terminals, e.g., for credentials. Does not disable GUI prompts.
Sourcepub const GIT_CEILING_DIRECTORIES: &'static str = "GIT_CEILING_DIRECTORIES"
pub const GIT_CEILING_DIRECTORIES: &'static str = "GIT_CEILING_DIRECTORIES"
Used in tests for better git isolation.
For example, we run some tests in ~/.local/share/uv/tests.
And if the user’s $HOME directory is a git repository,
this will change the behavior of some tests. Setting
GIT_CEILING_DIRECTORIES=/home/andrew/.local/share/uv/tests will
prevent git from crawling up the directory tree past that point to find
parent git repositories.
Sourcepub const GITHUB_ACTIONS: &'static str = "GITHUB_ACTIONS"
pub const GITHUB_ACTIONS: &'static str = "GITHUB_ACTIONS"
Indicates that the current process is running in GitHub Actions.
uv publish may attempt trusted publishing flows when set
to true.
Sourcepub const GITLAB_CI: &'static str = "GITLAB_CI"
pub const GITLAB_CI: &'static str = "GITLAB_CI"
Indicates that the current process is running in GitLab CI.
uv publish may attempt trusted publishing flows when set
to true.
Sourcepub const PYTHONIOENCODING: &'static str = "PYTHONIOENCODING"
pub const PYTHONIOENCODING: &'static str = "PYTHONIOENCODING"
Sets the encoding for standard I/O streams (e.g., PYTHONIOENCODING=utf-8).
Sourcepub const PYTHONUNBUFFERED: &'static str = "PYTHONUNBUFFERED"
pub const PYTHONUNBUFFERED: &'static str = "PYTHONUNBUFFERED"
Forces unbuffered I/O streams, equivalent to -u in Python.
Sourcepub const PYTHONUTF8: &'static str = "PYTHONUTF8"
pub const PYTHONUTF8: &'static str = "PYTHONUTF8"
Enables UTF-8 mode for Python, equivalent to -X utf8.
Sourcepub const PYTHONPATH: &'static str = "PYTHONPATH"
pub const PYTHONPATH: &'static str = "PYTHONPATH"
Adds directories to Python module search path (e.g., PYTHONPATH=/path/to/modules).
Sourcepub const LC_ALL: &'static str = "LC_ALL"
pub const LC_ALL: &'static str = "LC_ALL"
Used in tests to enforce a consistent locale setting.
Sourcepub const BUILD_BUILDID: &'static str = "BUILD_BUILDID"
pub const BUILD_BUILDID: &'static str = "BUILD_BUILDID"
Azure DevOps build identifier, used to detect CI environments.
Sourcepub const BUILD_ID: &'static str = "BUILD_ID"
pub const BUILD_ID: &'static str = "BUILD_ID"
Generic build identifier, used to detect CI environments.
Sourcepub const PIP_IS_CI: &'static str = "PIP_IS_CI"
pub const PIP_IS_CI: &'static str = "PIP_IS_CI"
Pip environment variable to indicate CI environment.
Sourcepub const PAGER: &'static str = "PAGER"
pub const PAGER: &'static str = "PAGER"
The standard PAGER posix env var. Used by uv to configure the appropriate pager.
Sourcepub const JPY_SESSION_NAME: &'static str = "JPY_SESSION_NAME"
pub const JPY_SESSION_NAME: &'static str = "JPY_SESSION_NAME"
Used to detect when running inside a Jupyter notebook.
Sourcepub const TRACING_DURATIONS_TEST_ROOT: &'static str = "TRACING_DURATIONS_TEST_ROOT"
pub const TRACING_DURATIONS_TEST_ROOT: &'static str = "TRACING_DURATIONS_TEST_ROOT"
Use to create the tracing root directory via the tracing-durations-export feature.
Sourcepub const TRACING_DURATIONS_FILE: &'static str = "TRACING_DURATIONS_FILE"
pub const TRACING_DURATIONS_FILE: &'static str = "TRACING_DURATIONS_FILE"
Use to create the tracing durations file via the tracing-durations-export feature.
Sourcepub const TARGET: &'static str = "TARGET"
pub const TARGET: &'static str = "TARGET"
Used to set RUST_HOST_TARGET at build time via build.rs.
Sourcepub const RUST_LOG: &'static str = "RUST_LOG"
pub const RUST_LOG: &'static str = "RUST_LOG"
If set, uv will use this value as the log level for its --verbose output. Accepts
any filter compatible with the tracing_subscriber crate.
For example:
RUST_LOG=uv=debugis the equivalent of adding--verboseto the command lineRUST_LOG=tracewill enable trace-level logging.
See the tracing documentation for more.
Sourcepub const RUST_BACKTRACE: &'static str = "RUST_BACKTRACE"
pub const RUST_BACKTRACE: &'static str = "RUST_BACKTRACE"
If set, it can be used to display more stack trace details when a panic occurs. This is used by uv particularly on windows to show more details during a platform exception.
For example:
RUST_BACKTRACE=1will print a short backtrace.RUST_BACKTRACE=fullwill print a full backtrace.
See the Rust backtrace documentation for more.
Sourcepub const UV_LOG_CONTEXT: &'static str = "UV_LOG_CONTEXT"
pub const UV_LOG_CONTEXT: &'static str = "UV_LOG_CONTEXT"
Add additional context and structure to log messages.
If logging is not enabled, e.g., with RUST_LOG or -v, this has no effect.
Sourcepub const UV_STACK_SIZE: &'static str = "UV_STACK_SIZE"
pub const UV_STACK_SIZE: &'static str = "UV_STACK_SIZE"
Use to set the stack size used by uv.
The value is in bytes, and if both UV_STACK_SIZE are RUST_MIN_STACK unset, uv uses a 4MB
(4194304) stack. UV_STACK_SIZE takes precedence over RUST_MIN_STACK.
Unlike the normal RUST_MIN_STACK semantics, this can affect main thread
stack size, because we actually spawn our own main2 thread to work around
the fact that Windows’ real main thread is only 1MB. That thread has size
max(UV_STACK_SIZE, 1MB).
Sourcepub const RUST_MIN_STACK: &'static str = "RUST_MIN_STACK"
pub const RUST_MIN_STACK: &'static str = "RUST_MIN_STACK"
Use to set the stack size used by uv.
The value is in bytes, and if both UV_STACK_SIZE are RUST_MIN_STACK unset, uv uses a 4MB
(4194304) stack. UV_STACK_SIZE takes precedence over RUST_MIN_STACK.
Prefer setting UV_STACK_SIZE, since RUST_MIN_STACK also affects subprocesses, such as
build backends that use Rust code.
Unlike the normal RUST_MIN_STACK semantics, this can affect main thread
stack size, because we actually spawn our own main2 thread to work around
the fact that Windows’ real main thread is only 1MB. That thread has size
max(RUST_MIN_STACK, 1MB).
Sourcepub const CARGO_MANIFEST_DIR: &'static str = "CARGO_MANIFEST_DIR"
pub const CARGO_MANIFEST_DIR: &'static str = "CARGO_MANIFEST_DIR"
The directory containing the Cargo.toml manifest for a package.
Sourcepub const CARGO_TARGET_DIR: &'static str = "CARGO_TARGET_DIR"
pub const CARGO_TARGET_DIR: &'static str = "CARGO_TARGET_DIR"
Specifies the directory where Cargo stores build artifacts (target directory).
Sourcepub const URL: &'static str = "URL"
pub const URL: &'static str = "URL"
Used in tests for environment substitution testing in requirements.in.
Sourcepub const FILE_PATH: &'static str = "FILE_PATH"
pub const FILE_PATH: &'static str = "FILE_PATH"
Used in tests for environment substitution testing in requirements.in.
Sourcepub const HATCH_PATH: &'static str = "HATCH_PATH"
pub const HATCH_PATH: &'static str = "HATCH_PATH"
Used in tests for environment substitution testing in requirements.in.
Sourcepub const BLACK_PATH: &'static str = "BLACK_PATH"
pub const BLACK_PATH: &'static str = "BLACK_PATH"
Used in tests for environment substitution testing in requirements.in.
Sourcepub const EXPECTED_ANYIO_VERSION: &'static str = "EXPECTED_ANYIO_VERSION"
pub const EXPECTED_ANYIO_VERSION: &'static str = "EXPECTED_ANYIO_VERSION"
Used in testing extra build dependencies.
Sourcepub const KEYRING_TEST_CREDENTIALS: &'static str = "KEYRING_TEST_CREDENTIALS"
pub const KEYRING_TEST_CREDENTIALS: &'static str = "KEYRING_TEST_CREDENTIALS"
Used to set test credentials for keyring tests.
Sourcepub const UV_TEST_NO_HTTP_RETRY_DELAY: &'static str = "UV_TEST_NO_HTTP_RETRY_DELAY"
pub const UV_TEST_NO_HTTP_RETRY_DELAY: &'static str = "UV_TEST_NO_HTTP_RETRY_DELAY"
Used to disable delay for HTTP retries in tests.
Sourcepub const UV_TEST_PACKSE_INDEX: &'static str = "UV_TEST_PACKSE_INDEX"
pub const UV_TEST_PACKSE_INDEX: &'static str = "UV_TEST_PACKSE_INDEX"
Used to set a packse index url for tests.
Sourcepub const UV_INDEX_MY_INDEX_USERNAME: &'static str = "UV_INDEX_MY_INDEX_USERNAME"
pub const UV_INDEX_MY_INDEX_USERNAME: &'static str = "UV_INDEX_MY_INDEX_USERNAME"
Used for testing named indexes in tests.
Sourcepub const UV_INDEX_MY_INDEX_PASSWORD: &'static str = "UV_INDEX_MY_INDEX_PASSWORD"
pub const UV_INDEX_MY_INDEX_PASSWORD: &'static str = "UV_INDEX_MY_INDEX_PASSWORD"
Used for testing named indexes in tests.
Sourcepub const UV_GITHUB_FAST_PATH_URL: &'static str = "UV_GITHUB_FAST_PATH_URL"
pub const UV_GITHUB_FAST_PATH_URL: &'static str = "UV_GITHUB_FAST_PATH_URL"
Used to set the GitHub fast-path url for tests.
Sourcepub const UV_TEST_NO_CLI_PROGRESS: &'static str = "UV_TEST_NO_CLI_PROGRESS"
pub const UV_TEST_NO_CLI_PROGRESS: &'static str = "UV_TEST_NO_CLI_PROGRESS"
Hide progress messages with non-deterministic order in tests.
Sourcepub const UV_ENV_FILE: &'static str = "UV_ENV_FILE"
pub const UV_ENV_FILE: &'static str = "UV_ENV_FILE"
.env files from which to load environment variables when executing uv run commands.
Sourcepub const UV_NO_ENV_FILE: &'static str = "UV_NO_ENV_FILE"
pub const UV_NO_ENV_FILE: &'static str = "UV_NO_ENV_FILE"
Ignore .env files when executing uv run commands.
Sourcepub const UV_INSTALLER_GITHUB_BASE_URL: &'static str = "UV_INSTALLER_GITHUB_BASE_URL"
pub const UV_INSTALLER_GITHUB_BASE_URL: &'static str = "UV_INSTALLER_GITHUB_BASE_URL"
The URL from which to download uv using the standalone installer and self update feature,
in lieu of the default GitHub URL.
Sourcepub const UV_INSTALLER_GHE_BASE_URL: &'static str = "UV_INSTALLER_GHE_BASE_URL"
pub const UV_INSTALLER_GHE_BASE_URL: &'static str = "UV_INSTALLER_GHE_BASE_URL"
The URL from which to download uv using the standalone installer and self update feature,
in lieu of the default GitHub Enterprise URL.
Sourcepub const UV_INSTALL_DIR: &'static str = "UV_INSTALL_DIR"
pub const UV_INSTALL_DIR: &'static str = "UV_INSTALL_DIR"
The directory in which to install uv using the standalone installer and self update feature.
Defaults to ~/.local/bin.
Sourcepub const UV_UNMANAGED_INSTALL: &'static str = "UV_UNMANAGED_INSTALL"
pub const UV_UNMANAGED_INSTALL: &'static str = "UV_UNMANAGED_INSTALL"
Used ephemeral environments like CI to install uv to a specific path while preventing the installer from modifying shell profiles or environment variables.
Sourcepub const UV_DOWNLOAD_URL: &'static str = "UV_DOWNLOAD_URL"
pub const UV_DOWNLOAD_URL: &'static str = "UV_DOWNLOAD_URL"
The URL from which to download uv using the standalone installer. By default, installs from
uv’s GitHub Releases. INSTALLER_DOWNLOAD_URL is also supported as an alias, for backwards
compatibility.
Sourcepub const UV_NO_MODIFY_PATH: &'static str = "UV_NO_MODIFY_PATH"
pub const UV_NO_MODIFY_PATH: &'static str = "UV_NO_MODIFY_PATH"
Avoid modifying the PATH environment variable when installing uv using the standalone
installer and self update feature. INSTALLER_NO_MODIFY_PATH is also supported as an
alias, for backwards compatibility.
Sourcepub const UV_NO_INSTALLER_METADATA: &'static str = "UV_NO_INSTALLER_METADATA"
pub const UV_NO_INSTALLER_METADATA: &'static str = "UV_NO_INSTALLER_METADATA"
Skip writing uv installer metadata files (e.g., INSTALLER, REQUESTED, and direct_url.json) to site-packages .dist-info directories.
Sourcepub const UV_GIT_LFS: &'static str = "UV_GIT_LFS"
pub const UV_GIT_LFS: &'static str = "UV_GIT_LFS"
Enables fetching files stored in Git LFS when installing a package from a Git repository.
Sourcepub const UV_RUN_RECURSION_DEPTH: &'static str = "UV_RUN_RECURSION_DEPTH"
pub const UV_RUN_RECURSION_DEPTH: &'static str = "UV_RUN_RECURSION_DEPTH"
Number of times that uv run has been recursively invoked. Used to guard against infinite
recursion, e.g., when `uv run`` is used in a script shebang.
Sourcepub const UV_RUN_MAX_RECURSION_DEPTH: &'static str = "UV_RUN_MAX_RECURSION_DEPTH"
pub const UV_RUN_MAX_RECURSION_DEPTH: &'static str = "UV_RUN_MAX_RECURSION_DEPTH"
Number of times that uv run will allow recursive invocations, before exiting with an
error.
Sourcepub const COLUMNS: &'static str = "COLUMNS"
pub const COLUMNS: &'static str = "COLUMNS"
Overrides terminal width used for wrapping. This variable is not read by uv directly.
This is a quasi-standard variable, described, e.g., in ncurses(3x).
Sourcepub const UV_CUDA_DRIVER_VERSION: &'static str = "UV_CUDA_DRIVER_VERSION"
pub const UV_CUDA_DRIVER_VERSION: &'static str = "UV_CUDA_DRIVER_VERSION"
The CUDA driver version to assume when inferring the PyTorch backend (e.g., 550.144.03).
Sourcepub const UV_AMD_GPU_ARCHITECTURE: &'static str = "UV_AMD_GPU_ARCHITECTURE"
pub const UV_AMD_GPU_ARCHITECTURE: &'static str = "UV_AMD_GPU_ARCHITECTURE"
The AMD GPU architecture to assume when inferring the PyTorch backend (e.g., gfx1100).
Sourcepub const UV_TORCH_BACKEND: &'static str = "UV_TORCH_BACKEND"
pub const UV_TORCH_BACKEND: &'static str = "UV_TORCH_BACKEND"
Equivalent to the --torch-backend command-line argument (e.g., cpu, cu126, or auto).
Sourcepub const UV_PROJECT: &'static str = "UV_PROJECT"
pub const UV_PROJECT: &'static str = "UV_PROJECT"
Equivalent to the --project command-line argument.
Sourcepub const UV_WORKING_DIRECTORY: &'static str = "UV_WORKING_DIRECTORY"
pub const UV_WORKING_DIRECTORY: &'static str = "UV_WORKING_DIRECTORY"
Equivalent to the --directory command-line argument.
Sourcepub const UV_NO_GITHUB_FAST_PATH: &'static str = "UV_NO_GITHUB_FAST_PATH"
pub const UV_NO_GITHUB_FAST_PATH: &'static str = "UV_NO_GITHUB_FAST_PATH"
Disable GitHub-specific requests that allow uv to skip git fetch in some circumstances.
Sourcepub const HF_TOKEN: &'static str = "HF_TOKEN"
pub const HF_TOKEN: &'static str = "HF_TOKEN"
Authentication token for Hugging Face requests. When set, uv will use this token
when making requests to https://huggingface.co/ and any subdomains.
Sourcepub const UV_NO_HF_TOKEN: &'static str = "UV_NO_HF_TOKEN"
pub const UV_NO_HF_TOKEN: &'static str = "UV_NO_HF_TOKEN"
Disable Hugging Face authentication, even if HF_TOKEN is set.
Sourcepub const UV_S3_ENDPOINT_URL: &'static str = "UV_S3_ENDPOINT_URL"
pub const UV_S3_ENDPOINT_URL: &'static str = "UV_S3_ENDPOINT_URL"
The URL to treat as an S3-compatible storage endpoint. Requests to this endpoint
will be signed using AWS Signature Version 4 based on the AWS_ACCESS_KEY_ID,
AWS_SECRET_ACCESS_KEY, AWS_PROFILE, and AWS_CONFIG_FILE environment variables.
Sourcepub const PYX_API_URL: &'static str = "PYX_API_URL"
pub const PYX_API_URL: &'static str = "PYX_API_URL"
The URL of the pyx Simple API server.
Sourcepub const PYX_CDN_DOMAIN: &'static str = "PYX_CDN_DOMAIN"
pub const PYX_CDN_DOMAIN: &'static str = "PYX_CDN_DOMAIN"
The domain of the pyx CDN.
Sourcepub const PYX_API_KEY: &'static str = "PYX_API_KEY"
pub const PYX_API_KEY: &'static str = "PYX_API_KEY"
The pyx API key (e.g., sk-pyx-...).
Sourcepub const UV_API_KEY: &'static str = "UV_API_KEY"
pub const UV_API_KEY: &'static str = "UV_API_KEY"
The pyx API key, for backwards compatibility.
Sourcepub const PYX_AUTH_TOKEN: &'static str = "PYX_AUTH_TOKEN"
pub const PYX_AUTH_TOKEN: &'static str = "PYX_AUTH_TOKEN"
The pyx authentication token (e.g., eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...), as output by uv auth token.
Sourcepub const UV_AUTH_TOKEN: &'static str = "UV_AUTH_TOKEN"
pub const UV_AUTH_TOKEN: &'static str = "UV_AUTH_TOKEN"
The pyx authentication token, for backwards compatibility.
Sourcepub const PYX_CREDENTIALS_DIR: &'static str = "PYX_CREDENTIALS_DIR"
pub const PYX_CREDENTIALS_DIR: &'static str = "PYX_CREDENTIALS_DIR"
Specifies the directory where uv stores pyx credentials.
Sourcepub const AWS_REGION: &'static str = "AWS_REGION"
pub const AWS_REGION: &'static str = "AWS_REGION"
The AWS region to use when signing S3 requests.
Sourcepub const AWS_DEFAULT_REGION: &'static str = "AWS_DEFAULT_REGION"
pub const AWS_DEFAULT_REGION: &'static str = "AWS_DEFAULT_REGION"
The default AWS region to use when signing S3 requests, if AWS_REGION is not set.
Sourcepub const AWS_ACCESS_KEY_ID: &'static str = "AWS_ACCESS_KEY_ID"
pub const AWS_ACCESS_KEY_ID: &'static str = "AWS_ACCESS_KEY_ID"
The AWS access key ID to use when signing S3 requests.
Sourcepub const AWS_SECRET_ACCESS_KEY: &'static str = "AWS_SECRET_ACCESS_KEY"
pub const AWS_SECRET_ACCESS_KEY: &'static str = "AWS_SECRET_ACCESS_KEY"
The AWS secret access key to use when signing S3 requests.
Sourcepub const AWS_SESSION_TOKEN: &'static str = "AWS_SESSION_TOKEN"
pub const AWS_SESSION_TOKEN: &'static str = "AWS_SESSION_TOKEN"
The AWS session token to use when signing S3 requests.
Sourcepub const AWS_PROFILE: &'static str = "AWS_PROFILE"
pub const AWS_PROFILE: &'static str = "AWS_PROFILE"
The AWS profile to use when signing S3 requests.
Sourcepub const AWS_CONFIG_FILE: &'static str = "AWS_CONFIG_FILE"
pub const AWS_CONFIG_FILE: &'static str = "AWS_CONFIG_FILE"
The AWS config file to use when signing S3 requests.
Sourcepub const AWS_SHARED_CREDENTIALS_FILE: &'static str = "AWS_SHARED_CREDENTIALS_FILE"
pub const AWS_SHARED_CREDENTIALS_FILE: &'static str = "AWS_SHARED_CREDENTIALS_FILE"
The AWS shared credentials file to use when signing S3 requests.
Sourcepub const UV_SKIP_WHEEL_FILENAME_CHECK: &'static str = "UV_SKIP_WHEEL_FILENAME_CHECK"
pub const UV_SKIP_WHEEL_FILENAME_CHECK: &'static str = "UV_SKIP_WHEEL_FILENAME_CHECK"
Avoid verifying that wheel filenames match their contents when installing wheels. This is not recommended, as wheels with inconsistent filenames should be considered invalid and corrected by the relevant package maintainers; however, this option can be used to work around invalid artifacts in rare cases.
Sourcepub fn index_username(name: &str) -> String
pub fn index_username(name: &str) -> String
Provides the HTTP Basic authentication username for a named index.
The name parameter is the name of the index. For example, given an index named foo,
the environment variable key would be UV_INDEX_FOO_USERNAME.
Sourcepub fn index_password(name: &str) -> String
pub fn index_password(name: &str) -> String
Provides the HTTP Basic authentication password for a named index.
The name parameter is the name of the index. For example, given an index named foo,
the environment variable key would be UV_INDEX_FOO_PASSWORD.