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.9.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

venvctrl-0.9.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: venvctrl-0.9.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for venvctrl-0.9.0.tar.gz
Algorithm Hash digest
SHA256 28279776719f0e314b56eb4283262c773a174ba43af77e4338b2ca0f45b39243
MD5 34224847509150b5c1c707964b04f5f0
BLAKE2b-256 b5dc07472166f57c27dba6660f64cb272e0ed028062457b93c9bbabe7e1608e9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: venvctrl-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for venvctrl-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f986d29f17051d399e463381bd2f6615f87847a54c431491b963571b49e84d9
MD5 e9ce3e0d98fe93ed75acede0ca3c2fbb
BLAKE2b-256 cc181d6914fba1c81456ff112c200fbbf3ac00ca5743fd0983969c1e8c31be90

See more details on using hashes here.

Supported by

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