AndydeCleyre / zpy

Manage Python environments in Zsh, with uv or pip-tools
https://andydecleyre.github.io/zpy/
The Unlicense
84 stars 1 forks source link
completion pip-tools python uv venv zsh zsh-plugin

=== zpy


Manage Python environments in Zsh, with uv or pip-tools

|ghpages| |reqs-ci| |container-ci|

|container-alpine| |container-fedora| |container-ubuntu|

|repo| |docsite| |contact|

|logo|

zpy is a set of Zsh functions wrapping or uv, or pip-tools and Python's venv module, for the simple and interactive management of Python virtual environments, dependency specifications, and isolated Python app installations.

None of them should get in your way. All have thorough tab completion.

__ https://github.com/astral-sh/uv

__ https://github.com/jazzband/pip-tools

They can generally replace pipenv, poetry, pipx, pipsi, virtualenvwrapper, etc.

.. contents::

|zpy-completions|

Getting It

The short version of installation:

__ https://github.com/junegunn/fzf

Check out the docs__ for installation, explanation, and usage docs!

__ https://andydecleyre.github.io/zpy/

Examples

There are about 25 user-facing functions in total. For details, see the reference and the short guide.

__ https://andydecleyre.github.io/zpy/help_all/

__ https://andydecleyre.github.io/zpy/start/

They are also available as subcommands to the "supercommand" zpy; envin is equivalent to zpy envin, etc.

Basic usage of envin and pipacs:

|envin-pipacs-gif|

Basic usage of pipz:

|pipz-gif|

Try it in a Container

Try it in isolation with docker or podman with one of these commands:

.. code:: console

$ docker run --net=host -it --rm -e TERM=$TERM quay.io/andykluger/zpy-ubuntu:master $ podman run --net=host -it --rm -e TERM=$TERM quay.io/andykluger/zpy-ubuntu:master

Replace "ubuntu" with "alpine" or "fedora" if you prefer.

Guiding Ideas

.. image:: https://github.com/AndydeCleyre/zpy/raw/master/doc/src/img/flow.svg :alt: Information flow diagram :width: 100%

__ https://github.com/jdx/mise

__ https://github.com/pyenv/pyenv

__ https://asdf-vm.com

__ https://flit.readthedocs.io/en/latest/

__ https://github.com/AndydeCleyre/zpy/issues

.. |repo| image:: https://img.shields.io/github/size/andydecleyre/zpy/zpy.plugin.zsh?logo=github&label=Code&color=blueviolet :alt: Plugin file size in bytes :target: https://github.com/andydecleyre/zpy

.. |container-alpine| image:: https://img.shields.io/badge/Container-Quay.io-green?logo=alpine-linux :alt: Demo container - Alpine Linux :target: https://quay.io/repository/andykluger/zpy-alpine

.. |container-fedora| image:: https://img.shields.io/badge/Container-Quay.io-green?logo=red-hat :alt: Demo container - Fedora :target: https://quay.io/repository/andykluger/zpy-fedora

.. |container-ubuntu| image:: https://img.shields.io/badge/Container-Quay.io-green?logo=ubuntu :alt: Demo container - Ubuntu :target: https://quay.io/repository/andykluger/zpy-ubuntu

.. |container-ci| image:: https://github.com/AndydeCleyre/zpy/actions/workflows/ctnrs.yml/badge.svg?branch=develop :alt: Demo containers - GitHub Actions :target: https://github.com/AndydeCleyre/zpy/actions/workflows/ctnrs.yml

.. |reqs-ci| image:: https://github.com/AndydeCleyre/zpy/actions/workflows/reqs.yml/badge.svg :alt: Bump PyPI requirements - GitHub Actions :target: https://github.com/AndydeCleyre/zpy/actions/workflows/reqs.yml

.. |contact| image:: https://img.shields.io/badge/Contact-Telegram-blue?logo=telegram :alt: Contact developer on Telegram :target: https://t.me/andykluger

.. |docsite| image:: https://readthedocs.org/projects/zpy/badge/ :alt: Documentation Status :target: https://zpy.readthedocs.io/en/latest/

.. |ghpages| image:: https://github.com/AndydeCleyre/zpy/actions/workflows/gh-pages.yml/badge.svg?branch=master :alt: Build GitHub Pages :target: https://andydecleyre.github.io/zpy/

.. |logo| image:: https://github.com/AndydeCleyre/zpy/blob/assets/zpy-logo.png?raw=true :alt: zpy logo :width: 160px

.. |zpy-completions| image:: https://user-images.githubusercontent.com/1787385/172661113-7a2c6670-e716-491e-8db4-c005fef8455b.png :alt: zpy supercommand completions :width: 800px

.. |envin-pipacs-gif| image:: https://github.com/AndydeCleyre/zpy/blob/assets/envin_pipacs.gif?raw=true :alt: Animated envin and pipacs demo :width: 800px

.. |pipz-gif| image:: https://github.com/AndydeCleyre/zpy/blob/assets/pipz.gif?raw=true :alt: Animated pipz demo :width: 800px