Skip to main content

zzzeeksphinx

This is zzzeek’s own Sphinx layout, used by SQLAlchemy.

This layout is first and foremost pulled in for the SQLAlchemy documentation builds (and possibly other related projects).

Features include:

  • Uses Mako templates instead of Jinja, for more programmatic capabilities inside of templates.

  • Layout includes an independently scrollable sidebar

  • A unique (to Sphinx) “contextual” sidebar contents that shows the current page in context with all sibling pages (like that of MySQL’s docs). This is a form of TOC that Sphinx doesn’t typically have a lot of capability to do (well it could, with some simple feature adds), but IMO this kind of navigation is critical for very large and nested documentation sets, so that the navbar stays relatively small yet provides context as to where you are in the docs and what else is locally available.

  • Modifications to autodoc which illustrate inherited classes, bases, method documentation illustrates if a method is only inherited from the base or overridden.

  • A “dynamic base” feature that will, under ReadTheDocs, pull in optional .mako and .py files from the website of your choice that will serve as an alternate base template and a source of extra config setup, respectively, allowing the layout to be integrated into the layout of an external site when viewing on the web.

  • A “viewsource” extension that can provide highlighted sourcecode to any Python file arbitrarily.

  • SQLAlchemy-specific stuff, like the [SQL] popups, the dialect info directives.

  • scss support using pyscss.

Config

in conf.py, the extension is:

extensions = [
    'zzzeeksphinx',
]

The theme is:

html_theme = 'zzzeeksphinx'

Other configs that SQLAlchemy has set up; these two are probably needed:

# The short X.Y version.
version = "1.0"
# The full version, including alpha/beta/rc tags.
release = "1.0.0"

release_date = "Not released"

Additional configs for the “dynamic site thing” look like:

site_base = os.environ.get("RTD_SITE_BASE", "http://www.sqlalchemy.org")
site_adapter_template = "docs_adapter.mako"
site_adapter_py = "docs_adapter.py"

Configs which do some last-minute translation of module names when running autodoc to display API documentation:

autodocmods_convert_modname = {
    "sqlalchemy.sql.sqltypes": "sqlalchemy.types",
    "sqlalchemy.sql.type_api": "sqlalchemy.types",
    "sqlalchemy.sql.schema": "sqlalchemy.schema",
    "sqlalchemy.sql.elements": "sqlalchemy.sql.expression",
    "sqlalchemy.sql.selectable": "sqlalchemy.sql.expression",
    "sqlalchemy.sql.dml": "sqlalchemy.sql.expression",
    "sqlalchemy.sql.ddl": "sqlalchemy.schema",
    "sqlalchemy.sql.base": "sqlalchemy.sql.expression"
}

autodocmods_convert_modname_w_class = {
    ("sqlalchemy.engine.interfaces", "Connectable"): "sqlalchemy.engine",
    ("sqlalchemy.sql.base", "DialectKWArgs"): "sqlalchemy.sql.base",
}

Release files for zzzeeksphinx 1.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zzzeeksphinx 1.2.3
File Size Uploaded
zzzeeksphinx-1.2.3.tar.gz 74.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zzzeeksphinx 1.2.3
File Interpreter ABI Platform
zzzeeksphinx-1.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 151.8 kB

Release files / zzzeeksphinx-1.2.3.tar.gz

Download URL zzzeeksphinx-1.2.3.tar.gz
Size 74.1 kB
Tags Source
SHA-256 checksum
How to use checksums
64d8ed3243cebaa77c2d07376afaf2ecc53e103beb961277fe6654b3ad6244aa
BLAKE2b-256 checksum
How to use checksums
bd473df17c7b3053eb4a41f2c572f8d9cb4f1a595af775bcad811cdcd6ba5277
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.9.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.5

Release files / zzzeeksphinx-1.2.3-py3-none-any.whl

Download URL zzzeeksphinx-1.2.3-py3-none-any.whl
Size 77.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ab5d29f023f92625b476897e7b5e657507b2db2a67e8c3b7f94170d175b2778
BLAKE2b-256 checksum
How to use checksums
6503b1baccbfc6fcad8802305dc0b782b02826028612d48dfa1eb472cd583254
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.9.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.5

Release history Release notifications | RSS feed

1.6.2

1 release file

1.6.1

1 release file

1.6.0

1 release file

1.5.1

1 release file

1.5.0

1 release file

1.4.0

1 release file

1.3.5

1 release file

1.3.4

1 release file

1.3.3

1 release file

1.3.2

1 release file

1.3.1

1 release file

1.2.6

1 release file

1.2.5

1 release file

1.2.4

1 release file

This release

1.2.3 This release

2 release files

1.2.2

2 release files

1.2.1

1 release file

1.2.0

1 release file

1.1.6

1 release file

1.1.5

1 release file

1.1.4

1 release file

1.1.0

1 release file

1.0.20

1 release file

1.0.18

1 release file

1.0.17

1 release file

1.0.16

1 release file

1.0.15

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page