Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

datatables-backend

Latest version: v0.1.0rc2

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
PyPI package Publisher: coding_doc
0 Stars
0 Forks
1 Versions
Python Repo language

Scan summary

datatables-backend was last scanned on 23 Nov 2026 at version 0.1.0rc2. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 23 Nov 2026.
  • Findings: No rules fired in version 0.1.0rc2.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.0rc2 LATEST 23 Nov 2026 No rules fired

No rules fired in 0.1.0rc2

Findings

Findings for v0.1.0rc2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.0rc2; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

datatables-backend

CI CodeQL Python Licence: MIT

Server-side processing for DataTables: paging, sorting, the global and column searches, and SearchBuilder criteria. Data can come from:

  • SQL: SQLAlchemy 2, async or sync.
  • OpenSearch: async or sync client.

The library is read-only and framework-agnostic.

Status: release candidate (0.1.0rc2). Until 1.0, a minor release (0.x) may break the Python API; each such change is listed in CHANGELOG.md. The wire format and the error codes change only in a release whose notes say so. See docs/PRD.md for the scope and design.

If you need a SQL backend with editing (DataTables Editor), use SpryMedia's own datatables_server. This library adds:

  • async SQLAlchemy;
  • a search-engine backend;
  • the same server-declared columns and safety rules on every source.

datatables-backend is not affiliated with or endorsed by DataTables or SpryMedia.

Install

pip installs no pre-release unless asked, so while 0.1.0 is a release candidate add --pre to each command.

pip install "datatables-backend[sqlalchemy]"        # SQL, sync
pip install "datatables-backend[sqlalchemy-async]"  # SQL, async (adds greenlet): also your async driver, e.g. asyncpg
pip install "datatables-backend[opensearch]"        # OpenSearch, sync (installs opensearch-py)
pip install "datatables-backend[opensearch-async]"  # OpenSearch, async (adds aiohttp)
pip install "datatables-backend[fastapi]"           # the FastAPI dependency

SQL

from datatables_backend import Column, parse_request
from datatables_backend.sqlalchemy import SQLTable

users = SQLTable(
    users_table,  # a Table, join or subquery
    [Column('id'), Column('email', field='email_address'), Column('joined')],
    base_filter=users_table.c.active.is_(True),  # rows the table shows at all
)

params = parse_request(request_json)  # or the flat form/query parameters
async with AsyncSession(engine) as session:
    response = await users.fetch(params, session)  # fetch_sync() for a Session or Connection
return response.to_dict()

OpenSearch

from datatables_backend import Column
from datatables_backend.opensearch import IndexColumn, SearchTable

reports = SearchTable(
    'reports',
    [
        IndexColumn('id', text='keyword'),
        IndexColumn('title', text='text+keyword'),  # the dynamic-mapping default
        IndexColumn('body', text='text'),  # analysed only: no sorting
        Column('pages', type='number'),
        Column('created', type='date'),
        Column('published', type='boolean'),  # a column is a string unless declared: the mapping is not read
    ],
    unique_key='id',  # required: an index has no primary key to break ties with
)
response = await reports.fetch(params, AsyncOpenSearch(hosts=['http://localhost:9200']))

The unique key. unique_key names a declared column (a tuple of names for a key of several) whose values are unique for every document; OpenSearch needs it, since an index has no primary key to break ties with, and on SQL it replaces the primary key. Its rules, the document _id and paging past the window are in the OpenSearch rules.

FastAPI

from datatables_backend.fastapi import DataTablesParams


@app.post('/users/table')
async def users_table(params: DataTablesParams, session: SessionDep) -> dict[str, Any]:
    return (await users.fetch(params, session)).to_dict()

On the page, DataTables' default POST (a form) is read as it comes, so the client needs no data or contentType:

new DataTable('#users', {
  serverSide: true,
  processing: true,
  ajax: { url: '/users/table', type: 'POST' },
  columns: [{ data: 'id' }, { data: 'email' }, { data: 'joined' }],
});

Options (TotalCache, RowHooks, page limits, a table per request for a per-user filter): docs/usage.md.

Tested with

CI runs the tests on Python 3.12 to 3.15 and on SQLite (sync, and async with aiosqlite); PostgreSQL 18 (psycopg 3, sync and async; psycopg2 with asyncpg); MySQL 8.4 (pymysql, aiomysql); SQL Server 2022 (pyodbc, aioodbc, ODBC Driver 18); and OpenSearch 3.10.0 and 2.19.7. It also runs the oldest supported releases: SQLAlchemy 2.0.31, Pydantic 2.10, opensearch-py 2.6 and FastAPI 0.133.

What the server decides

The library does not change how a database compares values. Each rule below is stated in full in docs/rules.md, and what each engine does on its own in docs/databases.md.

  • Columns and ordering: only declared columns are used, the server decides what sorts, NULL is lowest, and a descending order is the exact reverse (one exception below).
  • Types and matching: the declared type builds the filter, a date is matched by day, a day and a number have one spelling, and text matches in any case.
  • Errors: a user's mistake comes back as a response with one of eight stable codes (the list is closed) and a text that says how to fix it; any other failure raises.
  • Requests: bounded in length, lists, tree depth and conditions; a request the library cannot read raises MalformedRequest, answered 422 by the FastAPI dependency.
  • OpenSearch and SQL: the unique key, the document id, last pages, analysed text.

Exceptions to "no surprise", each with its reason in the rules:

  • On OpenSearch, an order on a field of several values: descending is not the exact reverse of ascending.
  • An OpenSearch column declared text='text' has no whole string to sort by, so it is unorderable.
  • On PostgreSQL a column that can hold NULL needs its index declared NULLS FIRST to serve a sort.
  • A column that carries a time zone is matched by its UTC day; SQLite and MySQL DATETIME store no offset.
  • SQLite, and OpenSearch before 3.1, fold ASCII letters only.
  • A SQL column with a type of its own, or none, is compared as sent, not folded.
  • On OpenSearch a page in the middle of more than max_result_window rows is refused (page_out_of_range), where the first and last pages work and SQL serves every page (paging past the window).
  • An OpenSearch column of analysed text only answers the word search, contains, null, !null and empty lists, where SQL answers every condition (the rule).
  • OpenSearch's global search skips number and date columns, and every backend's skips boolean columns (the rule).
  • On OpenSearch a stored "" is not empty, where on SQL it is (the rule).
  • On OpenSearch a number outside its field's mapped range fails the request, a stated limit of this library (the entry, issue #47).

Development

uv sync
uv run pytest
uv run ruff check . && uv run basedpyright

Licence: MIT (LICENSE).

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases datatables-backend

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

Frame 2085668439 (1)
Group 1261154229