Description
Removes private packages from a general requirements.txt file.
Usage
An example of usage is installing private packages. My usual workflow consists of
- changes in the source code,
pip freeze > requirements.txt- and
git add .andgit commit -m "commit massage". However, my private packages were included and the CI build would fail because of the peculiar syntax required to install private packages. - The private package was manually removed from the
requirements.txtand anothercommitwas executed.
This package was created to avoid this situation. Storing the private packages
in a different file (e.g., requirements-private.txt), it removes the
packages already presented inside requirements-private.txt from the requirements.txt
avoiding the manual deletion and the commit correcting the change.
The recommended use is adding in the .pre-commit-config.yaml file
- repo: https://github.com/mashi/requirements-filter
rev: v0.0.0 # replace by desired tag version
hooks:
- id: rqf
args: [--filename1, requirements.txt, --filename2, requirements-private.txt] # example with arguments
In this way, the packages are checked before the commit and prevents the inclusion in the version control.
Instructions (Development)
Create a virtual environment and install the required packages with
python3 -m venv .venv
source .venv/bin/activate
pip install wheel
pip install -r requirements.txt
pre-commit install
Metadata
Release files for requirements-filter 0.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| requirements_filter-0.0.0.tar.gz | 9.9 kB | Without provenance | Details for requirements_filter-0.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| requirements_filter-0.0.0-py3-none-any.whl | Python 3 | none | any | Details for requirements_filter-0.0.0-py3-none-any.whl |
Total release size: 16.1 kB
Release files / requirements_filter-0.0.0.tar.gz
| Download URL | requirements_filter-0.0.0.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4516b1f6221ac0d7182f531770da22fff19c463d3584076a7a7a179205b6a3bc
|
|
BLAKE2b-256 checksum How to use checksums |
0794754ed073d02edab933fb83f394f94e273cc8569f13ee29ee2039268c6119
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
|
Release files / requirements_filter-0.0.0-py3-none-any.whl
| Download URL | requirements_filter-0.0.0-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9228baada80adf34f2fdd5ed2767441d83c9e0c6faaa8c71ea39d6c4202268f5
|
|
BLAKE2b-256 checksum How to use checksums |
ceb2f12e32ce0038cc4eee22486b4c67efcc82df50b92197404d7e9ef58b1396
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
|
Security for requirements-filter 0.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.