Skip to main content

Python-Waterloo Lexer

License Version Python GitHub

The python-waterloo-lexer package provides a Pygments lexer for Python files that contain Waterloo docstrings.

The Waterloo Docstrings project defines a structured docstring format with explicit section semantics, normativity rules, and multiple render targets. The project is designed so that the same source docstring can be consumed by humans, LLM-assisted tooling, and renderers without losing structural meaning. This lexer provides syntax highlighting that preserves those conventions in editors, terminals, and preview tools.

It can be used with pygmentize and other tools that load Pygments lexers via entry points.

What it provides

  • a python-waterloo Pygments lexer alias
  • syntax highlighting for Python files with Waterloo docstrings
  • installation via PyPI, local checkout, or Git URL

Installation

pip install python-waterloo-lexer

Quick test

After installation, the lexer is available under the alias python-waterloo.

pygmentize -l python-waterloo -f terminal16m <file.py>

You can also check whether Pygments lists the lexer:

pygmentize -L lexers | grep -i waterloo || true

Terminal viewer

For a quick terminal preview, a less alias can be handy:

alias lessh='LESSOPEN="| pygmentize -O style=monokai %s" less -M -R'

Then open files with:

lessh <file.py>

Source repository

Development happens in the Waterloo repository:

The repository also contains related tooling, documentation, and editor integrations for Waterloo docstrings.

Preview

ExtensionPreview

Metadata

Release files for python-waterloo-lexer 0.7.0

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

Source distribution (sdist)

Source distribution for python-waterloo-lexer 0.7.0
File Size Uploaded
python_waterloo_lexer-0.7.0.tar.gz 9.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-waterloo-lexer 0.7.0
File Interpreter ABI Platform
python_waterloo_lexer-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.4 kB

Release files / python_waterloo_lexer-0.7.0.tar.gz

Download URL python_waterloo_lexer-0.7.0.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3444251ecb6ca5de591cf292cf8a541779e8c1bb7dd62d52f560dcc44516d395
BLAKE2b-256 checksum
How to use checksums
37bbd05eed6c2b4b213d8e04234d67f2c75540487bc82e00448669df0149c98c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release files / python_waterloo_lexer-0.7.0-py3-none-any.whl

Download URL python_waterloo_lexer-0.7.0-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ff2c1616556b0a4f617bb7c26258ef763ca7eb3d6d2bd64d04e52479984e05c5
BLAKE2b-256 checksum
How to use checksums
8a24f60ffe08acce445ff31fd4373fe83f409cb245ef06b1c5301233278ae270
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.11

2 release files

0.5.10

2 release files

0.5.9

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.1

2 release files

0.5.0

2 release files

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