Skip to main content

Searchable and sortable tables in Sphinx documentation

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx_datatables-1.0.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sphinx_datatables-1.0.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_datatables-1.0.0.tar.gz.

File metadata

  • Download URL: sphinx_datatables-1.0.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sphinx_datatables-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0d0aeccbcc3f4342e4f770848b00a074efb80f08e179a3330da57499cc47cc9d
MD5 90eb1da77e87c769c46abcc432d23d0f
BLAKE2b-256 86ee7246d8b48187794bdeb7389d3bb1247850d3ae0015812e293182193715e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_datatables-1.0.0.tar.gz:

Publisher: publish.yml on sharm294/sphinx-datatables

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sphinx_datatables-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_datatables-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 215a6245893605fe48c3e5a54dc5e66f29b3547e621bd5dd32aa748aac1f8c11
MD5 6acd8d8bc2ea104f87fd8174371dad61
BLAKE2b-256 412109a9e92d68e62642694cbd1bd76ba5a906e748c18904e95b7153e2af421e

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_datatables-1.0.0-py3-none-any.whl:

Publisher: publish.yml on sharm294/sphinx-datatables

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page