hgraph


Namehgraph JSON
Version 0.3.43 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-01-17 16:52:07
maintainerNone
docs_urlNone
authorHoward Henson
requires_python>=3.11
licenseMIT
keywords reactive graph fpg forward propogating graph time series functional reactive programming frp functional 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 [Poetry](https://python-poetry.org) 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)

```bash
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.

```bash
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.

```bash
poetry install --with docs --all-extras
```

If you did not use the first command, you can find the location of the installation using:

```bash
poetry env info
```

PyCharm can make use of poetry to ``setup`` the project.

### Run Tests

```bash
# No Coverage
poetry run pytest
```

```bash
# Generate Coverage Report
poetry run pytest --cov=your_package_name --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": "reactive, graph, fpg, forward propogating graph, time series, functional reactive programming, frp, functional, time-series",
    "author": "Howard Henson",
    "author_email": "howard@henson.me.uk",
    "download_url": "https://files.pythonhosted.org/packages/8a/b3/b8d7c21b7eb8f73779ea809eb0d75112e4e3dec8d119e648f8f94386c87a/hgraph-0.3.43.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 [Poetry](https://python-poetry.org) 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, this will cause the virtual environment to be installed in the same folder as the project (in .venv folder)\n\n```bash\npoetry config virtualenvs.in-project true\n```\n\nUse this command to set the version of Python to make use of if you want a specific version of Python.\n\n```bash\npoetry env use 3.11\n```\n\nThen use the following command to install the project and its dependencies. Note that the ``--with docs`` installs\nthe dependencies to build the documentation set which is not required otherwise, also the ``--all-extras`` is only\nrequired for the adaptors.\n\n```bash\npoetry install --with docs --all-extras\n```\n\nIf you did not use the first command, you can find the location of the installation using:\n\n```bash\npoetry env info\n```\n\nPyCharm can make use of poetry to ``setup`` the project.\n\n### Run Tests\n\n```bash\n# No Coverage\npoetry run pytest\n```\n\n```bash\n# Generate Coverage Report\npoetry run pytest --cov=your_package_name --cov-report=xml\n```\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.3.43",
    "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": [
        "reactive",
        " graph",
        " fpg",
        " forward propogating graph",
        " time series",
        " functional reactive programming",
        " frp",
        " functional",
        " time-series"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7eaf8ebbb55a5a85b685fe2d356aa9d60d5703aa90855c1d3b9de2d5721a1d0c",
                "md5": "651e09b77264663b311538a5d757421c",
                "sha256": "a1589122a8eaca9fa549197d0424c94db0f608537b20ebb4ee149e1752f76986"
            },
            "downloads": -1,
            "filename": "hgraph-0.3.43-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "651e09b77264663b311538a5d757421c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 445428,
            "upload_time": "2025-01-17T16:52:04",
            "upload_time_iso_8601": "2025-01-17T16:52:04.927006Z",
            "url": "https://files.pythonhosted.org/packages/7e/af/8ebbb55a5a85b685fe2d356aa9d60d5703aa90855c1d3b9de2d5721a1d0c/hgraph-0.3.43-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8ab3b8d7c21b7eb8f73779ea809eb0d75112e4e3dec8d119e648f8f94386c87a",
                "md5": "c3d427dd3681608faac8123addc0c245",
                "sha256": "50ab84258eb162e3e24381efea41619fd51541cc7024fdbae9f74e95db757259"
            },
            "downloads": -1,
            "filename": "hgraph-0.3.43.tar.gz",
            "has_sig": false,
            "md5_digest": "c3d427dd3681608faac8123addc0c245",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 312420,
            "upload_time": "2025-01-17T16:52:07",
            "upload_time_iso_8601": "2025-01-17T16:52:07.151812Z",
            "url": "https://files.pythonhosted.org/packages/8a/b3/b8d7c21b7eb8f73779ea809eb0d75112e4e3dec8d119e648f8f94386c87a/hgraph-0.3.43.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-17 16:52:07",
    "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: 0.48278s