All Projects → jnoortheen → pipm

jnoortheen / pipm

Licence: MIT license
Python dependency management workflow using setup.cfg and requirements files without reinventing the wheels

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pipm

rules poetry
Bazel rules that use Poetry for Python package management
Stars: ✭ 40 (+33.33%)
Mutual labels:  pip, python-package-management
envoke
A demo client-side application for persisting music metadata and rights to BigchainDB/IPDB.
Stars: ✭ 17 (-43.33%)
Mutual labels:  metadata
rafy-rs
Rust library to download YouTube content and retrieve metadata
Stars: ✭ 46 (+53.33%)
Mutual labels:  metadata
YouTube-MA
💾 YouTube video metadata archiver written in Golang
Stars: ✭ 17 (-43.33%)
Mutual labels:  metadata
samp-server-cli
Control server configuration via command line (without manually editing server.cfg)
Stars: ✭ 14 (-53.33%)
Mutual labels:  pip
My.Jdownloader-API-Python-Library
My.Jdownloader API Python Library
Stars: ✭ 65 (+116.67%)
Mutual labels:  pip
AvaTax-REST-V2-Python-SDK
Sales Tax API SDK for Python and AvaTax REST
Stars: ✭ 17 (-43.33%)
Mutual labels:  pip
exempi
Exempi: XMP SDK (freedesktop mirror)
Stars: ✭ 19 (-36.67%)
Mutual labels:  metadata
pipyuan
pipyuan 内置了国内常用的 pip 源, 你可以快速设置想要的源
Stars: ✭ 30 (+0%)
Mutual labels:  pip
data-profiling
a set of scripts to pull meta data and data profiling metrics from relational database systems
Stars: ✭ 57 (+90%)
Mutual labels:  metadata
islandora vagrant
Islandora testing and development environment
Stars: ✭ 36 (+20%)
Mutual labels:  metadata
pip-bash-completion
bash autocompletion for pip
Stars: ✭ 74 (+146.67%)
Mutual labels:  pip
hasura-sdk
Hasura Schema & Metadata Typescript SDK
Stars: ✭ 21 (-30%)
Mutual labels:  metadata
bioportal web ui
A Rails application for biological ontologies
Stars: ✭ 20 (-33.33%)
Mutual labels:  metadata
MetadataRemover
Android App to remove images' metadata
Stars: ✭ 42 (+40%)
Mutual labels:  metadata
mllint
`mllint` is a command-line utility to evaluate the technical quality of Python Machine Learning (ML) projects by means of static analysis of the project's repository.
Stars: ✭ 67 (+123.33%)
Mutual labels:  pip
passa
Resolver implementation and toolset for generating and interacting with Pipfile and Pipfile.lock.
Stars: ✭ 54 (+80%)
Mutual labels:  pip
ochrona-cli
A command line tool for detecting vulnerabilities in Python dependencies and doing safe package installs
Stars: ✭ 46 (+53.33%)
Mutual labels:  pip
unfurl
Extract rich metadata from URLs
Stars: ✭ 41 (+36.67%)
Mutual labels:  metadata
goexif2
MAINTAINER WANTED -- Decode embedded EXIF meta data from image files written in Pure Golang
Stars: ✭ 35 (+16.67%)
Mutual labels:  metadata

pipm

Build Status

Python package management using pip, requirements file & setup.cfg.

Installation

  • Adviced to install only inside virtualenv

Install from PyPI

pip install pipm

Note:

  • This tool manipulates all your requirements file. So be sure to use a version control software to keep track of the changes.

Quickstart

  • Both pip and pipm command will work as the same.
  • Create a virtualenv for the project and install pipm with
pip install pipm
  • Create an alias as alias pip=pipm or use as it is - pipm

I. Install

  • install all your dependencies from the base requirements file (requirements.txt)
pipm install
pipm install --all  # *requirements*.txt - all environment -> test/prod/dev

2. Add new packages to project

pipm install pkg-name
pipm install pkg-name --dev # as development dependency
pipm install pkg-name --test # as testing dependency

3. Removal of packages

  • Remove one or more packages. Their dependencies will also get uninstalled. No orphaned packages.
pipm uninstall pkg-name

4. update all your dependencies in requirements.txt

pipm update
pipm update --dev

Features

  1. No new set of files. *-requirements.txt works like the lockfile with pinned versions
  2. Just a wrapper around the standard pip's install/uninstall command. So all the cli options will work
  3. Handles multiple requirements files and setup.cfg stores abstract dependencies.

Commands

1. install

  • a wrapper around standard pip install command and accepts all the standard options

Below are the things that pipm brings to the table

  1. Extra functionality
    • when package names are given it will be saved to the requirements.txt file in the current directory. If you have requirements directory structure with base.txt inside then that file will be used. Otherwise it will create one in the current directory.
    • when no package name is given then it is equivalent to -r requirements.txt and it will install all requirements from the current directory
  2. Additional options: It will search for the matching one in the following pattern <name>-requirements.txt or requirements/<name>.txt or requirements-<name>.txt the below saves to file when package name given otherwise equivalent to passing requirements file name.
    1. --dev - saves to development requirements
    2. --prod - saves to production requirements
    3. --test - saves to testing requirements
    4. --doc - saves to documentation requirements
    5. --env <name> - if you have any special set of requirements that belong to a separate file you could pass the name here.

2. uninstall

  • a wrapper around standard pip uninstall command
  • alias rm is available
  • when uninstalling a package, this command also checks packages that are no longer required by any of user installed packages and removes them
  • ofcourse it removes the packages from requirements files

3. update

  • new command
  • equivalent to calling pip install with --upgrade flag
  • update a single package or the whole environment when no argument given.
  • by default the packages are updated interactively
    • set --auto-update to disable this

4. save/freeze

  • extends the standard freeze command to save the currently installed packages

Development

  • clone the repository and create new virtualenv
git clone [email protected]:jnoortheen/pipm.git
cd pipm
pew new pipm -a .
pip install -r dev-requirements.txt
  • to test from local sources
pip install -e .
  • Commit message should follow this style-guide.

Testing

  • run invoke test from the root directory.

Alternatives and their problems (IMHO)

  1. pipenv
    • good for local development with only one virtual environment per project
    • Not good when we need to deploy over production server or keep multiple virtuals-envs
    • it is better to use pew alone instead of the shell command that comes with this
  2. pip-tools
    • another set of files to keep track of, additional commands to remember
  3. poetry
    • more robust than pipenv
    • ~~the problems I faced are related to installing dependencies in remote servers/docker environments. ~~
    • longer install/update times ~~As the project matures this problem might get resolved. ~~
    • since version 1.1 these are solved.
    • new projects are to advised to use poetry when possible.
  4. dephell
    • haven't used it. But seems to handle requirements files as well as other formats.

TODOs:

  • rm will check whether a package is present in setup.cfg
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].