Skip to main content

command line utility tool that allows you to create python virtual environements with already installed dependencies you want easily

Project description

GENENV

This command line utility tool allows you to create python virtual environements with already installed dependencies you want easily!

Features

  • You can create virtual environments with pre-installed packages that you specify in command line
  • Instead of providing package name on command line, you can add a template.txt file containing names of packages you want intalled
  • Install packages in already existing virtual environments without having to activate them
  • you can create virtual environments with no packages installed.

How it works

Essentially, the process of virtual environments creation and installation of packages is done in the bash script .createnv.sh. The bash script is called as a subprocessin the python file. Click is used to provide a CLI interface and collect arguments from the command line to pass into bash script when its being called.

Usage

  • Install with pip
pip install genenv

NOTE:

  1. if you specify package names on command line and template.txt file exits ,template.txt file will be ignored.
  2. if no template.txt file or package name(s) are provided as on command line as arguments, you'll recieve prompt if you still want to proceed to create virtual environment with no preinstalled dependencies.
  3. To use contents of template.txt file , do not provide any package names after you specify environment name

Creating a virtual environment with name meseeks with django and flask installed

  • specifying dependecies on command line
genv -n meseeks flask django

Creating a virtual environment with name meseeks with dependencies specified in template.txt file

  • create a file with name template.txt in same directory you will run command
  • Add package names to it
genv -n meseeks 

It detects and reads contents template.txt file then installs package names specified inside. If template.txt file is available and empty, environemnt is created with no installed dependencies.

Installing dependecies/packages in already existing virtual environment

  • specify the name option flag as the name of the environment you want to install package in
  • if you want to install numpy in an existing virtual environment called pluto

make sure youre in directory that venv is located then run

 
genv -n pluto  numpy
  • run genenv --help to bring up help menu
Usage: genenv [OPTIONS] [DEPENDENCIES]...

  specify package names after name flag to install them,read documentation for
  how that works

Options:
  -n, --name TEXT  provide name to be used for your virtual environment
                   [required]
  --help           Show this message and exit.

Contributing

  • Fork this repository to your GitHub account.
  • Clone the forked repository to your local machine.
  • Create a new branch for the feature you want to work on.
  • Make your contributions.
  • Push your local branch to your remote repository.
  • Open a pull request to the develop branch of this repository.

Setting up the tool for local development

  • Clone this repository to your local machine.

  • Create a virtual environment for your project and activate it. Install all dependencies from requirements.txt file.

  • In the root directory of the project, develop the project locally from the setup configuration.

python3 setup.py develop
  • you can now run commands using genv

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

genenv-1.0.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

genenv-1.0.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file genenv-1.0.2.tar.gz.

File metadata

  • Download URL: genenv-1.0.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for genenv-1.0.2.tar.gz
Algorithm Hash digest
SHA256 8904a976aea9a945291c29e9d45c0a00529239a18a2cabc739f103a7983d33f1
MD5 08dcfc71fb61103da73151aeca6ccc50
BLAKE2b-256 2290f356ad34b4237dd191bae189ab7ecd03cdfec3f358cb110713574dec48d6

See more details on using hashes here.

File details

Details for the file genenv-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: genenv-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for genenv-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 347dde3601032b8592edcb00cc99940a8b08f07b2e0f3804d717d3734f6fc716
MD5 0d025ff9478f4565890602ce9ea7bd33
BLAKE2b-256 767a4a87518771a305ad267834b50487a13df2eddbca9ab1b66218192772fd0b

See more details on using hashes here.

Supported by

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