Registry / devops / pyvers

pyvers

JSON →
library0.2.3pypypi✓ verified 25d ago

Pyvers is a Python library designed to manage multiple versions of project dependencies locally within a `.pyvers` directory. It helps isolate project environments and ensures consistent dependency versions across development teams. The current version is 0.2.2, with releases occurring periodically, focusing on core functionality and stability.

pip install pyvers
INSTALL
IMPORT
SIG · PYVERS
P
pyvers
devopspythonv0.2.3
Install
1.5s avg
Import
52ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.054s · 17.9MB
glibc
py 3.103.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
Debug
Known issues
gotchaWhen initializing `Pyvers`, ensure you explicitly provide `project_path` (e.g., `Pyvers(project_path=os.getcwd())`). If omitted, it defaults to the current working directory (`os.getcwd()`), which might not be the intended project root, leading to `.pyvers` directories being created in unexpected locations.
fix
Always pass the desired project root: `pyvers_instance = Pyvers(project_path='/path/to/your/project')`.
affects: All versions
gotchaThe `add_dependency` method requires a `dep_type` parameter (e.g., 'prod', 'dev', 'test'). Forgetting this or providing an unrecognized type will result in an error, as the library enforces specific dependency categories.
fix
Specify the dependency type: `pyvers_manager.add_dependency(name='requests', version='2.28.1', dep_type='prod')`.
affects: All versions
gotchaAdding a dependency via `add_dependency` only updates the `pyvers.json` configuration file. To actually install the specified packages into the local `.pyvers` virtual environment, you must explicitly call `pyvers_manager.install()` afterward.
fix
After adding dependencies, run `pyvers_manager.install()` to synchronize the environment with the configuration.
affects: All versions
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.
Agent activity
14 hits · last 30 days
node
12
Resources
pyvers — pip install pyvers · libregistry