sqlalchemy2-datatables 0.6.2__tar.gz → 0.7.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.
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/.github/workflows/tests.yml +1 -12
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/PKG-INFO +22 -4
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/README.md +19 -1
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/pyproject.toml +1 -1
- sqlalchemy2_datatables-0.7.0/src/datatables/__init__.py +19 -0
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/src/datatables/datatable.py +1 -1
- sqlalchemy2_datatables-0.7.0/tests/test_deprecation.py +10 -0
- sqlalchemy2_datatables-0.6.2/.ruff_cache/.gitignore +0 -1
- sqlalchemy2_datatables-0.6.2/.ruff_cache/CACHEDIR.TAG +0 -1
- sqlalchemy2_datatables-0.6.2/.ruff_cache/content/1bfb1d209df2751 +0 -0
- sqlalchemy2_datatables-0.6.2/.ruff_cache/content/1cd7e2ead7835072 +0 -0
- sqlalchemy2_datatables-0.6.2/.ruff_cache/content/20a2e55e2b69bc83 +0 -0
- sqlalchemy2_datatables-0.6.2/.ruff_cache/content/46714d0ee3f4db3c +0 -0
- sqlalchemy2_datatables-0.6.2/.ruff_cache/content/481d47e8574ef7a +0 -0
- sqlalchemy2_datatables-0.6.2/.ruff_cache/content/8d92eac5bcca0a0d +0 -0
- sqlalchemy2_datatables-0.6.2/.ruff_cache/content/92264006609bd820 +0 -0
- sqlalchemy2_datatables-0.6.2/.ruff_cache/content/931036ccd6f5a963 +0 -0
- sqlalchemy2_datatables-0.6.2/.ruff_cache/content/9e2c20dba2efd59 +0 -0
- sqlalchemy2_datatables-0.6.2/.ruff_cache/content/a28c53b2ae76fda0 +0 -0
- sqlalchemy2_datatables-0.6.2/.ruff_cache/content/c9b774223abb1eed +0 -0
- sqlalchemy2_datatables-0.6.2/.ruff_cache/content/d601f07f6ddd4e39 +0 -0
- sqlalchemy2_datatables-0.6.2/.ruff_cache/content/d938708223347279 +0 -0
- sqlalchemy2_datatables-0.6.2/.ruff_cache/content/dbedbb93c0a21bfc +0 -0
- sqlalchemy2_datatables-0.6.2/.ruff_cache/content/e1b4bd1f287df2ad +0 -0
- sqlalchemy2_datatables-0.6.2/.ruff_cache/content/f4ebf3376dd21365 +0 -0
- sqlalchemy2_datatables-0.6.2/src/datatables/__init__.py +0 -8
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/.gitignore +0 -0
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/.pre-commit-config.yaml +0 -0
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/LICENCE +0 -0
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/src/datatables/base.py +0 -0
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/src/datatables/py.typed +0 -0
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/tests/__init__.py +0 -0
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/tests/fixtures.py +0 -0
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/tests/models.py +0 -0
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/tests/test_datatable_callbacks.py +0 -0
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/tests/test_datatable_columns.py +0 -0
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/tests/test_datatable_order.py +0 -0
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/tests/test_datatable_pagination.py +0 -0
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/tests/test_datatable_search.py +0 -0
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/tests/test_dt_column.py +0 -0
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/tests/test_dt_column_order.py +0 -0
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/tests/test_dt_data_callbacks.py +0 -0
- {sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/tests/test_dt_params.py +0 -0
|
@@ -35,16 +35,5 @@ jobs:
|
|
|
35
35
|
run: |
|
|
36
36
|
COVERAGE=$(pytest --cov=src)
|
|
37
37
|
echo "$COVERAGE"
|
|
38
|
-
echo "COVERAGE="$(echo $COVERAGE | grep -e "
|
|
38
|
+
echo "COVERAGE="$(echo "$COVERAGE" | grep -e "TOTAL" | grep -oE "[0-9]{2,3}%" | grep -oE "[0-9]{2,3}") >> $GITHUB_ENV
|
|
39
39
|
|
|
40
|
-
- name: Create Awesome Badge
|
|
41
|
-
uses: schneegans/dynamic-badges-action@v1.6.0
|
|
42
|
-
with:
|
|
43
|
-
auth: ${{ secrets.GIST_SECRET }}
|
|
44
|
-
gistID: e13951fb715ab39a15dfb6c504284537
|
|
45
|
-
filename: coverage.json
|
|
46
|
-
label: coverage
|
|
47
|
-
message: ${{ env.COVERAGE }}%
|
|
48
|
-
minColorRange: 50
|
|
49
|
-
valColorRange: ${{ env.COVERAGE }}
|
|
50
|
-
maxColorRange: 100
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: sqlalchemy2-datatables
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
4
4
|
Summary: Python Sqlalchemy 2.0 based serverside processing for jQuery datatables.
|
|
5
5
|
Project-URL: Homepage, https://github.com/coding-doc/sqlalchemy2-datatables
|
|
6
6
|
Author-email: "R. Hannes Niedner" <hniedner@gmail.com>
|
|
7
7
|
License-Expression: MIT
|
|
8
8
|
License-File: LICENCE
|
|
9
|
-
Classifier: Development Status ::
|
|
9
|
+
Classifier: Development Status :: 7 - Inactive
|
|
10
10
|
Classifier: Environment :: Web Environment
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: Intended Audience :: Information Technology
|
|
@@ -47,10 +47,28 @@ Description-Content-Type: text/markdown
|
|
|
47
47
|
|
|
48
48
|
# sqlalchemy2-datatables
|
|
49
49
|
|
|
50
|
+
> [!WARNING]
|
|
51
|
+
> **This project is no longer maintained and will be archived. 0.7.0 is its final release.**
|
|
52
|
+
>
|
|
53
|
+
> Its successor is [`datatables-backend`](https://github.com/hniedner/datatables-backend). There is also SpryMedia's
|
|
54
|
+
> official [`datatables_server`](https://datatables.net/manual/python). Which one to choose:
|
|
55
|
+
>
|
|
56
|
+
> - **`datatables_server`:** SQL through sync SQLAlchemy Core, especially if you need editing (DataTables Editor),
|
|
57
|
+
> SearchPanes or ColumnControl. It is maintained by the makers of DataTables.
|
|
58
|
+
> - **`datatables-backend`:** read-only tables on async (or sync) SQLAlchemy 2, or on OpenSearch. The server declares
|
|
59
|
+
> its columns, and every source gets the same search, SearchBuilder and safety rules. It is pre-alpha as of
|
|
60
|
+
> 2026-11.
|
|
61
|
+
>
|
|
62
|
+
> Known issues that will not be fixed in this package:
|
|
63
|
+
> - `length` defaults to `-1`, so a request without `length` reads the whole table.
|
|
64
|
+
> - `LIKE` wildcards in search values are not escaped.
|
|
65
|
+
> - Client-supplied regular expressions are run.
|
|
66
|
+
> - A column index outside the table raises an error.
|
|
67
|
+
> - Error messages from the database are returned to the client.
|
|
68
|
+
|
|
50
69
|
[](https://github.com/hniedner/sqlalchemy2-datatables)
|
|
51
70
|
[](https://github.com/pydantic/pydantic/blob/main/LICENSE)
|
|
52
71
|
[](https://github.com/coding-doc/sqlalchemy2-datatables/actions/workflows/tests.yml)
|
|
53
|
-

|
|
54
72
|
|
|
55
73
|
### Summary
|
|
56
74
|
sqlalchemy2-datatables is a framework agnostic library providing an SQLAlchemy integration of
|
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
# sqlalchemy2-datatables
|
|
2
2
|
|
|
3
|
+
> [!WARNING]
|
|
4
|
+
> **This project is no longer maintained and will be archived. 0.7.0 is its final release.**
|
|
5
|
+
>
|
|
6
|
+
> Its successor is [`datatables-backend`](https://github.com/hniedner/datatables-backend). There is also SpryMedia's
|
|
7
|
+
> official [`datatables_server`](https://datatables.net/manual/python). Which one to choose:
|
|
8
|
+
>
|
|
9
|
+
> - **`datatables_server`:** SQL through sync SQLAlchemy Core, especially if you need editing (DataTables Editor),
|
|
10
|
+
> SearchPanes or ColumnControl. It is maintained by the makers of DataTables.
|
|
11
|
+
> - **`datatables-backend`:** read-only tables on async (or sync) SQLAlchemy 2, or on OpenSearch. The server declares
|
|
12
|
+
> its columns, and every source gets the same search, SearchBuilder and safety rules. It is pre-alpha as of
|
|
13
|
+
> 2026-11.
|
|
14
|
+
>
|
|
15
|
+
> Known issues that will not be fixed in this package:
|
|
16
|
+
> - `length` defaults to `-1`, so a request without `length` reads the whole table.
|
|
17
|
+
> - `LIKE` wildcards in search values are not escaped.
|
|
18
|
+
> - Client-supplied regular expressions are run.
|
|
19
|
+
> - A column index outside the table raises an error.
|
|
20
|
+
> - Error messages from the database are returned to the client.
|
|
21
|
+
|
|
3
22
|
[](https://github.com/hniedner/sqlalchemy2-datatables)
|
|
4
23
|
[](https://github.com/pydantic/pydantic/blob/main/LICENSE)
|
|
5
24
|
[](https://github.com/coding-doc/sqlalchemy2-datatables/actions/workflows/tests.yml)
|
|
6
|
-

|
|
7
25
|
|
|
8
26
|
### Summary
|
|
9
27
|
sqlalchemy2-datatables is a framework agnostic library providing an SQLAlchemy integration of
|
|
@@ -27,7 +27,7 @@ classifiers = [
|
|
|
27
27
|
"Topic :: Software Development :: Libraries",
|
|
28
28
|
"Topic :: Software Development",
|
|
29
29
|
"Typing :: Typed",
|
|
30
|
-
"Development Status ::
|
|
30
|
+
"Development Status :: 7 - Inactive",
|
|
31
31
|
"Environment :: Web Environment",
|
|
32
32
|
"Intended Audience :: Developers",
|
|
33
33
|
"License :: OSI Approved :: MIT License",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Sqlalchemy2-datatables library, provides serverside implementation for jQuery Datatables"""
|
|
2
|
+
|
|
3
|
+
import warnings
|
|
4
|
+
|
|
5
|
+
from datatables.base import DTDataCallbacks
|
|
6
|
+
from datatables.datatable import DataTable
|
|
7
|
+
|
|
8
|
+
__version__ = '0.7.0'
|
|
9
|
+
|
|
10
|
+
warnings.warn(
|
|
11
|
+
'sqlalchemy2-datatables is no longer maintained and will be archived. Use datatables_server '
|
|
12
|
+
'(https://datatables.net/manual/python) or its successor datatables-backend '
|
|
13
|
+
'(https://github.com/hniedner/datatables-backend).',
|
|
14
|
+
DeprecationWarning,
|
|
15
|
+
stacklevel=2,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
__all__ = ['DataTable', 'DTDataCallbacks']
|
|
@@ -189,7 +189,7 @@ class DataTable:
|
|
|
189
189
|
# data: list[dict[str, Any]] = [{k: v for k, v in zip(self.column_names, row)} for row in result.all()]
|
|
190
190
|
data: list[dict[str, Any]] = []
|
|
191
191
|
for row in result.all():
|
|
192
|
-
result_row: dict[str, Any] =
|
|
192
|
+
result_row: dict[str, Any] = dict(zip(self.column_names, row, strict=True))
|
|
193
193
|
if self.callbacks:
|
|
194
194
|
self.callbacks.run(result_row)
|
|
195
195
|
data.append(result_row)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import importlib
|
|
2
|
+
import sys
|
|
3
|
+
|
|
4
|
+
import pytest
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def test_importing_the_package_warns_that_it_is_superseded():
|
|
8
|
+
sys.modules.pop('datatables', None)
|
|
9
|
+
with pytest.warns(DeprecationWarning, match='datatables-backend'):
|
|
10
|
+
importlib.import_module('datatables')
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Signature: 8a477f597d28d172789f06886806bc55
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/tests/test_datatable_callbacks.py
RENAMED
|
File without changes
|
{sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/tests/test_datatable_columns.py
RENAMED
|
File without changes
|
|
File without changes
|
{sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/tests/test_datatable_pagination.py
RENAMED
|
File without changes
|
{sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/tests/test_datatable_search.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sqlalchemy2_datatables-0.6.2 → sqlalchemy2_datatables-0.7.0}/tests/test_dt_data_callbacks.py
RENAMED
|
File without changes
|
|
File without changes
|