Skip to main content

extradoc

File-based Google Docs representation library for LLM agents.

Part of the ExtraSuite project.

Overview

extradoc is the library layer behind the Google Docs support in ExtraSuite. It:

  • pulls Google Docs into an XML folder representation
  • deserializes edited XML back into typed Document objects
  • reconciles base vs desired documents into Docs API batchUpdate requests
  • pushes those requests through a transport

The canonical on-disk format is documented in docs/on-disk-format.md.

Status

This package currently exposes a programmatic API. The end-user CLI lives in the extrasuite client package and is invoked as extrasuite doc ....

There is no supported standalone python -m extradoc pull/diff/push CLI in this repo.

Programmatic Usage

from pathlib import Path

from extradoc import DocsClient, GoogleDocsTransport


async def main() -> None:
    transport = GoogleDocsTransport("ACCESS_TOKEN")
    client = DocsClient(transport)
    try:
        await client.pull("DOCUMENT_ID", Path("output"))
        result = await client.push(Path("output") / "DOCUMENT_ID")
        print(result.message)
    finally:
        await transport.close()

DocsClient.diff(folder) is available for local debugging, but normal user workflow is pull, edit, push, then re-pull.

Main Modules

  • src/extradoc/client.py — DocsClient orchestration
  • src/extradoc/serde/ — Document ↔ XML folder
  • src/extradoc/reconcile/ — base/desired diff to batchUpdate requests
  • src/extradoc/mock/ — in-process mock Docs API for tests
  • src/extradoc/transport.py — transport interfaces and implementations

Development

cd extradoc
uv sync --all-extras
uv run pytest tests/ -v
uv run ruff check . && uv run ruff format .
uv run mypy src/extradoc

License

MIT License - see LICENSE.

Metadata

Release files for extradoc 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for extradoc 0.4.2
File Size Uploaded Provenance
extradoc-0.4.2.tar.gz 935.3 kB With provenance Details

Built distribution (wheel)

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

Total release size: 1.2 MB

Release files / extradoc-0.4.2.tar.gz

Download URL extradoc-0.4.2.tar.gz
Size 935.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ce0912c669d41f3a03b8ea288413c561e43821ba36adeac057317d2fa4d0bacf
BLAKE2b-256 checksum
How to use checksums
d54adb766937924ca241c5c46f5a1b141a8963ecdd0d4822e4156ed9dda663e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 13, 2026.

Transparency log

Release files / extradoc-0.4.2-py3-none-any.whl

Download URL extradoc-0.4.2-py3-none-any.whl
Size 247.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eda17bd63fcae273e04d336070b33cd7b4ab2a32d53854a74da9f9b9bea59c64
BLAKE2b-256 checksum
How to use checksums
cb96da0c8084519c682d3e867a5fe2e79900d3484ac9cd1b190cd6a60ef29c88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 13, 2026.

Transparency log

Security for extradoc 0.4.2

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for extradoc-0.4.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 13, 2026.

Transparency log

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.

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