uvenv-cli


Nameuvenv-cli JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/kennethreitz/uvenv
SummaryA virtual environment manager for Python.
upload_time2024-08-07 00:16:54
maintainerNone
docs_urlNone
authorKenneth Reitz
requires_python>=3.6.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# `uvenv` - workflow tool for uv.


The `uvenv` command is a wrapper around the `uv` command. It provides a simple interface for managing Python projects, inspired by tools like pipenv, but using `requirements.txt` and `requirements.in` files.

**Note:** This is an active *work in progress*. Some features may not be fully implemented, and are subject to change.

## Project Structure

`uvenv` assumes the following project structure:

- `requirements.in` — A file containing the packages to be installed.
- `requirements.txt` — A lockfile containing the exact versions of the packages to be installed.
- `.venv` — A directory containing the virtual environment.

`uvenv` will automatically discover the project root by searching for these files in the current directory and its parents.

## Environment Variables

`uvenv` allows you to customize the locations of key files and directories using environment variables:

- `UVENV_REQUIREMENTS_IN`: Specifies the location of the requirements input file (default: `requirements.in`)
- `UVENV_REQUIREMENTS_TXT`: Specifies the location of the requirements lockfile (default: `requirements.txt`)
- `UVENV_VENV_DIR`: Specifies the directory for the virtual environment (default: `.venv`)
- `UVENV_UV`: Specifies the path to the `uv` executable (default: `uv`)
- `UVENV_PYTHON`: Specifies the Python interpreter to use (default: `python`)

For example, to use a different name for your requirements file:

```shell
$ export UVENV_REQUIREMENTS_IN=requirements-dev.in
$ export UVENV_REQUIREMENTS_TXT=requirements-dev.txt
$ export UVENV_VENV_DIR=~/.venvs/myproject

$ uvenv install
```

## Commands

`uvenv` currently provides the following primary commands:

- `uvenv install` — Install the packages in `requirements.in`.
- `uvenv uninstall` — Uninstall the packages in `requirements.in`.
- `uvenv lock` — Generate or update the lockfile in `requirements.txt`.

----------------

## Philosophy

- **Simplicity**: `uvenv` aims to provide a simple and intuitive interface for managing Python projects.
- **Speed**: `uvenv` leverages the speed of uv for dependency management and virtual environment creation.
- **Flexibility**: `uvenv` aims to be flexible and support a variety of project structures and workflows.
- **Compatibility**: `uvenv` aims to be compatible with a variety of Python versions and platforms.
- **Minimalism**: `uvenv` aims to be minimal and avoid unnecessary complexity.
- **Power**: `uvenv` aims to provide powerful features for managing Python projects.
- **Community**: `uvenv` aims to be community-driven and open-source.

## Features

- Automatic project root discovery
- Virtual environment management
- Dependency installation and uninstallation
- Requirements locking
- Command running within the virtual environment
- Interactive shell with activated virtual environment

## Installation

To install `uvenv`, you need to have Python 3.6+ and uv installed. Then you can install uvenv using pip:

```shell
$ pip install uvenv-cli
```

## Usage

`uvenv` provides the following commands:

### Install

Install dependencies or specific packages:

```
$ uvenv install
$ uvenv install <package1> <package2>
```

### Uninstall

Remove specific packages:

```
$ uvenv uninstall <package1> <package2>
```

### Lock

Generate or update requirements.txt:

```
$ uvenv lock
```


### Help

Show help message:

```
$ uvenv --help
```

## Project Structure

uvenv expects your project to have either a `requirements.txt` or `requirements.in` file in the project root. It will automatically discover the project root by searching for these files in the current directory and its parents.

## Usage

1. Start a new project:
   ```shell
   $ mkdir myproject
   $ cd myproject
   $ echo "requests==2.26.0" > requirements.in
   $ uvenv install
   ```

2. Add a new package:
   ```shell
   $ uvenv install numpy
   ```

3. Remove a package:
   ```shell
   $ uvenv uninstall requests
   ```

4. Update locked requirements:
   ```shell
   $ uvenv lock
   ```

## Upcoming features

5. Run a Python script:
   ```shell
   $ uvenv run python myscript.py
   ```

6. Start an interactive shell:
   ```shell
   $ uvenv shell
   ```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project will be licensed under the MIT License.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kennethreitz/uvenv",
    "name": "uvenv-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6.0",
    "maintainer_email": null,
    "keywords": null,
    "author": "Kenneth Reitz",
    "author_email": "me@kennethreitz.org",
    "download_url": "https://files.pythonhosted.org/packages/3d/b3/c196e1b8971ec8a1fb531ce15e87cd6527778bb6fe867df712c774f8f2a5/uvenv_cli-0.1.1.tar.gz",
    "platform": null,
    "description": "\n# `uvenv` - workflow tool for uv.\n\n\nThe `uvenv` command is a wrapper around the `uv` command. It provides a simple interface for managing Python projects, inspired by tools like pipenv, but using `requirements.txt` and `requirements.in` files.\n\n**Note:** This is an active *work in progress*. Some features may not be fully implemented, and are subject to change.\n\n## Project Structure\n\n`uvenv` assumes the following project structure:\n\n- `requirements.in` \u2014\u00a0A file containing the packages to be installed.\n- `requirements.txt` \u2014\u00a0A lockfile containing the exact versions of the packages to be installed.\n- `.venv` \u2014\u00a0A directory containing the virtual environment.\n\n`uvenv` will automatically discover the project root by searching for these files in the current directory and its parents.\n\n## Environment Variables\n\n`uvenv` allows you to customize the locations of key files and directories using environment variables:\n\n- `UVENV_REQUIREMENTS_IN`: Specifies the location of the requirements input file (default: `requirements.in`)\n- `UVENV_REQUIREMENTS_TXT`: Specifies the location of the requirements lockfile (default: `requirements.txt`)\n- `UVENV_VENV_DIR`: Specifies the directory for the virtual environment (default: `.venv`)\n- `UVENV_UV`: Specifies the path to the `uv` executable (default: `uv`)\n- `UVENV_PYTHON`: Specifies the Python interpreter to use (default: `python`)\n\nFor example, to use a different name for your requirements file:\n\n```shell\n$ export UVENV_REQUIREMENTS_IN=requirements-dev.in\n$ export UVENV_REQUIREMENTS_TXT=requirements-dev.txt\n$ export UVENV_VENV_DIR=~/.venvs/myproject\n\n$ uvenv install\n```\n\n## Commands\n\n`uvenv` currently provides the following primary commands:\n\n- `uvenv install` \u2014\u00a0Install the packages in `requirements.in`.\n- `uvenv uninstall` \u2014\u00a0Uninstall the packages in `requirements.in`.\n- `uvenv lock` \u2014\u00a0Generate or update the lockfile in `requirements.txt`.\n\n----------------\n\n## Philosophy\n\n- **Simplicity**: `uvenv` aims to provide a simple and intuitive interface for managing Python projects.\n- **Speed**: `uvenv` leverages the speed of uv for dependency management and virtual environment creation.\n- **Flexibility**: `uvenv` aims to be flexible and support a variety of project structures and workflows.\n- **Compatibility**: `uvenv` aims to be compatible with a variety of Python versions and platforms.\n- **Minimalism**: `uvenv` aims to be minimal and avoid unnecessary complexity.\n- **Power**: `uvenv` aims to provide powerful features for managing Python projects.\n- **Community**: `uvenv` aims to be community-driven and open-source.\n\n## Features\n\n- Automatic project root discovery\n- Virtual environment management\n- Dependency installation and uninstallation\n- Requirements locking\n- Command running within the virtual environment\n- Interactive shell with activated virtual environment\n\n## Installation\n\nTo install `uvenv`, you need to have Python 3.6+ and uv installed. Then you can install uvenv using pip:\n\n```shell\n$ pip install uvenv-cli\n```\n\n## Usage\n\n`uvenv` provides the following commands:\n\n### Install\n\nInstall dependencies or specific packages:\n\n```\n$ uvenv install\n$ uvenv install <package1> <package2>\n```\n\n### Uninstall\n\nRemove specific packages:\n\n```\n$ uvenv uninstall <package1> <package2>\n```\n\n### Lock\n\nGenerate or update requirements.txt:\n\n```\n$ uvenv lock\n```\n\n\n### Help\n\nShow help message:\n\n```\n$ uvenv --help\n```\n\n## Project Structure\n\nuvenv expects your project to have either a `requirements.txt` or `requirements.in` file in the project root. It will automatically discover the project root by searching for these files in the current directory and its parents.\n\n## Usage\n\n1. Start a new project:\n   ```shell\n   $ mkdir myproject\n   $ cd myproject\n   $ echo \"requests==2.26.0\" > requirements.in\n   $ uvenv install\n   ```\n\n2. Add a new package:\n   ```shell\n   $ uvenv install numpy\n   ```\n\n3. Remove a package:\n   ```shell\n   $ uvenv uninstall requests\n   ```\n\n4. Update locked requirements:\n   ```shell\n   $ uvenv lock\n   ```\n\n## Upcoming features\n\n5. Run a Python script:\n   ```shell\n   $ uvenv run python myscript.py\n   ```\n\n6. Start an interactive shell:\n   ```shell\n   $ uvenv shell\n   ```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project will be licensed under the MIT License.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A virtual environment manager for Python.",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/kennethreitz/uvenv"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f3f62bc7fabf6a468403b049b07cc0b1a5195bb95d525c16177d3a44c9624273",
                "md5": "1e3724823b2fa4b39998b801ef1cc8f3",
                "sha256": "729b297ee78b1f1d8e8ee1c882bba731f6d876121606ed7bc68ce8038360a3fa"
            },
            "downloads": -1,
            "filename": "uvenv_cli-0.1.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1e3724823b2fa4b39998b801ef1cc8f3",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.6.0",
            "size": 7511,
            "upload_time": "2024-08-07T00:16:53",
            "upload_time_iso_8601": "2024-08-07T00:16:53.248686Z",
            "url": "https://files.pythonhosted.org/packages/f3/f6/2bc7fabf6a468403b049b07cc0b1a5195bb95d525c16177d3a44c9624273/uvenv_cli-0.1.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3db3c196e1b8971ec8a1fb531ce15e87cd6527778bb6fe867df712c774f8f2a5",
                "md5": "bd7b9499b36991064c90d7ad5b035308",
                "sha256": "2d5edda7665fd29be3b5e76393630e6166616396269861e82b96a5868bd11563"
            },
            "downloads": -1,
            "filename": "uvenv_cli-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "bd7b9499b36991064c90d7ad5b035308",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6.0",
            "size": 8517,
            "upload_time": "2024-08-07T00:16:54",
            "upload_time_iso_8601": "2024-08-07T00:16:54.716062Z",
            "url": "https://files.pythonhosted.org/packages/3d/b3/c196e1b8971ec8a1fb531ce15e87cd6527778bb6fe867df712c774f8f2a5/uvenv_cli-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-07 00:16:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kennethreitz",
    "github_project": "uvenv",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "uvenv-cli"
}
        
Elapsed time: 1.31799s