Skip to main content

API for virtual environments.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

venvctrl-0.10.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

venvctrl-0.10.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file venvctrl-0.10.0.tar.gz.

File metadata

  • Download URL: venvctrl-0.10.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for venvctrl-0.10.0.tar.gz
Algorithm Hash digest
SHA256 f4acf41b355c10ad6ec4a829fd5bee4f9c62009dcf9dffada8e99d26cecb22f5
MD5 51b94c00ba79c8e157562d984f5b5683
BLAKE2b-256 03f9dffc4c0990f2c2fe26650dc6f73d1d86f92e49375f2fe3ce457f45db4ce0

See more details on using hashes here.

File details

Details for the file venvctrl-0.10.0-py3-none-any.whl.

File metadata

  • Download URL: venvctrl-0.10.0-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for venvctrl-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb8c9ecfa96105eeb5d0d43b7a4f6c02bfe96b05bf1a97d0af7d9ee3423416ec
MD5 0356ee98f8da8e5e936578777d086860
BLAKE2b-256 c1f2d0bba20941fe0826aa8fe66cc5162c4f68ae5a1a8d0c7434c5d7d4e5ecb2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page