Skip to main content

No project description provided

Project description

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"

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

importreqs-0.3.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

importreqs-0.3.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file importreqs-0.3.1.tar.gz.

File metadata

  • Download URL: importreqs-0.3.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for importreqs-0.3.1.tar.gz
Algorithm Hash digest
SHA256 169fc404bf020daf7531d8230027581e3b4ac8b3742df83df80e4a1b1fb24e8e
MD5 7c2f502c17f16429b7b6870dc373b6c1
BLAKE2b-256 00b0e3e1d3e50bd0eac1e74173ccdd1f1607a1530d31b9c4be944a942896c5bd

See more details on using hashes here.

File details

Details for the file importreqs-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: importreqs-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for importreqs-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ee81843a0535d067f318e963953ad20862467cd7ac6e2d0faf7802fef33f31bd
MD5 285c394e877992108a13d2e641c8fdc9
BLAKE2b-256 c8a7b93a3fce15aee2dc0541fdf5e6e8b4b8216ed3057c3c373ef96025af4a2a

See more details on using hashes here.

Supported by

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