Metadata-Version: 2.4
Name: hedron-data
Version: 0.27.0
Summary: DataTable, DataEditor, and data-source toolkit for Hedron
Project-URL: Homepage, https://github.com/eddiethedean/hedron
Project-URL: Repository, https://github.com/eddiethedean/hedron
Project-URL: Issues, https://github.com/eddiethedean/hedron/issues
Project-URL: Changelog, https://github.com/eddiethedean/hedron/blob/main/packages/hedron-data/CHANGELOG.md
Project-URL: Documentation, https://hedron.readthedocs.io/en/latest/
Author-email: Odos Matthews <odosmatthews@gmail.com>
Maintainer-email: Odos Matthews <odosmatthews@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: components,data,dataeditor,datatable,hedron,tabulator
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: <3.15,>=3.11
Requires-Dist: hedron-core<0.28,>=0.27.0
Provides-Extra: aggrid
Provides-Extra: dask
Requires-Dist: dask[dataframe]>=2024.1; extra == 'dask'
Provides-Extra: dataframes
Requires-Dist: narwhals>=1.0; extra == 'dataframes'
Requires-Dist: pandas>=2.0; extra == 'dataframes'
Requires-Dist: polars>=1.0; extra == 'dataframes'
Requires-Dist: pyarrow>=15.0; extra == 'dataframes'
Provides-Extra: pandas
Requires-Dist: narwhals>=1.0; extra == 'pandas'
Requires-Dist: pandas>=2.0; extra == 'pandas'
Provides-Extra: polars
Requires-Dist: narwhals>=1.0; extra == 'polars'
Requires-Dist: polars>=1.0; extra == 'polars'
Provides-Extra: pyarrow
Requires-Dist: narwhals>=1.0; extra == 'pyarrow'
Requires-Dist: pyarrow>=15.0; extra == 'pyarrow'
Provides-Extra: snowflake
Requires-Dist: snowflake-connector-python>=3.0; extra == 'snowflake'
Provides-Extra: spreadsheet
Provides-Extra: sqlalchemy
Requires-Dist: sqlalchemy<3,>=2.0; extra == 'sqlalchemy'
Provides-Extra: sqlmodel
Requires-Dist: sqlalchemy<3,>=2.0; extra == 'sqlmodel'
Requires-Dist: sqlmodel>=0.0.22; extra == 'sqlmodel'
Description-Content-Type: text/markdown

# hedron-data

[![PyPI](https://img.shields.io/pypi/v/hedron-data.svg)](https://pypi.org/project/hedron-data/)
[![Python](https://img.shields.io/pypi/pyversions/hedron-data.svg)](https://pypi.org/project/hedron-data/)
[![CI](https://img.shields.io/github/actions/workflow/status/eddiethedean/hedron/ci.yml?branch=main&label=CI)](https://github.com/eddiethedean/hedron/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/eddiethedean/hedron/blob/main/LICENSE)

DataTable, DataEditor, and data-source toolkit for Hedron.

Typed data-source protocols, optional dataframe normalization, and a
Tabulator-backed grid Web Component — registered through the public Hedron
plugin contract. Install as `hedron-data` or via the flagship extra `hedron[data]`.

**Package maturity:** Beta · **Train:** `0.27.x` (last published `0.27.0`) · pin `>=0.27.0,<0.28`

## Install

```bash
pip install "hedron-data>=0.27.0,<0.28"
# or
uv add "hedron-data>=0.27.0,<0.28"
# via flagship:
pip install "hedron[data]>=0.27.0,<0.28"
```

Requires Python 3.11–3.14 and `hedron-core`.

### Optional extras

| Extra | Purpose |
|---|---|
| `dataframes` | pandas + polars + pyarrow (+ narwhals) |
| `pandas` / `polars` / `pyarrow` | Individual dataframe stacks |
| `sqlalchemy` / `sqlmodel` | ORM-backed sources |
| `dask` | Dask dataframe support |
| `snowflake` | Snowflake connector |
| `aggrid` / `spreadsheet` | Reserved feature gates (no heavy deps) |

```bash
pip install "hedron-data[dataframes]>=0.27.0,<0.28"
pip install "hedron-data[sqlalchemy]>=0.27.0,<0.28"
```

## Quick start

```python
from hedron_data import DataTable

rows = [
    {"name": "Ada", "team": "Platform"},
    {"name": "Grace", "team": "Compiler"},
]
table = DataTable(rows, caption="Employees", page_size=25)
```

Use inside a Hedron `Page` (FastAPI / Flask / Django). Prefer a typed
`row_model` when you want validated columns:

```python
from pydantic import BaseModel
from hedron_data import DataTable


class EmployeeRow(BaseModel):
    name: str
    team: str


table = DataTable(rows, row_model=EmployeeRow, caption="Employees")
```

## What this package includes

- `DataTable` — paginated, sortable grid with HTMX-friendly refresh
- `DataEditor` — editable grid workflows
- Typed `DataSource` protocols and dataframe normalization helpers
- Tabulator-backed Web Component assets (plugin-registered)

## Links

- [Package docs](https://hedron.readthedocs.io/en/latest/packages/hedron-data/)
- [Data apps guide](https://hedron.readthedocs.io/en/latest/guides/data-apps/)
- [DataTable](https://hedron.readthedocs.io/en/latest/components/data-table/) ·
  [DataEditor](https://hedron.readthedocs.io/en/latest/components/data-editor/)
- [Changelog](https://github.com/eddiethedean/hedron/blob/main/packages/hedron-data/CHANGELOG.md)
- [Source](https://github.com/eddiethedean/hedron/tree/main/packages/hedron-data)
- [Issues](https://github.com/eddiethedean/hedron/issues)
- [`hedron-core`](https://pypi.org/project/hedron-core/) ·
  [`hedron`](https://pypi.org/project/hedron/)

## License

MIT. See the [repository license](https://github.com/eddiethedean/hedron/blob/main/LICENSE).
