Metadata-Version: 2.4
Name: hgraph
Version: 0.4.87
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.
Project-URL: Homepage, https://github.com/hhenson/hgraph
Project-URL: Documentation, https://github.com/hhenson/hgraph/blob/main/docs/index.md
Project-URL: Repository, https://github.com/hhenson/hgraph.git
Project-URL: Issues, https://github.com/hhenson/hgraph/blob/main/ISSUES.md
Project-URL: Changelog, https://github.com/hhenson/hgraph/blob/main/CHANGELOG.md
Author-email: Howard Henson <howard@henson.me.uk>, Alexander Balabin <balabin@me.com>, Simon Young <whepstead@gmail.com>, Tope Olukemi <tolukemi@gmail.com>
License: MIT
License-File: LICENSE
Keywords: forward propogating graph,fpg,frp,functional,functional reactive programming,graph,reactive,time series,time-series
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.11
Requires-Dist: black>=25.1.0
Requires-Dist: duckdb
Requires-Dist: frozendict>=2.3.10
Requires-Dist: multimethod
Requires-Dist: numpy>=1.23
Requires-Dist: ordered-set>=4.1.0
Requires-Dist: polars>=1.0
Requires-Dist: psutil
Requires-Dist: pyarrow>=16.1.0
Requires-Dist: pycurl
Requires-Dist: pytz
Requires-Dist: sortedcontainers>=2.4.0
Requires-Dist: sqlalchemy
Requires-Dist: typing-extensions
Provides-Extra: docs
Requires-Dist: pybtex-apa-style>=1.3; extra == 'docs'
Requires-Dist: setuptools; extra == 'docs'
Requires-Dist: sphinx-autodoc-typehints>=2.3.0; extra == 'docs'
Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == 'docs'
Requires-Dist: sphinx>=7.4; extra == 'docs'
Requires-Dist: sphinxcontrib-bibtex; extra == 'docs'
Requires-Dist: sphinxcontrib-plantuml>=0.30; extra == 'docs'
Provides-Extra: messaging
Requires-Dist: kafka-python>=2.1.5; extra == 'messaging'
Provides-Extra: notebook
Requires-Dist: matplotlib; extra == 'notebook'
Provides-Extra: test
Requires-Dist: black; extra == 'test'
Requires-Dist: coverage; extra == 'test'
Requires-Dist: mypy; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pytest-xdist; extra == 'test'
Provides-Extra: web
Requires-Dist: pandas; extra == 'web'
Requires-Dist: perspective-python<4.0.0; extra == 'web'
Requires-Dist: pycurl; extra == 'web'
Requires-Dist: requests; extra == 'web'
Requires-Dist: tornado; extra == 'web'
Description-Content-Type: text/markdown

# 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.
