Metadata-Version: 2.4
Name: nexus-engine
Version: 0.6.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Office/Business :: Financial
Classifier: Typing :: Typed
Summary: Python DSL for the Nexus Engine
Keywords: finance,pipeline,dsl,dataframe,etl,nexus-engine,nexus
Author: Synlynx
License: MIT OR Apache-2.0
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://nexus-engine.io
Project-URL: Documentation, https://nexus-engine.synlynx.com

# Nexus Engine

The Python client for [Nexus Engine](https://nexus-engine.io) — a Rust-based calculation engine for financial data
processing.

This package provides a fluent, chainable DSL for building data transformation and calculation pipelines. Define columns
from SQL data sources, apply filters, joins, groupings, conditional logic, and hierarchical breakdowns — then send the
pipeline to Nexus Engine for execution.

> **Note:** Executing pipelines requires access to a running Nexus Engine instance and valid credentials.
> Contact your administrator or visit [nexus-engine.io](https://nexus-engine.io) for access.

## Installation

```bash
pip install nexus-engine
```

## Quick Start

```python
import nexus as nx

# Define source columns from a SQL data view
table = nx.TableBuilder([
    nx.sql_column("Category", nx.DataType.String, "positions", "asset_category"),
    nx.sql_column("Currency", nx.DataType.String, "positions", "local_currency"),
    nx.sql_column("MarketValue", nx.DataType.Float, "positions", "market_value"),
])

# Build a transformation pipeline
pipeline = (
    table
    .filter(nx.col("MarketValue") > nx.lit(10000))
    .group_by(
        by=["Category"],
        aggregations=[("MarketValue", "sum")]
    )
)

# Execute against a Nexus Engine server
result = pipeline.execute(
    params={"account_id": "ACC001", "date": "2025-01-31"},
    api_token="YOUR_API_TOKEN",
)
print(result)
```

## Type Support

The package includes full type stubs (`.pyi`) for IDE autocompletion and type checking with mypy or pyright.

## Documentation

Full documentation and tutorials are available at [nexus-engine.io](https://nexus-engine.io).

## License

Dual-licensed under [MIT](https://opensource.org/licenses/MIT)
or [Apache-2.0](https://opensource.org/licenses/Apache-2.0).

