dependency-resolver
Define external dependencies for a project using a JSON file, then fetch and resolve them into the project.
Ideally for python versions > 3.11, but should be cope with 3.10, although different dependencies will be introduced (see requirements.txt)
For list of supported commands run dependency-resolver/resolve.py -h
Better notes will be added here in due course!
Description
Define external dependencies (publicly (https) available files) for a project using a JSON file, then fetch and resolve them into the project.
The JSON file can then be versioned controlled with the project instead of the dependencies themselves.
Each dependency has a source and a target that defines where the dependency is and where it should be resolved to locally.
### Fetching and Resolving Getting dependencies is a two-step process.
- The dependency source is fetched (downloaded) and added to a local cache as is.
- This source can then be resolved from the cache to the local dependency target.
Each dependency can specify an action to be carried out when resolving the source from the cache to the dependency target:
- Copy the fetched file.
- Unzip the fetched .zip.
- Untar the fetched .tar.
Multiple dependencies can use the same source and each can resolve it to different target locations using different actions.
Using a cache means the same dependency source is fetch only once for all dependencies that use it, but resolved any number of times.
Static dependencies can only be fetched on its initial run, and dynamic ones can be fetched every time its run.
Configuration
The JSON configuration file (examples are in the examples folder in the repository): { "project" : "MyProject", // The name of the project (mandatory). This will also determine the top level of the cache where all sources are fetched to, allowing different projects to have different caches.
"dependencies" :
[
{
// Example of a dependency which is copied to a target directory.
"name" : "Download_Latest_Version", // The name of the dependency (mandatory). Must be unique.
"description" : "The latest version of myThing.", // A description for this dependency (optional).
"target_dir" : "/put/latest/here", // The local directory to resolve this dependency to (mandatory).
"target_name" : "myThing.app", // The target file name (optional).
"source" : "latest" // The source to use (mandatory).
},
{
// Example of a dependency which is unzipped to a target directory.
"name" : "Unzip_Useful_Stuff", // The name of the dependency (mandatory). Must be unique.
"description" : "A useful zip file.", // A description for this dependency (optional).
"target_dir" : "/useful/stuff/", // The local directory to resolve this dependency to (mandatory).
"source" : "myfiles", // The source to use (mandatory).
"source_path" : "this/zip/useful.zip", // A path relative to the "base" directory defined in the source (optional, unless using a source with a protocol of 'filesystem').
"resolve_action" : "unzip" // The action to perform when resolving the dependency (optional). Options: unzip, untar, copy - defaults to copy.
}
],
"sources" :
[
{
"name" : "internal", // The name of the source (mandatory). Must be unique.
"protocol" : "filesystem", // The protocol used to fetch the source (optional). Options: filesystem (from some local directory), https - defaults to https.
"type" : "project" // Options are: project (the dependency's source_path is relative to this configuration file) or absolute (the dependency's source_path is an absolute path) - defaults to project.
},
{
"name" : "latest", // The name of the source (mandatory). Must be unique.
"protocol" : "https", // The protocol used to fetch the source (optional). Options: filesystem (from some local directory), https - defaults to https.
"base" : "https://downloads.example.com/latest/myThing_5_13_5_linux64.app" // The address of the source (mandatory). The dependency's 'source_path' can extend this address.
},
{
"name" : "myfiles", // The name of the source (mandatory). Must be unique.
"protocol" : "https", // The protocol used to fetch the source (optional). Options: filesystem (from some local directory), https - defaults to https.
"base" : "https://downloads.example.com/stuff" // The address of the source (mandatory). The dependency's 'source_path' can extend this address.
}
]
}
Installation
Create a virtual environment (optional)
python3 -m venv .env/dependency-resolver
. .env/dependency-resolver/bin/activate
Install archive-and-release
pip install dependency-resolver
Exit the virtual environment
deactivate
Commands
See all commands/help
dependency-resolver -h
Individual command options/help
dependency-resolver <cmd> -h
Print the configuration JSON
Can be used to make sure the configuration JSON file being used is the expected one.
dependency-resolver print_config --configPath examples/sample.json
Test the configuration JSON
Tests the given JSON file to make sure it valid. Its quite a basic test, but should detect anything glaring.
dependency-resolver validate_config --configPath examples/sample.json
Print dependency target
This can be used to programmatically determine where a given dependency will be resolved to. This could be used to refer to the dependency from other places in your project.
dependency-resolver print_dependency_target --configPath examples/sample.json --name Download_Latest_Version
Fetch all dependencies
Downloads all sources into the cache.
dependency-resolver update_cache --configPath examples/sample.json
Empty the cache and then download all sources into the cache.
dependency-resolver update_cache --configPath examples/sample.json --clean
Resolve all fetched dependencies
Resolves all dependencies that have previously been fetched. If they have not been fetched then this will thrown an error.
dependency-resolver resolve_from_cache --configPath examples/sample.json
Fetch and resolve all dependencies
Fetches all sources (if required) and resolves them.
dependency-resolver resolve --configPath examples/sample.json
Metadata
Release files for dependency-resolver 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 | Actions |
|---|---|---|---|---|
| dependency_resolver-1.0.3.tar.gz | 32.8 kB | With provenance | Details for dependency_resolver-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dependency_resolver-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for dependency_resolver-1.0.3-py3-none-any.whl |
Total release size: 76.1 kB
Release files / dependency_resolver-1.0.3.tar.gz
| Download URL | dependency_resolver-1.0.3.tar.gz |
|---|---|
| Size | 32.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b679f6f2f4430733cb07a8f721c738554313d1debec4b3db983aa1e2b9babf4
|
|
BLAKE2b-256 checksum How to use checksums |
81f365ec2d301a31aa648151c6c030c93f84180de6d1c4dd3b38265e3240cfde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 1, 2026.
Transparency logRelease files / dependency_resolver-1.0.3-py3-none-any.whl
| Download URL | dependency_resolver-1.0.3-py3-none-any.whl |
|---|---|
| Size | 43.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5a4545895cef7d383b496bf3732ea7120ab34bd2c5802df05c7fc5ebd6fb562
|
|
BLAKE2b-256 checksum How to use checksums |
f553a9c0964b596a5ce2e8a0fdecb0b88cbe69d5a32d5aa9b5c19ac81856547c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 1, 2026.
Transparency logSecurity for dependency-resolver 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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for dependency_resolver-1.0.3.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 Jun 1, 2026.
Transparency logA 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.