Skip to main content

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

With a Cooldown

Only take releases that are at least some days old, so a hijacked release has time to be found and pulled before it lands in your pins:

cupdate --cooldown 7 --cooldown-exclude 'my-org-*'

A package with no release old enough stays where it is, and a package never moves below its current pin. --cooldown-exclude takes a glob and can be repeated, for your own packages that should update at once.

Features

  • Smart Updates - Preserves version operators (>=, <=, ==)
  • In-place Rewrites - Only the version number changes, environment markers, comments and order stay
  • 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.0 → package==1.2.0 (exact version)
  • package>=1.0.0 → package>=1.2.0 (minimum version)
  • package<=2.0.0 → package<=2.1.0 (maximum version)

Requirements File Support

Works with standard requirements.txt format:

# requirements.txt
requests==2.28.1
flask[async]>=2.2.0
numpy<=1.24.0
onnxruntime==1.29.0; platform_machine != "x86_64"

Only the version number of a pinned requirement is replaced. Everything around it is written back byte for byte, including environment markers, extras, inline comments, blank lines, line order and CRLF endings.

Lines that do not pin a single version are left alone and never looked up:

-r base.txt
--index-url https://example.com/simple
numpy>=2.0,<3
hailort @ https://example.com/hailort-4.21.0.whl ; platform_machine == "aarch64"
pandas

Command Line Interface

# Update requirements in current directory
cupdate

# Only releases at least 7 days old, own packages excepted
cupdate --cooldown 7 --cooldown-exclude 'my-org-*'

# 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

Metadata

Release files for cupdate 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cupdate 2.1.0
File Size Uploaded Provenance Actions
cupdate-2.1.0.tar.gz 9.6 kB With provenance Details for cupdate-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cupdate 2.1.0
File Interpreter ABI Platform Actions
cupdate-2.1.0-py3-none-any.whl Python 3 none any Details for cupdate-2.1.0-py3-none-any.whl

Total release size: 17.9 kB

Release files / cupdate-2.1.0.tar.gz

Download URL cupdate-2.1.0.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6041aaaccf8a970563638ec0378a85c2252274184a1caa7a4190b6c2e536f3a9
BLAKE2b-256 checksum
How to use checksums
2f7009ba61ffdad6adb2f2f6bb3be2be5f46c4688725fecee9f18e8a5db6f63a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / cupdate-2.1.0-py3-none-any.whl

Download URL cupdate-2.1.0-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
23dd443163956d9bdf33f76d8c413150a6bd345f35990ca2ed3d322f51c8a459
BLAKE2b-256 checksum
How to use checksums
eba0bde2c52aae7473c58f7d6c01d5c0fc1ab4dc9b7460b9bdbf79c9ed9ec460
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Security for cupdate 2.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cupdate-2.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page