skillfed

docspec

Docspec is a JSON object specification for representing API documentation of programming languages.

docspec v2.2.2 270.6K downloads/30d#8,231 on PyPI
License unclear AGING released

What it is and what it does

Docspec is a JSON schema and toolset for representing API documentation in a language-agnostic format. It provides both a Python library for programmatic serialization and deserialization of Docspec JSON payloads, and a command-line interface for validating and inspecting those payloads. The library depends on databind-core and databind-json for JSON marshaling, plus the deprecated package for backward compatibility.

Typical use involves reading documentation metadata from JSON, filtering or transforming module and member structures in memory, and writing the result back out. The CLI offers tree-view inspection of documentation hierarchies. The package targets Python 3.8 and newer and is positioned as a bridge format for tools that need to exchange or standardize API documentation across different languages.

Use it for:

  • Validate and transform API documentation JSON before publishing or consuming it in a documentation pipeline.
  • Filter documentation members by presence of docstrings or other metadata criteria programmatically.
  • Inspect the structure of a Docspec JSON file from the command line without writing custom parsing code.
  • Serialize Python documentation metadata into a standardized JSON format for cross-language tooling.
  • Build documentation aggregation or translation tools that work with a common interchange format.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Docspec provides a library and CLI to serialize, deserialize, and validate JSON payloads that represent API documentation structures across programming languages.

Yes, if you need to work with Docspec JSON format for documentation tooling. The package has low install friction and no known vulnerabilities. However, the aging maintenance status (465 days since last release) and unclear license warrant caution: verify the license terms and assess whether infrequent updates align with your project's stability requirements.

Install

docspec on PyPI

pip

pip install docspec

uv

uv add docspec

poetry

poetry add docspec

Installing docspec

Before you install

Low install friction with a pure-wheel distribution. Maintenance status is aging—last release was 465 days ago—so expect infrequent updates and potential staleness relative to evolving Python ecosystems.

License in practice

License status is unclear; no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms before use in proprietary or copyleft-sensitive projects.

Quickstart

import docspec
import sys

for module in docspec.load_modules(sys.stdin):
    module.members = [m for m in module.members if m.docstring]
    docspec.dump_module(sys.stdout)

Requires Python 3.8 or newer.

Verify before relying

  • Whether the package is actively maintained or has entered long-term maintenance mode given the 465-day gap since last release.
  • Actual license terms and any restrictions on commercial or derivative use.
  • Compatibility with recent Python versions beyond the stated 3.8+ requirement.

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 3 — databind-core, databind-json, deprecated
Maintenance aging — 465 days since the last release
First released
Downloads 270,647/month — #8,231 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: docspec-2.2.2-py3-none-any.whl

Tags

docspec json serializationapi documentation formatdocstring parsing librarydocumentation json schemaapi doc validation tooldocspec cli validatordocumentation interchange format
documentation-formatjson-schemaapi-docs

More Documentation packages