Skip to main content

Python API for interacting with virtual environments.

Why?

The only real interface provided by a virtual environment is the CLI. This package wraps the command line tools to provide a more friendly programmatic interface.

Creating A Venv

from venvctrl import api

api.VirtualEnvironment('/some/path/here').create()

Installing Packages

from venvctrl import api

venv = api.VirtualEnvironment('/some/existing/venv')
if not venv.has_package('venvctrl'):

    venv.install_package('venvctrl')

else:

    venv.uninstall_package('venvctrl')

Moving A Venv

from venvctrl import api

venv = api.VirtualEnvironment('/some/existing/venv')
venv.move('/some/new/path')

Alternatively, use the CLI.

venvctrl-relocate \
    --source=/some/existing/venv \
    --destination=/some/new/path \
    --move

License

(MIT License)

Copyright (C) 2015 Kevin Conway

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.

Contributing

All contributions to this project are protected under the agreement found in the CONTRIBUTING file. All contributors should read the agreement but, as a summary:

You give us the rights to maintain and distribute your code and we promise
to maintain an open source distribution of anything you contribute.

Metadata

Release files for venvctrl 0.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for venvctrl 0.10.0
File Size Uploaded Provenance
venvctrl-0.10.0.tar.gz 12.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for venvctrl 0.10.0
File Interpreter ABI Platform
venvctrl-0.10.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.4 kB

Release files / venvctrl-0.10.0.tar.gz

Download URL venvctrl-0.10.0.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f4acf41b355c10ad6ec4a829fd5bee4f9c62009dcf9dffada8e99d26cecb22f5
BLAKE2b-256 checksum
How to use checksums
03f9dffc4c0990f2c2fe26650dc6f73d1d86f92e49375f2fe3ce457f45db4ce0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release files / venvctrl-0.10.0-py3-none-any.whl

Download URL venvctrl-0.10.0-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb8c9ecfa96105eeb5d0d43b7a4f6c02bfe96b05bf1a97d0af7d9ee3423416ec
BLAKE2b-256 checksum
How to use checksums
c1f2d0bba20941fe0826aa8fe66cc5162c4f68ae5a1a8d0c7434c5d7d4e5ecb2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Security for venvctrl 0.10.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page