No project description provided
Project description
python-dependency-resolver
Install
From PyPI
pip install python-dependency-resolver
From source
rm build/ python_dependency_resolver.egg-info dist -Rf
python3 setup.py bdist_wheel
pip3 install -I dist/python_dependency_resolver-*-py3-none-any.whl
How to use
Use case 1
flowchart TD
B --> A
C --> A
C --> B
D --> C
D --> A
E --> C
E --> B
F --> G
from python_dependency_resolver import DependencyResolver
tree = {
'A': [],
'B': ['A'],
'C': ['B', 'A'],
'D': ['C', 'A'],
'E': ['C', 'B'],
'F': ['G'],
'G': []
}
dependency_resolver = DependencyResolver()
dependency_resolver.resolve(tree)
# ['A', 'B', 'C', 'D', 'E', 'G', 'F']
Use case 2
flowchart TD
B --> A
A --> B
from python_dependency_resolver import DependencyResolver
tree = {
'A': ['B'],
'B': ['A']
}
dependency_resolver = DependencyResolver()
dependency_resolver.resolve(tree)
# CircularReferenceException: Circular reference detected: B -> A
Use case 3
flowchart TD
B --> A
C --> A
from python_dependency_resolver import DependencyResolver
tree = {
'B': ['A'],
'C': ['A'],
#'A': ()
}
dependency_resolver = DependencyResolver()
dependency_resolver.resolve(tree)
# MissingReferenceException: Missing reference detected: A
Documentation
- https://www.electricmonk.nl/log/2008/08/07/dependency-resolving-algorithm/
- http://mamchenkov.net/wordpress/2016/11/22/dependency-resolution-with-graphs-in-php/
Contributors
Anthony K GROSS
Joshua Behrens
Copyright and license
Code and documentation copyright 2024. Code released under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_dependency_resolver-1.0.4-py3-none-any.whl.
File metadata
- Download URL: python_dependency_resolver-1.0.4-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfc42431ca3bd1362c9cee13b40e1b974042a4a850b4724ffa89313f87b938a7
|
|
| MD5 |
49cd5cfc5988ac837117f565e52b3513
|
|
| BLAKE2b-256 |
4722f22794c76d5c4b8edf020dedd9b5854eb254ea3acd2df37d864467efc266
|
Provenance
The following attestation bundles were made for python_dependency_resolver-1.0.4-py3-none-any.whl:
Publisher:
main.yml on anthonykgross/python-dependency-resolver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_dependency_resolver-1.0.4-py3-none-any.whl -
Subject digest:
bfc42431ca3bd1362c9cee13b40e1b974042a4a850b4724ffa89313f87b938a7 - Sigstore transparency entry: 156001730
- Sigstore integration time:
-
Permalink:
anthonykgross/python-dependency-resolver@2fcead547a16d5d6fb9aa1b9678f64d253bcc16a -
Branch / Tag:
refs/tags/1.0.4 - Owner: https://github.com/anthonykgross
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@2fcead547a16d5d6fb9aa1b9678f64d253bcc16a -
Trigger Event:
release
-
Statement type: