Skip to main content

A simple Windows utility to create or activate a Python virtual environment in the current CMD shell.

Project description

MyVenv

MyVenv is a simple Windows utility that helps you create or activate a Python virtual environment directly in the current CMD shell. With MyVenv, you can streamline your virtual environment management workflow using a single command.

Features

  • Automatically creates a virtual environment if it doesn't exist.
  • Activates the virtual environment in the current CMD shell.
  • Adds the virtual environment folder to .gitignore to prevent accidental commits.

Installation

You can install MyVenv via pip:

pip install myvenv

Usage

After installing MyVenv, you can use the myvenv.bat script in your terminal to create or activate a virtual environment.

Command Syntax

myvenv [ENV_NAME]
  • ENV_NAME (optional): The name of the virtual environment folder. Defaults to venv if not provided.

Examples

Create and Activate Default Virtual Environment

myvenv

This creates (if it doesn't already exist) and activates a virtual environment named venv.

Create and Activate a Custom Virtual Environment

myvenv mycustomenv

This creates (if it doesn't already exist) and activates a virtual environment named mycustomenv.

How It Works

  1. Environment Name: The script checks for the provided environment name or defaults to venv.
  2. Virtual Environment Creation: If the specified folder doesn't exist, it creates a virtual environment using python -m venv.
  3. Git Ignore Update: The script ensures the virtual environment folder is listed in .gitignore to prevent accidental commits.
  4. Activation: The script activates the virtual environment in the current CMD shell.

Project Structure

  • myvenv.bat: Batch script for managing virtual environments.
  • setup.py: Python setup script for packaging and distribution.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! If you have suggestions or improvements, feel free to submit a pull request or open an issue.

Author

ILikeAI (Josh)
GitHub Profile

joshlikesai@gmail.com

Feedback

If you encounter any issues or have ideas for improvement, please let us know by creating an issue in the GitHub repository.

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

myvenv-0.1.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

myvenv-0.1.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file myvenv-0.1.0.tar.gz.

File metadata

  • Download URL: myvenv-0.1.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for myvenv-0.1.0.tar.gz
Algorithm Hash digest
SHA256 62c54245cecf0e19161a1c7e0ad6775a25cda7e993c787d20b2021ea3e7770a1
MD5 1b4d17bf700aa795b29b1a5f86f3a2f4
BLAKE2b-256 24f143e97eb2842bb0284e3628260f7a2e88a7dcb7bfeba55902db83485fb5b1

See more details on using hashes here.

File details

Details for the file myvenv-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: myvenv-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for myvenv-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29d9584061d92f0542505022ea152d6d3a4660f5a5e28437d8fb2680c0652fae
MD5 907a0929d0236a0da9251be364cdba69
BLAKE2b-256 2417f1e3914958fa8ab79bf127c5998fb5cf1a5d7e25d8df7d8c8e3c624c537e

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