Documetatio from annotations
Project description
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/
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
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 douki-0.10.0.tar.gz.
File metadata
- Download URL: douki-0.10.0.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.1 CPython/3.13.12 Linux/6.14.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c716336d1ed5a2382e4bff7bca7a71b8dc15bde406af6d18ddc63f0f8c16d18d
|
|
| MD5 |
4741f62e0e166840e5fea9869ae9a269
|
|
| BLAKE2b-256 |
dbe364043cbdb2aca8f3170e15b1abe0d2c56a64dbbc45affd2b0849f109a7ab
|
File details
Details for the file douki-0.10.0-py3-none-any.whl.
File metadata
- Download URL: douki-0.10.0-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.1 CPython/3.13.12 Linux/6.14.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dccee2eef26afd039be4d49bba6b57c61c62fef085160649392b465fa1086a5
|
|
| MD5 |
cb77cb3d30db75c15267a9f7a8d02e47
|
|
| BLAKE2b-256 |
434c8833946241b534324c73e958305790c87102d948258b1f8afb6cd6c4fe4b
|