DepSolve
This is an asyncio agnostic dependency tree solver
The idea is to take out the problem of depencies solving from packages managers or importers
Usage
import asyncio
from depsolve import Dependency, walk
async def perform_importation(dependency: Dependency):
# here your package/whatever is supposed to inherit from `Dependency`
# if any other argument is need for the command line in the package
# have a look to functools.partial()
await asyncio.sleep(2)
async def main():
dependencies = [
Dependency(name='land'),
Dependency(name='hen', depends_on=['land']),
Dependency(name='eggs', depends_on=['hen']),
Dependency(name='sugar_cane', depends_on=['land']),
Dependency(name='plain flour', depends_on=['wheat']),
Dependency(name='sugar', depends_on=['sugar_cane']),
Dependency(name='genoise', depends_on=['eggs', 'sugar']),
Dependency(name='strawberry', depends_on=['land']),
Dependency(name='wheat', depends_on=['land']),
Dependency(name='sirop', depends_on=['strawberry']),
Dependency(name='cake', depends_on=['genoise', 'strawberry', 'sirop']),
Dependency(name='cooking', depends_on=['cake'])
]
for items in walk(dependencies):
deps_names = [dep.name for dep in items]
print(f'dependencies to install: {len(items)} : {", ".join(deps_names)}')
tasks = asyncio.gather(*[perform_importation(dep) for dep in items])
await tasks
if __name__ == "__main__":
asyncio.run(main())
wich output:
dependencies to install: 1 : land
dependencies to install: 4 : hen, sugar_cane, strawberry, wheat
dependencies to install: 4 : eggs, plain flour, sugar, sirop
dependencies to install: 1 : genoise
dependencies to install: 1 : cake
dependencies to install: 1 : cooking
Metadata
Release files for depsolve 0.2.1
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 |
|---|---|---|---|---|
| depsolve-0.2.1.tar.gz | 2.5 kB | Without provenance | Details for depsolve-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| depsolve-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for depsolve-0.2.1-py3-none-any.whl |
Total release size: 5.8 kB
Release files / depsolve-0.2.1.tar.gz
| Download URL | depsolve-0.2.1.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98bffc138121fd767780b4bdf8bce30e3888d97a460964b530afc5b4230492ca
|
|
BLAKE2b-256 checksum How to use checksums |
c4986f09e342e2a933b8e193fabc41a806097f9c07ab124b44a74d51c03bbb58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.11.5 Linux/6.5.6-arch2-1
|
Release files / depsolve-0.2.1-py3-none-any.whl
| Download URL | depsolve-0.2.1-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff20075600c3ec26804fc30b7006eef69770623622768c6f5b2036ecc5a53699
|
|
BLAKE2b-256 checksum How to use checksums |
e6bffe5378131e0c5434458527d17bbad42341788c0ad809cbf3259c709b6704
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.11.5 Linux/6.5.6-arch2-1
|
Security for depsolve 0.2.1
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.