Metadata-Version: 2.1
Name: elucid8
Version: 0.20.0
Summary: eLucid8 from Python: run programs of values over named dimensions, with DataFrames in and out
Home-page: https://elucid8-lang.org
Author: The eLucid8 Authors
License: MIT OR Apache-2.0
Project-URL: Documentation, https://elucid8-lang.org/learn/python
Project-URL: Playground, https://elucid8-lang.org/play
Keywords: lucid,dataflow,dataframe,time-series,arrow
Classifier: License :: OSI Approved :: MIT License
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Microsoft :: Windows
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
Requires-Dist: pyarrow>=12
Provides-Extra: pandas
Requires-Dist: pandas>=1.5; extra == "pandas"
Provides-Extra: polars
Requires-Dist: polars>=0.20; extra == "polars"
Provides-Extra: postgres
Requires-Dist: psycopg[binary]>=3.1; extra == "postgres"
Provides-Extra: kafka
Requires-Dist: confluent-kafka>=2.3; extra == "kafka"
Provides-Extra: mqtt
Requires-Dist: paho-mqtt>=2.0; extra == "mqtt"
Provides-Extra: duckdb
Requires-Dist: duckdb>=1.0; extra == "duckdb"
Provides-Extra: mysql
Requires-Dist: PyMySQL>=1.1; extra == "mysql"
Provides-Extra: sqlserver
Requires-Dist: pymssql>=2.3; extra == "sqlserver"
Provides-Extra: snowflake
Requires-Dist: adbc-driver-snowflake>=1.0; extra == "snowflake"
Provides-Extra: bigquery
Requires-Dist: adbc-driver-bigquery>=1.3; extra == "bigquery"
Provides-Extra: databricks
Requires-Dist: databricks-sql-connector>=3.0; extra == "databricks"
Description-Content-Type: text/markdown

# eLucid8 for Python

[eLucid8](https://elucid8-lang.org) is a language and runtime for computations over many dimensions: sensor grids, simulations, point-in-time feature tables, training runs. A program is a set of equations; you ask for values, and only what they depend on is computed.

This package runs eLucid8 programs from Python, with pandas or Polars DataFrames and pyarrow tables in and out:

```python
import pandas as pd
import elucid8

program = """
x = input("x", t : 1000)
running = x fby.t (running + next.t x)
ratio = running / x
"""
x = pd.DataFrame({"t": [0, 1, 2, 3, 4, 5], "value": [3, 1, 4, 0, 5, 9]})

table = elucid8.run(program, {"x": x}, query="ratio[t = 2..4]")
print(elucid8.tidy(table))
```

```text
   t  value             error  ts
0  2    2.0              None   0
1  3    NaN  division by zero   0
2  4    2.6              None   0
```

- **`elucid8.run`** runs a program (or a compiled plan) once: queries, or the output channels the program writes.
- **`elucid8.Service`** keeps a program loaded with `elucid8 serve`, and answers queries, new data and subscriptions.
- **`elucid8.compile`** compiles a program, offline, with the compiler in the `elucid8` command (or, when asked, the website's compile endpoint).

Every answer is exactly what the `elucid8` command gives; the wheels for macOS, Linux and Windows bundle it, and `ELUCID8_BIN` names another. The guide is at [elucid8-lang.org/learn/python](https://elucid8-lang.org/learn/python).

Licensed under either of the Apache License, Version 2.0 or the MIT License, at your option.
