sphinx-datatables 1.0.0


pip install sphinx-datatables

  Latest version

Released: Feb 03, 2026


Meta
Author: Varun Sharma
Requires Python: >=3.10

Classifiers

Development Status
  • 5 - Production/Stable

Framework
  • Sphinx :: Extension

Intended Audience
  • Developers

Programming Language
  • Python :: 3

This extension makes it easy to use more expressive tables in Sphinx site with DataTables. See the demo and full documentation online.

Installation

pip install sphinx-datatables

Add the extension in your conf.py:

extensions = [
    "sphinxcontrib.jquery",
    "sphinx_datatables",
]

Usage

In your .rst documentation, create a table and add a custom class. The default class, sphinx-datatable, can be overriden in conf.py with the datatables_class option.

Each table must have a valid header row.

.. csv-table::
    :header: First Name,Last Name
    :class: sphinx-datatable

    John,Smith
    Jane,Doe

DataTables provides many options that can be configured globally in conf.py with datatables_options. You can also configure specific per-table (or tables) on any page that match a DOM selector with the directives.

See the documentation for more examples and details on per-table configuration.

Contributions

Contributions are welcome if there’s a feature or bug you find. Please raise an issue first to discuss the request.

To submit a PR, fork this repository and make a branch with your changes. You can test the project locally with:

# install all dependencies
pip install .[docs,dev]

# build the docs locally
./docs/build.sh
# you can use a local browser to the build/ directory to view the HTML docs

# run the tests
pytest

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
sphinx (>4)
sphinxcontrib_jquery (>=4.1)
packaging