Skip to main content

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, and default fields.
  • Auto-synced — douki sync adds 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?

Metadata

Release files for douki 0.13.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 douki 0.13.0
File Size Uploaded Provenance Actions
douki-0.13.0.tar.gz 24.3 kB Without provenance Details for douki-0.13.0.tar.gz

Built distribution (wheel)

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

Total release size: 55.0 kB

Release files / douki-0.13.0.tar.gz

Download URL douki-0.13.0.tar.gz
Size 24.3 kB
Tags Source
SHA-256 checksum
How to use checksums
46056887b24507d7dbbc44f9ba239cb3e1c30379a6f5d7a33d135d9f1889eadc
BLAKE2b-256 checksum
How to use checksums
c1711b0c0daa1a1eae451e3c04ed3a25457ea199fb5dabddc97a157881883390
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.13.18 Linux/7.0.0-1017-azure

Release files / douki-0.13.0-py3-none-any.whl

Download URL douki-0.13.0-py3-none-any.whl
Size 30.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b366291df67e46e4616b061ed69ab831b270d9b8fffe24422444c914f4e4f3bc
BLAKE2b-256 checksum
How to use checksums
7199a7fb3cb35bf9103228272f53ce7973680c9303d482e431c81f5e3c3270c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.13.18 Linux/7.0.0-1017-azure

Security for douki 0.13.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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