hgraph


Namehgraph JSON
Version 0.4.73 PyPI version JSON
download
home_pageNone
SummaryA 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.
upload_time2025-08-29 07:47:25
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT
keywords forward propogating graph fpg frp functional functional reactive programming graph reactive time series time-series
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # 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:

```python
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](https://hgraph.readthedocs.io/en/latest/) for more information.

## Development

The project is currently configured to make use of [uv](https://github.com/astral-sh/uv) for dependency management. 
Take a look at the website to see how best to install the tool.

Here are some useful commands:

First, create a virtual environment in the project directory:

```bash
uv venv
```

Then use the following command to install the project and its dependencies:

```bash
# Install the project with all dependencies
uv pip install -e .

# Install with optional dependencies
uv pip install -e ".[docs,web,notebook]"

# Install with all optional dependencies
uv pip install -e ".[docs,web,notebook,test]"
```

PyCharm can make use of the virtual environment created by uv to ``setup`` the project.

### Run Tests

```bash
# No Coverage
python -m pytest
```

```bash
# Generate Coverage Report
python -m pytest --cov=hgraph --cov-report=xml
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "hgraph",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "forward propogating graph, fpg, frp, functional, functional reactive programming, graph, reactive, time series, time-series",
    "author": null,
    "author_email": "Howard Henson <howard@henson.me.uk>, Alexander Balabin <balabin@me.com>, Simon Young <whepstead@gmail.com>, Tope Olukemi <tolukemi@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/97/ed/bd624720e9bd5436f40e274a668a80ce86bb579978554389f4cf4e6a215e/hgraph-0.4.73.tar.gz",
    "platform": null,
    "description": "# hgraph\nA functional reactive programming engine with a Python front-end.\n\nThis provides a DSL and runtime to support the computation of results over time, featuring\na graph based directed acyclic dependency graph and the concept of time-series properties.\nThe language is function-based, and promotes composition to extend behaviour.\n\nHere is a simple example:\n\n```python\nfrom hgraph import graph, run_graph, const\nfrom hgraph.nodes import debug_print\n\n@graph\ndef main():\n    a = const(1)\n    c = a + 2\n    debug_print(\"a + 2\", c)\n\nrun_graph(main)\n```\nResults in:\n```\n[1970-01-01 00:00:00.000385][1970-01-01 00:00:00.000001] a + 2: 3\n```\n\nSee [this](https://hgraph.readthedocs.io/en/latest/) for more information.\n\n## Development\n\nThe project is currently configured to make use of [uv](https://github.com/astral-sh/uv) for dependency management. \nTake a look at the website to see how best to install the tool.\n\nHere are some useful commands:\n\nFirst, create a virtual environment in the project directory:\n\n```bash\nuv venv\n```\n\nThen use the following command to install the project and its dependencies:\n\n```bash\n# Install the project with all dependencies\nuv pip install -e .\n\n# Install with optional dependencies\nuv pip install -e \".[docs,web,notebook]\"\n\n# Install with all optional dependencies\nuv pip install -e \".[docs,web,notebook,test]\"\n```\n\nPyCharm can make use of the virtual environment created by uv to ``setup`` the project.\n\n### Run Tests\n\n```bash\n# No Coverage\npython -m pytest\n```\n\n```bash\n# Generate Coverage Report\npython -m pytest --cov=hgraph --cov-report=xml\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "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.",
    "version": "0.4.73",
    "project_urls": {
        "Changelog": "https://github.com/hhenson/hgraph/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/hhenson/hgraph/blob/main/docs/index.md",
        "Homepage": "https://github.com/hhenson/hgraph",
        "Issues": "https://github.com/hhenson/hgraph/blob/main/ISSUES.md",
        "Repository": "https://github.com/hhenson/hgraph.git"
    },
    "split_keywords": [
        "forward propogating graph",
        " fpg",
        " frp",
        " functional",
        " functional reactive programming",
        " graph",
        " reactive",
        " time series",
        " time-series"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8ac324736f7b188672ee01eb4cb943e630d67b1940010deaccfc480c26e80fab",
                "md5": "bcc038a0e8590cc40a06f2fe2f0dafcb",
                "sha256": "0e287614d07d41510136f765b5964a4673fa7210b1c01438d50d2ac29ce76e13"
            },
            "downloads": -1,
            "filename": "hgraph-0.4.73-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bcc038a0e8590cc40a06f2fe2f0dafcb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 533077,
            "upload_time": "2025-08-29T07:47:23",
            "upload_time_iso_8601": "2025-08-29T07:47:23.152678Z",
            "url": "https://files.pythonhosted.org/packages/8a/c3/24736f7b188672ee01eb4cb943e630d67b1940010deaccfc480c26e80fab/hgraph-0.4.73-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "97edbd624720e9bd5436f40e274a668a80ce86bb579978554389f4cf4e6a215e",
                "md5": "6f87bde3f976cb718d5ff729b6052e01",
                "sha256": "df285f881c243fa3e392cb3edf3a4e3f155377d3f83d6aa682215d9b94211872"
            },
            "downloads": -1,
            "filename": "hgraph-0.4.73.tar.gz",
            "has_sig": false,
            "md5_digest": "6f87bde3f976cb718d5ff729b6052e01",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 819184,
            "upload_time": "2025-08-29T07:47:25",
            "upload_time_iso_8601": "2025-08-29T07:47:25.042016Z",
            "url": "https://files.pythonhosted.org/packages/97/ed/bd624720e9bd5436f40e274a668a80ce86bb579978554389f4cf4e6a215e/hgraph-0.4.73.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-29 07:47:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hhenson",
    "github_project": "hgraph",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "hgraph"
}
        
Elapsed time: 2.79743s