Metadata-Version: 2.4
Name: elasticube
Version: 0.1.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: pyarrow>=14.0.0
Requires-Dist: pandas>=2.0.0
Requires-Dist: pytest>=7.0 ; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21 ; extra == 'dev'
Requires-Dist: maturin>=1.0 ; extra == 'dev'
Requires-Dist: polars>=0.19.0 ; extra == 'polars'
Requires-Dist: matplotlib>=3.5.0 ; extra == 'viz'
Requires-Dist: seaborn>=0.12.0 ; extra == 'viz'
Requires-Dist: ipython>=8.0.0 ; extra == 'jupyter'
Requires-Dist: jupyter>=1.0.0 ; extra == 'jupyter'
Requires-Dist: notebook>=6.5.0 ; extra == 'jupyter'
Requires-Dist: polars>=0.19.0 ; extra == 'all'
Requires-Dist: matplotlib>=3.5.0 ; extra == 'all'
Requires-Dist: seaborn>=0.12.0 ; extra == 'all'
Requires-Dist: ipython>=8.0.0 ; extra == 'all'
Requires-Dist: jupyter>=1.0.0 ; extra == 'all'
Requires-Dist: notebook>=6.5.0 ; extra == 'all'
Provides-Extra: dev
Provides-Extra: polars
Provides-Extra: viz
Provides-Extra: jupyter
Provides-Extra: all
Summary: High-performance OLAP cube library with Rust backend
Keywords: olap,analytics,cube,arrow,datafusion
Home-Page: https://github.com/cachemcclure/elasticube
Author-email: Cache McClure <cache.mcclure@gmail.com>
Maintainer: Horizon Analytic Studios
License: MIT OR Apache-2.0
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/cachemcclure/elasticube
Project-URL: Repository, https://github.com/cachemcclure/elasticube
Project-URL: Issues, https://github.com/cachemcclure/elasticube/issues
Project-URL: Documentation, https://github.com/cachemcclure/elasticube/tree/main/elasticube-py

# ElastiCube Python Bindings

High-performance OLAP cube library for Python, powered by Rust, Apache Arrow, and DataFusion.

## Features

- **Fast**: Native Rust implementation with near C-level performance
- **Columnar Storage**: Efficient memory layout using Apache Arrow
- **Familiar API**: Pandas-like interface for data scientists
- **Type Safe**: Full type hints and stub files for IDE support
- **No Pre-Aggregation**: Query raw data with dynamic aggregations

## Installation

```bash
pip install elasticube
```

## Quick Start

```python
from elasticube import ElastiCubeBuilder

# Build a cube from CSV data
builder = ElastiCubeBuilder()
builder.add_dimension("region", "string")
builder.add_dimension("date", "date")
builder.add_measure("sales", "float64", "sum")
builder.add_measure("quantity", "int32", "sum")
builder.load_csv("sales_data.csv")

cube = builder.build()

# Query the cube
query = cube.query()
query.select(["region", "SUM(sales)", "SUM(quantity)"])
query.filter("date >= '2024-01-01'")
query.group_by(["region"])
query.order_by(["region"])

# Get results as Pandas DataFrame
df = query.to_pandas()
print(df)
```

## Supported Data Types

- **Numeric**: `int32`, `int64`, `float32`, `float64`
- **Text**: `string` (utf8)
- **Temporal**: `date`, `timestamp`
- **Boolean**: `bool`

## Aggregation Functions

- `sum` - Sum of values
- `avg` / `mean` - Average
- `min` - Minimum value
- `max` - Maximum value
- `count` - Count of non-null values
- `count_distinct` - Count of unique values
- `median` - Median value
- `stddev` - Standard deviation
- `variance` - Variance

## Data Sources

ElastiCube supports multiple data source formats:

- **CSV**: `builder.load_csv("data.csv")`
- **Parquet**: `builder.load_parquet("data.parquet")`
- **JSON**: `builder.load_json("data.json")`

## License

Dual licensed under MIT or Apache-2.0.

