FreshDeps
FreshDeps is a Python tool designed to keep your project's dependencies up-to-date by automatically updating your requirements.txt file from requirements.in.
It integrates with GitLab to create merge requests (MRs) for dependency updates, ensuring that you always have fresh and secure dependencies in your project.
Features
- Automatically updates Python dependencies using pip-compile.
- Creates GitLab merge requests with updated dependencies.
- Supports assigning MRs to specific users.
- Prevents duplicate or conflicting MRs by checking existing ones.
- Allows multiple open MRs if needed.
Installation
You can install FreshDeps via pip:
pip install freshdeps
Usage GitLab CI
To use FreshDeps add job and create scheduled pipeline:
stages:
- update-dependencies
variables:
PIP_INDEX_URL: "https://pypi.org/simple"
GITLAB_URL: "https://gitlab.com"
GITLAB_PROJECT_ID: $CI_PROJECT_ID
GITLAB_PRIVATE_TOKEN: $CI_JOB_TOKEN
GITLAB_DEFAULT_BRANCH: "main"
update_dependencies:
stage: update-dependencies
image: python:3.9-slim
script:
- pip install freshdeps pip-tools
- fresh-deps requirements.in --output-file requirements.txt \
--pypi-index-url=$PIP_INDEX_URL \
--gitlab-url=$GITLAB_URL \
--gitlab-project-id=$GITLAB_PROJECT_ID \
--gitlab-private-token=$GITLAB_PRIVATE_TOKEN \
--gitlab-default-branch=$GITLAB_DEFAULT_BRANCH
only:
- schedules # This job will only run on scheduled pipelines (you can adjust this as needed)
Command-line Arguments:
| Argument | Description |
|---|---|
requirements_in |
Path to the input file (.in) containing unpinned requirements. |
--output-file |
Path to output file (.txt) where pinned requirements will be written. |
--pypi-index-url |
PyPI index URL (default: https://pypi.org/simple). |
--gitlab-url |
The URL of your GitLab instance (default: https://gitlab.com). |
--gitlab-project-id |
The ID of the GitLab project where MRs should be created. |
--gitlab-private-token |
Your private token for authenticating with GitLab API. |
--gitlab-assignee |
Username of a user who should be assigned to review the MR (optional). |
--gitlab-default-branch |
Default branch name in your repository (default: main). |
--gitlab-allow-multiple-mrs |
Allow multiple open merge requests at once (optional flag). |
Handling Merge Requests:
-
If there are no changes detected between current and newly generated dependency files, no MR will be created.
-
If an MR already exists for similar changes, FreshDeps prevents creating duplicates unless explicitly allowed via flags.
Metadata
Release files for freshdeps 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| freshdeps-1.0.3.tar.gz | 5.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| freshdeps-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.2 kB
Release files / freshdeps-1.0.3.tar.gz
| Download URL | freshdeps-1.0.3.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41f35fa224e97cdc7da8c27aede33ef32797faddce07902ae4a883231406fc3e
|
|
BLAKE2b-256 checksum How to use checksums |
e531b1a68dd20802f86d45854980be5fbb434079741c25b1d758511cbfdc4d90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.10
|
Release files / freshdeps-1.0.3-py3-none-any.whl
| Download URL | freshdeps-1.0.3-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
19104a9757e1df291b602fd605e27c0ead9a65a3c62d8d824b7ef4b1bd3b74fb
|
|
BLAKE2b-256 checksum How to use checksums |
d4c59e25525031337811539da717803e65fbde5e4f7262d9d615fbde2917b3d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.10
|
Security for freshdeps 1.0.3
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.