Giter VIP home page Giter VIP logo

py's Introduction

py

A modern dependency manager for Python.

how to

start a new project

If you have py installed globally:

# create your new project dir
mkdir project
cd project

# create a virtual env and a py.toml file in the current dir
py init

If you do not want to have it installed globally:

# create your new project dir
mkdir project
cd project

# create a virtual env and install py in it
python3 -m venv myvenv
source myvenv/bin/activate
pip install pydepman

# detects the virtual env and sets it in py.toml
py init

install a package

# add the package and its desired version under [dependencies]
# e.g. add: django = "3.0.8"
vim py.toml

# installs django, asgiref, pytz, sqlparse
py sync

upgrade a package

# edit the respective line under [dependencies]
# e.g. django = "3.0.8" โ†’ django = "3.1"
vim py.toml

# upgrades django, asgiref, pytz, sqlparse
py sync

uninstall a package

# remove the respective line from [dependencies]
# e.g. remove: django = "3.1"
vim py.toml

# uninstalls django
# uninstalls each of asgiref, pytz, sqlparse unless used by another
# package listed in py.toml (or is listed there itself)
py sync

commands

  • py init

    Init a new project (a virtual environment and a py.toml file) in the current directory.

  • py [SCRIPT]

    Run python in the virtual environment specified in py.toml. This command makes explicitly activating the virtual environment obsolete.

  • py search PACKAGE

    Search for packages in the Cheese Shop.

  • py show PACKAGE

    Show the details of a package. It does not matter whether the package is installed locally.

  • py deps PACKAGE

    Show the dependency tree of a package. It does not matter whether the package is installed locally.

  • py sync

    Install the dependencies (and their dependencies, all the way down) specified in py.toml and uninstall those that are missing. Write requirements.txt.

licence

GPL. You can do what you want with this code as long as you let others do the same.

py's People

Contributors

pavelsof avatar

Stargazers

Emanuele Sabetta avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.