Skip to main content

pip for wrapper for properly auto updating requirements.txt and sorting out dependencies

Project description

Prypip

Python package for auto updating requirements.txt and managing dependencies installed with pip.

License

Python

Python 3.6

Why Prypip?

updating requirements.txt file in your python project requires manually adding the package or running :

pip freeze

which is not ideal because it could introduce packages useless to the project which could possibly break your code in production (trust me,been there 😪) especially when using environments like conda and also adds sub dependencies ( packages that are required by packages you installed) which will fill up the requirements.txt with too much packages and can be a hussle trying to uninstall a package as you won't know immediately which package is dependent on another.

Prypip helps with these issues by :

  • Auto updates your requirements.txt whenever you install,uninstall and upgrade a package via pip.

  • Only adds packages you installed directly and separates sub dependencies in the dependency_tree.json file

  • Doesn't allow redundant packages lying in your project.

In summary prypip will make your development and coding process much easier.

Would appreciate you using prypip, i'm very much open to feed backs 😁 .

More

Contributors a very much welcomed, more ideas,features and correction are welcomed.

I also want to put this here that i'm open to remote and possibly sponsored relocation roles incase you have any job roles you know of or an employer, recommendations for roles are very much welcomed, I'm a fullstack developer with extensive knowledge of the foillowing technologies:

  • Django
  • Flask
  • Fast api
  • React js
  • Next js

You can reach me via my email address preciouskent8@gmail.com, linked in profile link https://www.linkedin.com/in/precious-balogun-7392141b2/ . Link to my resume https://drive.google.com/file/d/1ItIuzXq_srjgVg6DzNVmTWb1x8wHPK-q/view?fbclid=IwAR0ccEf0woz5UIbBt8m26RFd0MT3pry4MtQS1sF2g7xlYvn_GDpJVliSiuE .

Thank you 😁 .

Usage/Examples

you can install prypip by simply:

pip install prypip

Note: prypip should only be used within a virtual environment. you shouldn't add prypip to your requirements.txt to avoid adding it to production,prypip is only meant to work locally.

After installing via pip you will need to create a venv_py_path.txt file that will contain the path to two file paths namely:

  • The path to the virtual environment's python interpreter,this is usually within the Scripts folder in the virtual environment directory.An example of this path in windows is :
C:\Users\user\otherPipProj\otherpipENV\Scripts\python
  • The second line in the venv_py_path.txt should contain the site-packages path where pip stores all installed packages,specifying this path is required for the package to fully work. An example of this path in windows is :
C:\Users\user\otherPipProj\otherpipENV\Lib\site-packages

All these file paths are available on all OS,you can make a bit of google search to know exactly how to find these file paths in your PC.

After all is set,viola! you're ready to use prypip 🥳 .

Prypip can be used on the command line with the root command prypip .

To install a package you can use :

prypip run pip install <package_name>

This will perform the regular pip install function with the added fuctionality of updating your requirements.txt automatically.

Note: Make sure you're within the root directory of your project which is where the requirements.txt file usually resides.

Other commands and examples include:


prypip run pip uninstall <package_name>  [<automatically removes a package from requirements.txt when pip uninstalls a package>]

prypip run pip install <package_name> --upgrade [<automatically updates the version of the upgraded package in requirements.txt>]

prypip open dependency_tree.json [<this command opens the dependency_tree.json file(check api reference for more) and displays every package with their dependencies in a tree structure>]

API Reference

venv_py_path.txt : file created by user to store virtual environment's python interpreter path and site-packages path.

dependency_tree.json : file that stores each installed package as a key and every sub packages that it requires (packages in which the installed package depends on) as value in a dict then converted to json.

prypip : The main command for working with prypip.

run : used to specify execution of commands external to prypip e.g pip

open : used for opening and displaying special documents in prypip, e.g prypip open dependency_tree.json displays tthe content of dependency_tree.json in a tree like structure.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prypip-1.0.8.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prypip-1.0.8-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file prypip-1.0.8.tar.gz.

File metadata

  • Download URL: prypip-1.0.8.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.5

File hashes

Hashes for prypip-1.0.8.tar.gz
Algorithm Hash digest
SHA256 8c7cf010bf8dddd4bb647e6bae56ecb78f7573761a4c96b67ab9f536d1e6de21
MD5 c1c60ccb70b248bf24df73a5617d46bf
BLAKE2b-256 946407da39e9e3e9d4b730516ac34062f9fc2be58f93855d2f4aa320f4ffd4d2

See more details on using hashes here.

File details

Details for the file prypip-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: prypip-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.5

File hashes

Hashes for prypip-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 bf73eff3031a32caabebebc21027dcb6885a4f30647e6024f30b5dfd41a3b641
MD5 931de24db7a5575ffe6ab8d24184029a
BLAKE2b-256 885609e711976286b4d30deec290196b730d7782d80e7ef2467ad39e1374bdb6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page