Graph Scheduler
A graph scheduler generates the order in which the nodes of a directed acyclic graph (DAG) are executed using the structure of the graph and expressive conditions. Specifically, a scheduler uses a topological ordering of the nodes as a base sequence of execution and further restricts execution based on predefined or custom conditions provided by the user. Patterns of execution are linked to abstract units of time and may optionally be mapped to real time units using pint.
Documentation is available on github-pages for the current
release and for the
current main
branch. For
prior releases, go to
https://kmantel.github.io/graph-scheduler/tag/<tag_name>.
Installation
Install from pypi:
pip install graph-scheduler
Example
The graph is specified here in dependency dictionary format, but networkx Digraphs are also supported.
>>> import graph_scheduler
>>> graph = {
'A': set(),
'B': {'A'},
'C': {'A'},
'D': {'B', 'C'},
}
>>> sched = graph_scheduler.Scheduler(graph=graph)
>>> sched.add_condition('C', graph_scheduler.EveryNCalls('A', 2))
>>> sched.add_condition('D', graph_scheduler.EveryNCalls('C', 2))
>>> print(list(sched.run()))
[{'A'}, {'B'}, {'A'}, {'C', 'B'}, {'A'}, {'B'}, {'A'}, {'C', 'B'}, {'D'}]
Metadata
Release files for graph-scheduler 1.2.2
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 |
|---|---|---|---|---|
| graph-scheduler-1.2.2.tar.gz | 95.1 kB | Without provenance | Details for graph-scheduler-1.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| graph_scheduler-1.2.2-py3-none-any.whl | Python 3 | none | any | Details for graph_scheduler-1.2.2-py3-none-any.whl |
Total release size: 147.6 kB
Release files / graph-scheduler-1.2.2.tar.gz
| Download URL | graph-scheduler-1.2.2.tar.gz |
|---|---|
| Size | 95.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d43bcff55decde8106a9b592d8899e788985b504111163545de257cfd7df6ec1
|
|
BLAKE2b-256 checksum How to use checksums |
ce21df5a22c07318cffd32cecfe5a212d4e37d1e5194e3c96b27ce49a046c119
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Release files / graph_scheduler-1.2.2-py3-none-any.whl
| Download URL | graph_scheduler-1.2.2-py3-none-any.whl |
|---|---|
| Size | 52.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c52be82887e662b13177fdb236ac3ebe45faf7cd404d9321eb7d2c058c1ff088
|
|
BLAKE2b-256 checksum How to use checksums |
04207eb9eed7693379ca4d6082a9f76df7985309d71fbf39ad329d4181c73cdd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Security for graph-scheduler 1.2.2
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.