importreqs
A simple Python lib for extracting reqs.txt from currently imported libs in the context. The lib can be used in the following scenarios:
Gathering the dependencies for serverless frameworks such as AWS Lambda. If several functions share the same virtualenv, unused dependecies may be introduced via pip freeze. Use importreqs will expose only the reqs imported.
Remove unused dependencies after refactoring, or on a long time maintained projects.
Install
pip install importreqs
Usage
To use importreqs:
import importreqs
importreqs.generate_reqs(replace_version_hash=False,
exclude=None)
replace_version_hash: For editable reqs(with -e when using pip install), remove the commit hash from result.
exclude: Exclude listed packages from the result. For example, importreqs itself.
For example:
# import your own projects # for example "import app" import importreqs print(importreqs.generate_reqs(exclude=['importreqs']))
Or use importreqs from command line:
importreqs -c "import requests"
Metadata
Release files for importreqs 0.3.1
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 |
|---|---|---|---|---|
| importreqs-0.3.1.tar.gz | 3.1 kB | Without provenance | Details for importreqs-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| importreqs-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for importreqs-0.3.1-py3-none-any.whl |
Total release size: 11.1 kB
Release files / importreqs-0.3.1.tar.gz
| Download URL | importreqs-0.3.1.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
169fc404bf020daf7531d8230027581e3b4ac8b3742df83df80e4a1b1fb24e8e
|
|
BLAKE2b-256 checksum How to use checksums |
00b0e3e1d3e50bd0eac1e74173ccdd1f1607a1530d31b9c4be944a942896c5bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
|
Release files / importreqs-0.3.1-py3-none-any.whl
| Download URL | importreqs-0.3.1-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ee81843a0535d067f318e963953ad20862467cd7ac6e2d0faf7802fef33f31bd
|
|
BLAKE2b-256 checksum How to use checksums |
c8a7b93a3fce15aee2dc0541fdf5e6e8b4b8216ed3057c3c373ef96025af4a2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
|
Security for importreqs 0.3.1
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.