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 documentation with DataTables. See the demo and full documentation online.

Installation

pip install sphinx-datatables

Usage

Add the extension in your conf.py:

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

In your .rst documentation, create a table and add a custom class label. Your 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 tweaked at its configuration. These can be configured for all tables using the datatables_options variable in conf.py.

Configuration

The following configuration options are available with the following default values:

# in conf.py

# set the version to use for DataTables plugin
datatables_version = "2.3.5"

# name of the class to use for tables to enable DataTables
datatables_class = "sphinx-datatable"

# any custom options to pass to the DataTables constructor. Note that any
# options you set are used for all DataTables.
datatables_options = {}

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-0.4.0.tar.gz (5.6 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-0.4.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for sphinx_datatables-0.4.0.tar.gz
Algorithm Hash digest
SHA256 adfa288904ba486118fbdbd0d9ba694e5c663827ead14619afbba3a359d61526
MD5 7f2f7eefad6697f4743bc971c6d55ef8
BLAKE2b-256 ca7fd1044124334f04b522c7e0fb64c1843625c600968e50cee482a4f04702ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_datatables-0.4.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-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_datatables-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4d06963a66cac5fd67c04a3db822fbeaf6b35dedd18196c15627d2647bde56d
MD5 9a77313e9fe1c0ef2e13b319bce5b180
BLAKE2b-256 4ec25dbd3df591452ef5c08feb3f8c03c669f09d5ec39ebc3f66f09bf4deebd3

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_datatables-0.4.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