Skip to main content

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

hgraph-0.3.32.tar.gz (296.9 kB view details)

Uploaded Source

Built Distribution

hgraph-0.3.32-py3-none-any.whl (419.5 kB view details)

Uploaded Python 3

File details

Details for the file hgraph-0.3.32.tar.gz.

File metadata

  • Download URL: hgraph-0.3.32.tar.gz
  • Upload date:
  • Size: 296.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for hgraph-0.3.32.tar.gz
Algorithm Hash digest
SHA256 e4ee24563b548c4b7fd4288aa754059222c9c0cd9369a30d9ac50dca4e7e3864
MD5 5025ff89208364c39c7dc64c4d70d2f6
BLAKE2b-256 46c7e895c2520ba421e523d09fda6526035982b21cf22bb1a7c64d10e18fb890

See more details on using hashes here.

Provenance

The following attestation bundles were made for hgraph-0.3.32.tar.gz:

Publisher: deploy-on-tag.yml on hhenson/hgraph

Attestations:

File details

Details for the file hgraph-0.3.32-py3-none-any.whl.

File metadata

  • Download URL: hgraph-0.3.32-py3-none-any.whl
  • Upload date:
  • Size: 419.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for hgraph-0.3.32-py3-none-any.whl
Algorithm Hash digest
SHA256 8264716f2319dd132d3276fee91c7944d410652b402931ba4a9e3d0a0cc1d94c
MD5 05eeefb9fe2541b0858f61050c6eb043
BLAKE2b-256 ce034f94c24141f0a0f618aed6d0dbc699cbfabc06e26195660cef933c737979

See more details on using hashes here.

Provenance

The following attestation bundles were made for hgraph-0.3.32-py3-none-any.whl:

Publisher: deploy-on-tag.yml on hhenson/hgraph

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page