Skip to main content

Requirements Generator Tool: Manage requirements, versioning, and virtual environments for Python projects.

Project description

reqgenz

usage: reqgenz.py [-h] [--output_directory OUTPUT_DIRECTORY] [--env-name ENV_NAME] [--list-envs] [--no-env] [--project-name PROJECT_NAME] [--project-description PROJECT_DESCRIPTION]
                 [--project-author PROJECT_AUTHOR] [--pin PIN] [--skip-install] [--merge-requirements] [--dev] [--pipfile] [--verbose] [--bump {major,minor,patch}] [--log-file LOG_FILE]
                 [--dockerfile] [--visualize-graph] [--main-script MAIN_SCRIPT] [--package-manager {uv,poetry,pip}] [--python-env-version PYTHON_ENV_VERSION [PYTHON_ENV_VERSION ...]]
                 [--activate-env ACTIVATE_ENV] [--deactivate-env DEACTIVATE_ENV] [--create-reqs-file] [--create-pyproject]
                 source_directory

Requirements Generator Tool: Manage requirements, versioning, and virtual environments for Python projects.

positional arguments:
  source_directory      Directory to recursively search for Python files and generate requirements from imports.

optional arguments:
  -h, --help            show this help message and exit
  --output_directory OUTPUT_DIRECTORY
                        Directory to save generated files.
  --env-name ENV_NAME   Specify the name of the virtual environment to create (default: 'env').
  --list-envs           List all virtual environments.
  --no-env              Skip creating a virtual environment and install dependencies in the global Python environment.
  --project-name PROJECT_NAME
                        Set the project name for pyproject.toml (default: 'auto_generated_project').
  --project-description PROJECT_DESCRIPTION
                        Set the project description for pyproject.toml (default: 'A project generated by RequirementsGenerator').
  --project-author PROJECT_AUTHOR
                        Set the project author for pyproject.toml (default: 'Your Name <you@example.com>').
  --pin PIN             Pin a dependency to a specific version. Usage: --pin package==version. Can be used multiple times.
  --skip-install        Skip the installation of dependencies after generating requirements.
  --merge-requirements  Merge newly detected dependencies into an existing requirements.txt file, instead of overwriting it.
  --dev                 Include development dependencies (like pytest, black) in pyproject.toml.
  --pipfile             Generate a Pipfile for pipenv users (in addition to requirements.txt and pyproject.toml).
  --verbose             Enable verbose logging for detailed output during the execution.
  --bump {major,minor,patch}
                        Bump the version in pyproject.toml:
                          major: Increment the major version (e.g., 1.0.0 -> 2.0.0)
                          minor: Increment the minor version (e.g., 1.1.0 -> 1.2.0)
                          patch: Increment the patch version (e.g., 1.1.1 -> 1.1.2)
  --log-file LOG_FILE   Specify a log file to save logs.
  --dockerfile          Generate a Dockerfile for the project.
  --visualize-graph     Visualize the dependency graph.
  --main-script MAIN_SCRIPT
                        Specify the main script to run in the Docker container (default: 'your_script.py').
  --package-manager {uv,poetry,pip}
                        Specify the package manager to use (default: 'pip').
  --python-env-version PYTHON_ENV_VERSION [PYTHON_ENV_VERSION ...]
                        Specify the Python versions to use for the virtual environments (default: 'python3').
  --activate-env ACTIVATE_ENV
                        Activate a specific virtual environment by specifying the env path.
  --deactivate-env DEACTIVATE_ENV
                        Deactivate virtual environment.
  --create-reqs-file    Create a requirements.txt file.
  --create-pyproject    Create a pyproject.toml file.

installation

curl -sSf https://raw.githubusercontent.com/webcoderz/reqgenz/main/install.sh | bash

or

git clone https://github.com/webcoderz/reqgenz.git
cd reqgenz
python3 reqgenz/src/reqgenz.py

or

pip install reqgenz

how to use

this script utilizes python standard library and does not require any additional dependencies, any additional dependencies are installed depending on the options you choose. (uv,poetry,matplotlib,networkx)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reqgenz-0.1.6.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

reqgenz-0.1.6-py2.py3-none-any.whl (17.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file reqgenz-0.1.6.tar.gz.

File metadata

  • Download URL: reqgenz-0.1.6.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for reqgenz-0.1.6.tar.gz
Algorithm Hash digest
SHA256 18ff3e14413f80f7e998cfe29392b63db9f5261ff5d7def84ef98721ee263496
MD5 a1c4efe0adb5e200a7956aa06ce236d4
BLAKE2b-256 bda7014704733d1653086579f8948c19c5185697fe52ae7a895f3be2cbe25b9a

See more details on using hashes here.

File details

Details for the file reqgenz-0.1.6-py2.py3-none-any.whl.

File metadata

  • Download URL: reqgenz-0.1.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for reqgenz-0.1.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 dc6be6c9759e23e5c9ed86dc35ef3fc1c16372ab9d3a0a42a3e8c240782cbce7
MD5 46821038ae4205e1b1c629cc451fe938
BLAKE2b-256 98c9c53502bee6777b3283760a996a012d9f2eb4c299b7d7c107d3c57a792ac2

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