hedron-data 0.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hedron_data-0.5.0/.gitignore +23 -0
- hedron_data-0.5.0/CHANGELOG.md +15 -0
- hedron_data-0.5.0/LICENSE +21 -0
- hedron_data-0.5.0/PKG-INFO +58 -0
- hedron_data-0.5.0/README.md +13 -0
- hedron_data-0.5.0/pyproject.toml +72 -0
- hedron_data-0.5.0/src/hedron_data/__init__.py +53 -0
- hedron_data-0.5.0/src/hedron_data/assets/tabulator/editor.css +14 -0
- hedron_data-0.5.0/src/hedron_data/assets/tabulator/editor.js +425 -0
- hedron_data-0.5.0/src/hedron_data/columns.py +103 -0
- hedron_data-0.5.0/src/hedron_data/editor.py +366 -0
- hedron_data-0.5.0/src/hedron_data/memory.py +203 -0
- hedron_data-0.5.0/src/hedron_data/normalize.py +124 -0
- hedron_data-0.5.0/src/hedron_data/plugin.py +84 -0
- hedron_data-0.5.0/src/hedron_data/py.typed +0 -0
- hedron_data-0.5.0/src/hedron_data/sources.py +147 -0
- hedron_data-0.5.0/src/hedron_data/table.py +128 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.DS_Store
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.egg-info/
|
|
6
|
+
.eggs/
|
|
7
|
+
dist/
|
|
8
|
+
/build/
|
|
9
|
+
.venv/
|
|
10
|
+
venv/
|
|
11
|
+
.env
|
|
12
|
+
.coverage
|
|
13
|
+
htmlcov/
|
|
14
|
+
.pytest_cache/
|
|
15
|
+
.mypy_cache/
|
|
16
|
+
.ruff_cache/
|
|
17
|
+
.hypothesis/
|
|
18
|
+
.tox/
|
|
19
|
+
.nox/
|
|
20
|
+
.audit-build-proj/
|
|
21
|
+
examples/reference-app/.hedron/
|
|
22
|
+
*.html.gz
|
|
23
|
+
/site/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.5.0] - 2026-08-03
|
|
4
|
+
|
|
5
|
+
- Initial `hedron-data` package: data-source protocols, `DataTable`, `DataEditor`,
|
|
6
|
+
in-memory paged sources (sync + async), optional Narwhals dataframe normalization, and
|
|
7
|
+
Tabulator-shaped browser adapter assets.
|
|
8
|
+
- Async sources require explicit `page=` at construction; sync `apply_changes` raises for
|
|
9
|
+
awaitable `apply` and `apply_changes_async` awaits correctly.
|
|
10
|
+
- Writable-field policy rejects forged read-only/hidden fields, unauthorized deletes, and
|
|
11
|
+
non-mapping inserts.
|
|
12
|
+
- DataEditor host: undo DOM restore, insert/delete, save modes, conflict actions, choices
|
|
13
|
+
and boolean editors, escaped selectors; CSS fingerprinted via plugin assets.
|
|
14
|
+
|
|
15
|
+
[0.5.0]: https://github.com/eddiethedean/hedron/releases/tag/v0.5.0
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Odos Matthews
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hedron-data
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: DataTable, DataEditor, and data-source toolkit for Hedron
|
|
5
|
+
Project-URL: Homepage, https://github.com/eddiethedean/hedron
|
|
6
|
+
Project-URL: Repository, https://github.com/eddiethedean/hedron
|
|
7
|
+
Project-URL: Issues, https://github.com/eddiethedean/hedron/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/eddiethedean/hedron/blob/main/packages/hedron-data/CHANGELOG.md
|
|
9
|
+
Project-URL: Documentation, https://hedron.readthedocs.io/en/latest/
|
|
10
|
+
Author-email: Odos Matthews <odosmatthews@gmail.com>
|
|
11
|
+
Maintainer-email: Odos Matthews <odosmatthews@gmail.com>
|
|
12
|
+
License-Expression: MIT
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Keywords: components,data,dataeditor,datatable,hedron,tabulator
|
|
15
|
+
Classifier: Development Status :: 3 - Alpha
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Programming Language :: Python
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
25
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
|
|
26
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
27
|
+
Classifier: Typing :: Typed
|
|
28
|
+
Requires-Python: <3.15,>=3.11
|
|
29
|
+
Requires-Dist: hedron-core==0.5.0
|
|
30
|
+
Provides-Extra: dataframes
|
|
31
|
+
Requires-Dist: narwhals>=1.0; extra == 'dataframes'
|
|
32
|
+
Requires-Dist: pandas>=2.0; extra == 'dataframes'
|
|
33
|
+
Requires-Dist: polars>=1.0; extra == 'dataframes'
|
|
34
|
+
Requires-Dist: pyarrow>=15.0; extra == 'dataframes'
|
|
35
|
+
Provides-Extra: pandas
|
|
36
|
+
Requires-Dist: narwhals>=1.0; extra == 'pandas'
|
|
37
|
+
Requires-Dist: pandas>=2.0; extra == 'pandas'
|
|
38
|
+
Provides-Extra: polars
|
|
39
|
+
Requires-Dist: narwhals>=1.0; extra == 'polars'
|
|
40
|
+
Requires-Dist: polars>=1.0; extra == 'polars'
|
|
41
|
+
Provides-Extra: pyarrow
|
|
42
|
+
Requires-Dist: narwhals>=1.0; extra == 'pyarrow'
|
|
43
|
+
Requires-Dist: pyarrow>=15.0; extra == 'pyarrow'
|
|
44
|
+
Description-Content-Type: text/markdown
|
|
45
|
+
|
|
46
|
+
# hedron-data
|
|
47
|
+
|
|
48
|
+
Data application toolkit for Hedron: `DataTable`, `DataEditor`, typed data-source
|
|
49
|
+
protocols, optional dataframe normalization, and a Tabulator-backed grid Web
|
|
50
|
+
Component.
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pip install hedron-data
|
|
54
|
+
# Optional dataframe extras:
|
|
55
|
+
pip install "hedron-data[dataframes]"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Requires `hedron-core`. First release: `0.5.0`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# hedron-data
|
|
2
|
+
|
|
3
|
+
Data application toolkit for Hedron: `DataTable`, `DataEditor`, typed data-source
|
|
4
|
+
protocols, optional dataframe normalization, and a Tabulator-backed grid Web
|
|
5
|
+
Component.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install hedron-data
|
|
9
|
+
# Optional dataframe extras:
|
|
10
|
+
pip install "hedron-data[dataframes]"
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Requires `hedron-core`. First release: `0.5.0`.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "hedron-data"
|
|
3
|
+
version = "0.5.0"
|
|
4
|
+
description = "DataTable, DataEditor, and data-source toolkit for Hedron"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.11,<3.15"
|
|
7
|
+
license = "MIT"
|
|
8
|
+
license-files = ["LICENSE"]
|
|
9
|
+
authors = [
|
|
10
|
+
{ name = "Odos Matthews", email = "odosmatthews@gmail.com" },
|
|
11
|
+
]
|
|
12
|
+
maintainers = [
|
|
13
|
+
{ name = "Odos Matthews", email = "odosmatthews@gmail.com" },
|
|
14
|
+
]
|
|
15
|
+
keywords = [
|
|
16
|
+
"components",
|
|
17
|
+
"data",
|
|
18
|
+
"datatable",
|
|
19
|
+
"dataeditor",
|
|
20
|
+
"hedron",
|
|
21
|
+
"tabulator",
|
|
22
|
+
]
|
|
23
|
+
classifiers = [
|
|
24
|
+
"Development Status :: 3 - Alpha",
|
|
25
|
+
"Intended Audience :: Developers",
|
|
26
|
+
"License :: OSI Approved :: MIT License",
|
|
27
|
+
"Programming Language :: Python",
|
|
28
|
+
"Programming Language :: Python :: 3",
|
|
29
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
30
|
+
"Programming Language :: Python :: 3.11",
|
|
31
|
+
"Programming Language :: Python :: 3.12",
|
|
32
|
+
"Programming Language :: Python :: 3.13",
|
|
33
|
+
"Programming Language :: Python :: 3.14",
|
|
34
|
+
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
|
|
35
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
36
|
+
"Typing :: Typed",
|
|
37
|
+
]
|
|
38
|
+
dependencies = [
|
|
39
|
+
"hedron-core==0.5.0",
|
|
40
|
+
]
|
|
41
|
+
|
|
42
|
+
[project.optional-dependencies]
|
|
43
|
+
pandas = ["pandas>=2.0", "narwhals>=1.0"]
|
|
44
|
+
polars = ["polars>=1.0", "narwhals>=1.0"]
|
|
45
|
+
pyarrow = ["pyarrow>=15.0", "narwhals>=1.0"]
|
|
46
|
+
dataframes = ["pandas>=2.0", "polars>=1.0", "pyarrow>=15.0", "narwhals>=1.0"]
|
|
47
|
+
|
|
48
|
+
[project.entry-points."hedron.plugins"]
|
|
49
|
+
hedron_data = "hedron_data.plugin:register"
|
|
50
|
+
|
|
51
|
+
[project.urls]
|
|
52
|
+
Homepage = "https://github.com/eddiethedean/hedron"
|
|
53
|
+
Repository = "https://github.com/eddiethedean/hedron"
|
|
54
|
+
Issues = "https://github.com/eddiethedean/hedron/issues"
|
|
55
|
+
Changelog = "https://github.com/eddiethedean/hedron/blob/main/packages/hedron-data/CHANGELOG.md"
|
|
56
|
+
Documentation = "https://hedron.readthedocs.io/en/latest/"
|
|
57
|
+
|
|
58
|
+
[build-system]
|
|
59
|
+
requires = ["hatchling"]
|
|
60
|
+
build-backend = "hatchling.build"
|
|
61
|
+
|
|
62
|
+
[tool.hatch.build.targets.wheel]
|
|
63
|
+
packages = ["src/hedron_data"]
|
|
64
|
+
|
|
65
|
+
[tool.hatch.build.targets.sdist]
|
|
66
|
+
only-include = [
|
|
67
|
+
"src/hedron_data",
|
|
68
|
+
"README.md",
|
|
69
|
+
"CHANGELOG.md",
|
|
70
|
+
"LICENSE",
|
|
71
|
+
"pyproject.toml",
|
|
72
|
+
]
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""hedron-data: DataTable, DataEditor, and data-source toolkit."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from hedron_data.columns import Column, columns_from_model, resolve_columns
|
|
6
|
+
from hedron_data.editor import DataEditor, conflict_actions, filter_writable_changes
|
|
7
|
+
from hedron_data.memory import AsyncInMemoryDataSource, InMemoryDataSource
|
|
8
|
+
from hedron_data.normalize import normalize_rows
|
|
9
|
+
from hedron_data.sources import (
|
|
10
|
+
DEFAULT_MAX_PAGE_SIZE,
|
|
11
|
+
HARD_MAX_PAGE_SIZE,
|
|
12
|
+
AsyncDataEditorSource,
|
|
13
|
+
CellUpdate,
|
|
14
|
+
ColumnSchema,
|
|
15
|
+
Conflict,
|
|
16
|
+
DataChanges,
|
|
17
|
+
DataEditorSource,
|
|
18
|
+
DataPage,
|
|
19
|
+
DataQuery,
|
|
20
|
+
DataSaveResult,
|
|
21
|
+
FieldError,
|
|
22
|
+
VisualizationSource,
|
|
23
|
+
)
|
|
24
|
+
from hedron_data.table import DataTable
|
|
25
|
+
|
|
26
|
+
__version__ = "0.5.0"
|
|
27
|
+
|
|
28
|
+
__all__ = [
|
|
29
|
+
"DEFAULT_MAX_PAGE_SIZE",
|
|
30
|
+
"HARD_MAX_PAGE_SIZE",
|
|
31
|
+
"AsyncDataEditorSource",
|
|
32
|
+
"AsyncInMemoryDataSource",
|
|
33
|
+
"CellUpdate",
|
|
34
|
+
"Column",
|
|
35
|
+
"ColumnSchema",
|
|
36
|
+
"Conflict",
|
|
37
|
+
"DataChanges",
|
|
38
|
+
"DataEditor",
|
|
39
|
+
"DataEditorSource",
|
|
40
|
+
"DataPage",
|
|
41
|
+
"DataQuery",
|
|
42
|
+
"DataSaveResult",
|
|
43
|
+
"DataTable",
|
|
44
|
+
"FieldError",
|
|
45
|
+
"InMemoryDataSource",
|
|
46
|
+
"VisualizationSource",
|
|
47
|
+
"__version__",
|
|
48
|
+
"columns_from_model",
|
|
49
|
+
"conflict_actions",
|
|
50
|
+
"filter_writable_changes",
|
|
51
|
+
"normalize_rows",
|
|
52
|
+
"resolve_columns",
|
|
53
|
+
]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.hedron-data-editor { display: block; }
|
|
2
|
+
.hedron-data-editor-toolbar { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
|
|
3
|
+
.hedron-data-editor-conflicts { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
|
|
4
|
+
.hedron-data-editor-conflicts[hidden] { display: none; }
|
|
5
|
+
.hedron-data-editor-grid { width: 100%; border-collapse: collapse; }
|
|
6
|
+
.hedron-data-editor-grid th,
|
|
7
|
+
.hedron-data-editor-grid td { border: 1px solid currentColor; padding: 0.25rem 0.5rem; }
|
|
8
|
+
.hedron-sr-only {
|
|
9
|
+
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
|
|
10
|
+
overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
|
|
11
|
+
}
|
|
12
|
+
.hedron-data-table { width: 100%; border-collapse: collapse; }
|
|
13
|
+
.hedron-data-table th,
|
|
14
|
+
.hedron-data-table td { border-bottom: 1px solid currentColor; padding: 0.35rem 0.5rem; text-align: left; }
|