A pygments lexer derived from the Python lexer, for Waterloo docstrings
Project description
Python-Waterloo Lexer
python-waterloo-lexer is 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-waterlooPygments 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>
Project repository
Development happens in the Waterloo repository:
The repository also contains related tooling, documentation, and editor integrations for Waterloo docstrings.
Preview
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_waterloo_lexer-0.5.8.tar.gz.
File metadata
- Download URL: python_waterloo_lexer-0.5.8.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbf72ab8f0b6e0ab0f7ed9b42e60dcbfa43bac24081753309f099847837875ff
|
|
| MD5 |
6c403038001175f37d86464bd8e916ad
|
|
| BLAKE2b-256 |
c422aa3268b79a9a9be2a82a07e8ce158ca9704e83937a3b7e4dc6ddba8f38e3
|
File details
Details for the file python_waterloo_lexer-0.5.8-py3-none-any.whl.
File metadata
- Download URL: python_waterloo_lexer-0.5.8-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
367f34ed10393487dd6a4859f16c62b4810a5d7387a1d0f869adb245f9f5a8d2
|
|
| MD5 |
592326413505165c231d6ee2ba90cca6
|
|
| BLAKE2b-256 |
a7e5b30f640ec8df951163cda3ac7b8a7213f240d3920a4518b8a41b1d53e95d
|