A functional reactive platform used to process time-series streams. Provides support for backtest (simulation) and realtime time-series processing. Using a forward propagation graph with a microtask scheduler for the runtime engine.
Project description
hgraph
A functional reactive programming engine with a Python front-end.
This provides a DSL and runtime to support the computation of results over time, featuring a graph based directed acyclic dependency graph and the concept of time-series properties. The language is function-based, and promotes composition to extend behaviour.
Here is a simple example:
from hgraph import graph, run_graph, const
from hgraph.nodes import debug_print
@graph
def main():
a = const(1)
c = a + 2
debug_print("a + 2", c)
run_graph(main)
Results in:
[1970-01-01 00:00:00.000385][1970-01-01 00:00:00.000001] a + 2: 3
See this for more information.
Development
The project is currently configured to make use of Poetry for dependency management. Take a look at the website to see how best to install the tool.
Here are some useful commands:
First, this will cause the virtual environment to be installed in the same folder as the project (in .venv folder)
poetry config virtualenvs.in-project true
Use this command to set the version of Python to make use of if you want a specific version of Python.
poetry env use 3.11
Then use the following command to install the project and its dependencies. Note that the --with docs
installs
the dependencies to build the documentation set which is not required otherwise, also the --all-extras
is only
required for the adaptors.
poetry install --with docs --all-extras
If you did not use the first command, you can find the location of the installation using:
poetry env info
PyCharm can make use of poetry to setup
the project.
Run Tests
# No Coverage
poetry run pytest
# Generate Coverage Report
poetry run pytest --cov=your_package_name --cov-report=xml
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 Distribution
Built Distribution
File details
Details for the file hgraph-0.3.28.tar.gz
.
File metadata
- Download URL: hgraph-0.3.28.tar.gz
- Upload date:
- Size: 297.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e92423af3e982f1d6a88575a37c6e238fb14c996760fd6cfbac9d053bcc36e5d |
|
MD5 | 3f39b4755664715a810dd730fdc77c02 |
|
BLAKE2b-256 | e7b8234d95c021e6820c110150ab72b04a4444355f42e9e369e56e5ffb94a7c5 |
Provenance
The following attestation bundles were made for hgraph-0.3.28.tar.gz
:
Publisher:
deploy-on-tag.yml
on hhenson/hgraph
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
hgraph-0.3.28.tar.gz
- Subject digest:
e92423af3e982f1d6a88575a37c6e238fb14c996760fd6cfbac9d053bcc36e5d
- Sigstore transparency entry: 146251752
- Sigstore integration time:
- Predicate type:
File details
Details for the file hgraph-0.3.28-py3-none-any.whl
.
File metadata
- Download URL: hgraph-0.3.28-py3-none-any.whl
- Upload date:
- Size: 420.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 792b56045af260daf812632d7f893e86412341e3d26466c3931b03cb1c17d247 |
|
MD5 | 9abf0083dc68bc74f8c3076e32ea4110 |
|
BLAKE2b-256 | 717cbdfd505da2aa756394c10d960255308d3100fb39214d7695a32af8170f99 |
Provenance
The following attestation bundles were made for hgraph-0.3.28-py3-none-any.whl
:
Publisher:
deploy-on-tag.yml
on hhenson/hgraph
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
hgraph-0.3.28-py3-none-any.whl
- Subject digest:
792b56045af260daf812632d7f893e86412341e3d26466c3931b03cb1c17d247
- Sigstore transparency entry: 146251754
- Sigstore integration time:
- Predicate type: