Skip to main content

A tool to manage Python requirements files and their backups

Project description

Requirements Manager

A Python package for managing requirements.txt files and their backups. This will strip the @ file portion for any packages in the requirements.txt file. It will ask the user first if they want to strip these. If not, it will simply replicate running pip freeze > requirements.txt

Installation

pip install requirements-manager

Usage

from requirements_manager import handle_requirements_update, cleanup_old_backups

# Update requirements
handle_requirements_update('requirements.txt', 'new_requirements.txt')

# Clean up old backups
cleanup_old_backups(max_backups=5)

CLI Usage

# Update requirements.txt or simply generate a new requirements.txt file.
reqmanager update

# Update requirements with optional flags
reqmanager update [--source <source_file>] [--destination <destination_file>]

# Clean up backups with optional flags
reqmanager cleanup --max-backups 5 [--backup-dir <backup_directory>]

Clean up backups

reqmanager cleanup --max-backups 5

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

requirements_manager-0.1.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

requirements_manager-0.1.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file requirements_manager-0.1.1.tar.gz.

File metadata

  • Download URL: requirements_manager-0.1.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for requirements_manager-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c524ed615d50d7eba4aba6980ccd03825a753c187e00dc896c9ff6889b6ccbc0
MD5 d183ec03e10f282314f433e3c5250d67
BLAKE2b-256 fd3f7857869c7799354b5ec911c93345e667a1a155a0b380b1634813e8a1168b

See more details on using hashes here.

File details

Details for the file requirements_manager-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for requirements_manager-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 069e53d2a708fc87d9c324d4c04d0f2bc46350853c7cf0be0e04d2b16aea76dc
MD5 436e0901e8b9f3aac99404a6cd5bf813
BLAKE2b-256 dc4125f2ac5e03b7315967e061e1fd3448319a4022f56919831744e285b368d3

See more details on using hashes here.

Supported by

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