3 ms·
In short , it works like NPM. - reproducible python package dependency - reproducible python version - package locking - PEP compliant package management co
by v3ss0n 2y ago
In short , it works like NPM.
- reproducible python package dependency
- reproducible python version
- package locking
- PEP compliant package management configuration via project.toml
- automatic venv management
- project configuration and management including build scripts in one place
All you need is
- pdm init # starts preparing env
- pdm add package # install package locally, project wide
- pdm install # reproduce
- wtallis 2y agoThis looks like it was copied from a readme file without regard for the context of this discussion thread. Instead of merely advertising, you should have posted something that actually refers to the capabilities and purpose of pipreqs and explained how PDM handles that better or obviates the need for a tool to do what pipreqs does.
- v3ss0n 2y agoI already stated the obvious differences. requirements files cannot capture a lot of metadata that is required to reproduce python setup , PDM deals a lot of important stuff in: Dependency Management in easy to edit pyproject.toml file , properly implementing the standard PEP specs 518 and 612 . Plus it automatically creates .venv with all the packages required when `pdm install` . Also it installs and manage the required Python verion in .venv. It also locks the proper package depedencies in pdm.lock file with proper hashes which pipreq or others can't . With pyproject.toml being the main config file you can also define build script , run scripts like you can do with `npm run dev` , using `pdm run dev` for example. Also you can define all the development tools and their config along with it. We used PDM , so it streamlines package and depedency, project management and venv config all in one pyproject.toml - and you can generate requirements.txt and pdm.lock which in turn builds your venv , can easily share with team (just one pyproject.toml file to share) .