Install & Compatibility
Where this runs
tested against v0.2.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.054s · 17.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.050s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
BackendManager
✓ from pyvers import BackendManager
✗ from pyvers import Pyvers
get_backend
✓ from pyvers import get_backend
register_backend
✓ from pyvers import register_backend
This quickstart demonstrates how to initialize a Pyvers project, add a dependency to its configuration, list current dependencies, and then install them into the local `.pyvers` environment. It sets up a temporary directory to avoid affecting your current workspace.
import os
import shutil
import json
from pyvers import Pyvers
temp_project_name = "my_pyvers_project_quickstart"
project_root = os.path.join(os.getcwd(), temp_project_name)
# Clean up previous run if exists
if os.path.exists(project_root):
shutil.rmtree(project_root)
os.makedirs(project_root)
print(f"Created temporary project directory: {project_root}")
try:
pyvers_manager = Pyvers(project_path=project_root)
# 1. Initialize the Pyvers project
print("Initializing Pyvers project...")
pyvers_manager.init()
print(f"Pyvers project initialized at {os.path.join(project_root, '.pyvers')}")
# 2. Add a dependency to the pyvers.json config
dep_name = "requests"
dep_version = "2.28.1"
print(f"Adding dependency: {dep_name}@{dep_version} (type='prod')...")
pyvers_manager.add_dependency(name=dep_name, version=dep_version, dep_type="prod")
print(f"Dependency '{dep_name}' added to config.")
# 3. List dependencies from the config
print("\nListing dependencies from config:")
deps = pyvers_manager.list_dependencies()
if deps:
for dep in deps:
print(f" - {dep.name} @ {dep.version} ({dep.type})")
else:
print(" No dependencies found in config.")
# 4. Install dependencies (creates/updates local virtual environment)
print("\nInstalling dependencies...")
# In a real scenario, this would install the added 'requests' package into '.pyvers/env'
# For this quickstart, we just demonstrate the call.
pyvers_manager.install()
print("Dependencies installed to local .pyvers environment.")
finally:
# Clean up the temporary directory
if os.path.exists(project_root):
shutil.rmtree(project_root)
print(f"\nCleaned up temporary project directory: {project_root}")
pyvers --version
Upgrade
Version history
0.2.3latest on PyPI · released Jul 9, 2026
Audit
Dependencies
pydanticrequiredUsed for data validation and settings management within the library.
requestsrequiredUsed for making HTTP requests, likely for fetching package information.