Douki
Language-agnostic YAML docstrings for Python.
Douki is a developer tool that uses a structured YAML format inside Python docstrings. It keeps your docstrings in sync with your function signatures and validates them against a schema — all without adding a runtime dependency to your package.
Why Douki?
- Structured — docstrings are YAML, not free-form text. Parameters have
type,description,optional, anddefaultfields. - Auto-synced —
douki syncadds new parameters, removes stale ones, and updates return types automatically. - Validated — every docstring is checked against a JSON Schema so typos and invalid fields are caught early.
- Dev-only — Douki is a development tool. It does not need to be a runtime dependency of your package.
- Migratable — convert existing NumPy-style docstrings with
douki migrate numpydoc.
Quick Start
Install Douki as a dev dependency:
pip install douki
Write a docstring in Douki YAML format:
def add(a: int, b: int = 0) -> int:
"""
title: Add two integers
parameters:
a:
type: int
description: First value.
b:
type: int
description: Second value.
default: 0
returns:
type: int
description: Sum of a and b.
"""
return a + b
Sync your docstrings with the actual signatures:
# Preview changes
douki check src/
# Apply changes in-place
douki sync src/
By default, Douki respects .gitignore during file discovery. You can
disable that per run with --no-respect-gitignore, or set
[tool.douki] respect-gitignore = false in pyproject.toml.
What's Next?
- Installation — install via pip, conda, or from source
- Usage Guide — CLI commands, YAML schema, and migration
- Changelog — release history
- Contributing — how to contribute
Metadata
Release files for douki 0.12.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| douki-0.12.1.tar.gz | 23.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| douki-0.12.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.1 kB
Release files / douki-0.12.1.tar.gz
| Download URL | douki-0.12.1.tar.gz |
|---|---|
| Size | 23.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d8d492f22e9cc3e2088a4e2104e8a36d9169044bc2f03a14a7666997fd1cae9
|
|
BLAKE2b-256 checksum How to use checksums |
6fd26536ddfb7155a96bb27619d7ac75360b57614d34db145a923d70030f549d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.13.12 Linux/6.14.0-1017-azure
|
Release files / douki-0.12.1-py3-none-any.whl
| Download URL | douki-0.12.1-py3-none-any.whl |
|---|---|
| Size | 29.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a3f319ef83d32e3781405afb485781b4d14716139b399c087ac16dbb57d465f5
|
|
BLAKE2b-256 checksum How to use checksums |
001411c9ce9bb86b933d2771555cfb3279c22bd38e56035ec03412429360f711
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.13.12 Linux/6.14.0-1017-azure
|