Skip to main content

python updater

Project description

cupdate

Python requirements.txt updater.

Installation

pip install cupdate

Usage

Basic Update

# Update all packages in requirements.txt
cupdate

With Exclusions

Create a cupdate.config.txt file to exclude packages:

# cupdate.config.txt
numpy
pandas==1.5.0
tensorflow

Then run:

cupdate

Features

  • Smart Updates - Preserves version operators (>=, <=, ==)
  • Package Exclusions - Skip specific packages from updates
  • Release Information - Shows package age and project URLs
  • Formatted Output - Clean table display of updates
  • PyPI Integration - Fetches latest versions and metadata

Example Output

NAME         OLD      NEW      AGE        INFO
------------ -------- -------- ---------- -------------------------
requests     2.28.1   2.31.0   2 months   https://pypi.org/project/requests/
flask        2.2.2    3.0.0    3 weeks    https://pypi.org/project/flask/
numpy        1.24.0   1.26.2   1 month    https://pypi.org/project/numpy/

✨ requirements.txt updated with 3 packages

Configuration

Exclusion File Format

# Lines starting with # are comments
package-name
another-package>=1.0.0
specific-version==2.1.0

Version Operators

cupdate preserves your version constraints:

  • package==1.0.0package==1.2.0 (exact version)
  • package>=1.0.0package>=1.2.0 (minimum version)
  • package<=2.0.0package<=2.1.0 (maximum version)

Requirements File Support

Works with standard requirements.txt format:

# requirements.txt
requests==2.28.1
flask>=2.2.0
numpy<=1.24.0
pandas

Command Line Interface

# Update requirements in current directory
cupdate

# The tool automatically looks for:
# - requirements.txt (required)
# - cupdate.config.txt (optional exclusions)

Error Handling

  • Missing requirements.txt - Shows error and exits
  • Network issues - Shows warnings, continues with available data
  • Invalid packages - Skips problematic packages with warnings
  • Missing exclusions - Continues normally, updates all packages

Integration Examples

CI/CD Pipeline

# .github/workflows/update-deps.yml
name: Update Dependencies
on:
  schedule:
    - cron: '0 0 * * 1'  # Weekly on Monday

jobs:
  update:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: '3.11'
      - name: Install cupdate
        run: pip install cupdate
      - name: Update requirements
        run: cupdate
      - name: Create PR
        # ... create pull request with changes

Development Workflow

# 1. Install cupdate
pip install cupdate

# 2. Create exclusions (optional)
echo "tensorflow" > cupdate.config.txt

# 3. Update dependencies
cupdate

# 4. Install updated packages
pip install -r requirements.txt

# 5. Test your application
python -m pytest

Package Information

The tool provides rich information about updates:

  • Package Name - The package being updated
  • Old Version - Current version in requirements.txt
  • New Version - Latest available version
  • Age - How long ago the new version was released
  • Info URL - Link to package homepage or PyPI page

Contributing

Contributions are welcome! Please read our contributing guidelines and submit pull requests to our repository.

License

MIT

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

cupdate-2.0.2.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

cupdate-2.0.2-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file cupdate-2.0.2.tar.gz.

File metadata

  • Download URL: cupdate-2.0.2.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for cupdate-2.0.2.tar.gz
Algorithm Hash digest
SHA256 8a1a7a4a7c0cb88fe06fd5465d7b0354c78551d746a16051914dd4ed0b6f475a
MD5 857abd4b83839a96b122722a6169e298
BLAKE2b-256 70acf61d6e89ff32d736de6fe7328a2bcb65c8bb60b5ab6a8a50152e7cb5e994

See more details on using hashes here.

Provenance

The following attestation bundles were made for cupdate-2.0.2.tar.gz:

Publisher: release.yml on seydx/cupdate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cupdate-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: cupdate-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for cupdate-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 50351e505c3c7de204c6d34f320318cde3ec254952d37378f0a49e9da2719d85
MD5 1d4cdad305f20df253272d8b2c9b6b97
BLAKE2b-256 d01938bd912dd84ed00e0af0b3079f1a775d12b6ea060d6bce3af2f4e8b73b9c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cupdate-2.0.2-py3-none-any.whl:

Publisher: release.yml on seydx/cupdate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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