Skip to content

andypayne/python_notes

Repository files navigation

Requirements

pipreqs

Use pipreqs for showing top-level dependencies to avoid requirements.txt files getting bulky. Basic installation and usage:

pip install pipreqs

pipreqs --print

pigar

TODO

black

black vim integration:

https://black.readthedocs.io/en/stable/integrations/editors.html

The first time you edit a file and run :Black, the black plugin will run some setup code. Be sure to deactivate any existing python environments before doing that the first time, assuming you installed the black pip file globally.

pipenv

Install

[Installing:] https://pipenv.pypa.io/en/latest/install/#installing-pipenv

pip install --user pipenv

or

pip install --user pipx
pipx install pipenv

Upgrade

pip install --user --upgrade pipenv

Use

Install a package into a fresh project, and pipenv will automatically create a Pipfile for the project.

mkdir myproject
cd myproject
pipenv install <package>

Activate with:

pipenv shell

I use my renv alias to activate the environment.

Or run a command with:

pipenv run

About

Random notes on python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published