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 = {}

# custom remote URLs (or offline path in html_static_paths) for ...
## datatables.min.js
datatables_js = ""
## datatables.min.css
datatables_css = ""

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.5.0.tar.gz (6.8 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.5.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sphinx_datatables-0.5.0.tar.gz
  • Upload date:
  • Size: 6.8 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.5.0.tar.gz
Algorithm Hash digest
SHA256 8750a8a8c89b2e4c49162a2dcdc8ec68c9294987867fdb07cb28d9e3bfc0d526
MD5 134ff40d6a986e7e80157122e6a60e75
BLAKE2b-256 ebb6a7dee150aa51143491e50a426ed6a3cb31f57174dfb4a80bef352790cd8d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for sphinx_datatables-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a3b578baa58ff262faca137a662bbfa9d3e355cd8e64edeff6cdecfe9fa2c9a1
MD5 a067146df2e1600703a5b29e900afe73
BLAKE2b-256 e6956ae06efd5b37e5534ac3dd5562d7c7d5f5194e966415137ac63d1df86d53

See more details on using hashes here.

Provenance

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