# Virtual Environment Manager
A comprehensive Python package for managing virtual environments, providing equivalent functionality to the bash `venv.sh` script with enhanced features.
## Features
- **Environment Creation**: Create virtual environments using `uv`, `python3`, or `python` with automatic fallback
- **Smart Activation**: Activate environments with directory mapping for auto-activation
- **Package Management**: Install, uninstall, update, and search packages using `uv` or `pip`
- **History Tracking**: Track directory-to-environment mappings for automatic activation
- **Cross-Platform**: Works on Linux, macOS, and Windows with Python 3.7+
## Installation
### From Source
```bash
pip install git+https://github.com/anhvth/uv-virtual-environs-manager
```
### From PyPI (once published)
```bash
pip install pyve
```
## Quick Start
```bash
# Create a new virtual environment
ve create myproject --python=3.12
# Activate an environment (creates directory mapping)
atv myproject
# List all environments
ve list
# Install packages
ve install requests numpy
# Show environment info
ve info
# Auto-activation: when you cd back to this directory,
# the environment will be suggested for activation
```
## Commands
### Main Commands
- `ve create <name> [options]` - Create a new virtual environment
- `ve activate <name>` - Activate a virtual environment
- `ve deactivate` - Deactivate current virtual environment
- `ve list` - List all virtual environments
- `ve delete <name>` - Delete a virtual environment
- `ve info` - Show current virtual environment info
- `ve which <name>` - Show path to virtual environment
### Package Management
- `ve install <pkg>...` - Install packages in active venv
- `ve installed` - List installed packages in active venv
- `ve uninstall <pkg>...` - Uninstall packages from active venv
- `ve search <pkg>` - Search for packages on PyPI
- `ve update <pkg>...` - Update packages in active venv
- `ve run <cmd>...` - Run command in active venv
### History & Auto-Activation
- `ve history` - Show directory → environment mappings
- `ve clear-history` - Clear all atv history
- `atv <name>` - Activate with directory mapping (alias for `ve activate`)
### Utility Commands
- `create_env <name>` - Alternative create command
- `install_uv` - Install uv package manager
## Configuration
The package uses the following files for tracking:
- `~/.venv_all_env` - Global environment tracking
- `~/.config/atv_history` - Directory-to-environment mappings
- `~/.venvs/` - Default location for virtual environments
- `~/.last_venv` - Last activated environment
## Shell Integration
For full shell integration (auto-activation on directory change), add this to your shell configuration:
### Zsh
```bash
# Add to ~/.zshrc
eval "$(ve shell-integration zsh)" # Future feature
```
### Bash
```bash
# Add to ~/.bashrc
eval "$(ve shell-integration bash)" # Future feature
```
## Auto-Activation
When you use `atv <name>` to activate an environment, the current directory is mapped to that environment. When you navigate back to that directory later, you'll be reminded to activate the environment.
## Examples
```bash
# Create a new project environment
ve create myproject --python=3.12
cd /path/to/myproject
# Install dependencies
ve install requests flask pytest
# Later, when you cd back to the project
cd /path/to/myproject
# The tool will remind you about the mapped environment
# View all mappings
# Clean up
ve delete myproject
```
## Differences from Shell Version
- **Shell Integration**: The Python version can't directly modify the current shell environment. It provides activation commands to run.
- **Auto-Activation**: Requires shell integration for automatic activation on directory change.
- **Browser Opening**: Package search opens browser when available.
## Development
### Local Development
```bash
# Clone and install in development mode
git clone <repo-url>
cd virtual_envs_manager
pip install -e .
# Run tests (if available)
python -m pytest
# Type checking
mypy pyve/
```
### Contributing
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests if applicable
5. Submit a pull request
## License
MIT License - see LICENSE file for details.
## Author
anhvth5
Raw data
{
"_id": null,
"home_page": null,
"name": "pyve",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "virtual-environment, venv, python, environment-management",
"author": "anhvth5",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/68/b9/4acbf3b805879864a981a8c2de3f2e96ab14dd0d14802416bee4df8e3fe9/pyve-1.0.1.tar.gz",
"platform": null,
"description": "# Virtual Environment Manager\n\nA comprehensive Python package for managing virtual environments, providing equivalent functionality to the bash `venv.sh` script with enhanced features.\n\n## Features\n\n- **Environment Creation**: Create virtual environments using `uv`, `python3`, or `python` with automatic fallback\n- **Smart Activation**: Activate environments with directory mapping for auto-activation\n- **Package Management**: Install, uninstall, update, and search packages using `uv` or `pip`\n- **History Tracking**: Track directory-to-environment mappings for automatic activation\n- **Cross-Platform**: Works on Linux, macOS, and Windows with Python 3.7+\n\n## Installation\n\n### From Source\n\n```bash\n\npip install git+https://github.com/anhvth/uv-virtual-environs-manager\n```\n\n### From PyPI (once published)\n\n```bash\npip install pyve\n```\n\n## Quick Start\n\n```bash\n# Create a new virtual environment\nve create myproject --python=3.12\n\n# Activate an environment (creates directory mapping)\natv myproject\n\n# List all environments\nve list\n\n# Install packages\nve install requests numpy\n\n# Show environment info\nve info\n\n# Auto-activation: when you cd back to this directory, \n# the environment will be suggested for activation\n```\n\n## Commands\n\n### Main Commands\n\n- `ve create <name> [options]` - Create a new virtual environment\n- `ve activate <name>` - Activate a virtual environment \n- `ve deactivate` - Deactivate current virtual environment\n- `ve list` - List all virtual environments\n- `ve delete <name>` - Delete a virtual environment\n- `ve info` - Show current virtual environment info\n- `ve which <name>` - Show path to virtual environment\n\n### Package Management\n\n- `ve install <pkg>...` - Install packages in active venv\n- `ve installed` - List installed packages in active venv\n- `ve uninstall <pkg>...` - Uninstall packages from active venv\n- `ve search <pkg>` - Search for packages on PyPI\n- `ve update <pkg>...` - Update packages in active venv\n- `ve run <cmd>...` - Run command in active venv\n\n### History & Auto-Activation\n\n- `ve history` - Show directory \u2192 environment mappings\n- `ve clear-history` - Clear all atv history\n- `atv <name>` - Activate with directory mapping (alias for `ve activate`)\n\n### Utility Commands\n\n- `create_env <name>` - Alternative create command\n- `install_uv` - Install uv package manager\n\n## Configuration\n\nThe package uses the following files for tracking:\n\n- `~/.venv_all_env` - Global environment tracking\n- `~/.config/atv_history` - Directory-to-environment mappings\n- `~/.venvs/` - Default location for virtual environments\n- `~/.last_venv` - Last activated environment\n\n## Shell Integration\n\nFor full shell integration (auto-activation on directory change), add this to your shell configuration:\n\n### Zsh\n\n```bash\n# Add to ~/.zshrc\neval \"$(ve shell-integration zsh)\" # Future feature\n```\n\n### Bash\n\n```bash\n# Add to ~/.bashrc\neval \"$(ve shell-integration bash)\" # Future feature\n```\n\n## Auto-Activation\n\nWhen you use `atv <name>` to activate an environment, the current directory is mapped to that environment. When you navigate back to that directory later, you'll be reminded to activate the environment.\n\n## Examples\n\n```bash\n# Create a new project environment\nve create myproject --python=3.12\ncd /path/to/myproject\n\n# Install dependencies\nve install requests flask pytest\n\n# Later, when you cd back to the project\ncd /path/to/myproject\n# The tool will remind you about the mapped environment\n\n# View all mappings\n\n# Clean up\nve delete myproject\n```\n\n## Differences from Shell Version\n\n- **Shell Integration**: The Python version can't directly modify the current shell environment. It provides activation commands to run.\n- **Auto-Activation**: Requires shell integration for automatic activation on directory change.\n- **Browser Opening**: Package search opens browser when available.\n\n## Development\n\n### Local Development\n\n```bash\n# Clone and install in development mode\ngit clone <repo-url>\ncd virtual_envs_manager\npip install -e .\n\n# Run tests (if available)\npython -m pytest\n\n# Type checking\nmypy pyve/\n```\n\n### Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests if applicable\n5. Submit a pull request\n\n## License\n\nMIT License - see LICENSE file for details.\n\n## Author\n\nanhvth5\n",
"bugtrack_url": null,
"license": null,
"summary": "Comprehensive virtual environment management tool",
"version": "1.0.1",
"project_urls": {
"Homepage": "https://github.com/anhvth/speedy_utils",
"Repository": "https://github.com/anhvth/speedy_utils"
},
"split_keywords": [
"virtual-environment",
" venv",
" python",
" environment-management"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "edc6e70352a8132a698a58445021f9730a86156436d0ab7036b858ef00143b31",
"md5": "925cf4380441fda9b37d01bdb6777916",
"sha256": "626a0cf4c2ad2d785e1274c6a052df5d28e347fd84490157a0106e8874af35f1"
},
"downloads": -1,
"filename": "pyve-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "925cf4380441fda9b37d01bdb6777916",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 16964,
"upload_time": "2025-09-06T08:33:46",
"upload_time_iso_8601": "2025-09-06T08:33:46.217257Z",
"url": "https://files.pythonhosted.org/packages/ed/c6/e70352a8132a698a58445021f9730a86156436d0ab7036b858ef00143b31/pyve-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "68b94acbf3b805879864a981a8c2de3f2e96ab14dd0d14802416bee4df8e3fe9",
"md5": "b01aa2bfef04881af9f6feb4bb822764",
"sha256": "ba947648a79c8f6d997f1c34e6c4d3efae4269029cd187891b3e5d2738e6bb5f"
},
"downloads": -1,
"filename": "pyve-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "b01aa2bfef04881af9f6feb4bb822764",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 17533,
"upload_time": "2025-09-06T08:33:48",
"upload_time_iso_8601": "2025-09-06T08:33:48.266575Z",
"url": "https://files.pythonhosted.org/packages/68/b9/4acbf3b805879864a981a8c2de3f2e96ab14dd0d14802416bee4df8e3fe9/pyve-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-06 08:33:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "anhvth",
"github_project": "speedy_utils",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "numpy",
"specs": [
[
"==",
"1.26.4"
]
]
},
{
"name": "requests",
"specs": [
[
"==",
"2.32.3"
]
]
},
{
"name": "xxhash",
"specs": [
[
"==",
"3.5.0"
]
]
},
{
"name": "loguru",
"specs": [
[
"==",
"0.7.2"
]
]
},
{
"name": "fastcore",
"specs": [
[
"==",
"1.7.5"
]
]
},
{
"name": "debugpy",
"specs": [
[
"==",
"1.8.6"
]
]
},
{
"name": "ipywidgets",
"specs": [
[
"==",
"8.1.5"
]
]
},
{
"name": "jupyterlab",
"specs": [
[
"==",
"4.2.5"
]
]
},
{
"name": "ipdb",
"specs": [
[
"==",
"0.13.13"
]
]
},
{
"name": "scikit-learn",
"specs": [
[
"==",
"1.5.2"
]
]
},
{
"name": "matplotlib",
"specs": [
[
"==",
"3.9.2"
]
]
},
{
"name": "pandas",
"specs": [
[
"==",
"2.2.2"
]
]
},
{
"name": "tabulate",
"specs": [
[
"==",
"0.9.0"
]
]
},
{
"name": "pydantic",
"specs": [
[
"==",
"2.9.1"
]
]
}
],
"lcname": "pyve"
}