hgraph


Namehgraph JSON
Version 0.4.102 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-10-28 12:21:56
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, evaluate_graph, GraphConfiguration, const, debug_print

@graph
def main():
    a = const(1)
    c = a + 2
    debug_print("a + 2", c)

evaluate_graph(main, GraphConfiguration())
```
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
```


## Indexing with Context7 MCP

This repository includes a baseline configuration for Context7 MCP to improve code search and retrieval quality.

- See docs/context7_indexing.md for guidance.
- The root-level context7.yaml config sets sensible include/exclude rules, priorities, and summarization hints.

            

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/4b/14/2b4cccf4270c0485ef1325667efc10efebed5fd719da26526d3d72f24326/hgraph-0.4.102.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, evaluate_graph, GraphConfiguration, const, debug_print\n\n@graph\ndef main():\n    a = const(1)\n    c = a + 2\n    debug_print(\"a + 2\", c)\n\nevaluate_graph(main, GraphConfiguration())\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\n\n## Indexing with Context7 MCP\n\nThis repository includes a baseline configuration for Context7 MCP to improve code search and retrieval quality.\n\n- See docs/context7_indexing.md for guidance.\n- The root-level context7.yaml config sets sensible include/exclude rules, priorities, and summarization hints.\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.102",
    "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": "425d10b443bdedfcf51ef87cb780b00bf5233d82471b5d8383116d371af3398b",
                "md5": "d41da2f3f5e710df73e5ee3b86aaf3e4",
                "sha256": "d17bc08ba42a818c6d58de1f5b8f2e3479ef85358454f96505f71f927ce80923"
            },
            "downloads": -1,
            "filename": "hgraph-0.4.102-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d41da2f3f5e710df73e5ee3b86aaf3e4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 549298,
            "upload_time": "2025-10-28T12:21:55",
            "upload_time_iso_8601": "2025-10-28T12:21:55.049048Z",
            "url": "https://files.pythonhosted.org/packages/42/5d/10b443bdedfcf51ef87cb780b00bf5233d82471b5d8383116d371af3398b/hgraph-0.4.102-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4b142b4cccf4270c0485ef1325667efc10efebed5fd719da26526d3d72f24326",
                "md5": "5b4f42082cb8378b270a6322ef013a69",
                "sha256": "9160b7d7a41cd994981202640d8892d6388f8fdcdb04c228eb254892ea7d4e6e"
            },
            "downloads": -1,
            "filename": "hgraph-0.4.102.tar.gz",
            "has_sig": false,
            "md5_digest": "5b4f42082cb8378b270a6322ef013a69",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 850725,
            "upload_time": "2025-10-28T12:21:56",
            "upload_time_iso_8601": "2025-10-28T12:21:56.776794Z",
            "url": "https://files.pythonhosted.org/packages/4b/14/2b4cccf4270c0485ef1325667efc10efebed5fd719da26526d3d72f24326/hgraph-0.4.102.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-28 12:21:56",
    "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.29101s