Skip to main content

File-based Google Docs representation library for LLM agents

Project description

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.pyDocsClient 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

extradoc-0.4.1.tar.gz (383.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

extradoc-0.4.1-py3-none-any.whl (144.8 kB view details)

Uploaded Python 3

File details

Details for the file extradoc-0.4.1.tar.gz.

File metadata

  • Download URL: extradoc-0.4.1.tar.gz
  • Upload date:
  • Size: 383.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for extradoc-0.4.1.tar.gz
Algorithm Hash digest
SHA256 1aa02c8d79c631f429751165e4755c9fb86aed5e7370436322c577668ae711a3
MD5 084621cd4beeaf7ee6b03c5cff29e291
BLAKE2b-256 dbe869f817fe5be23effd78418c60886f733b1a2be3e0544354dde7adc959a4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for extradoc-0.4.1.tar.gz:

Publisher: publish-extradoc.yml on think41/extrasuite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file extradoc-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: extradoc-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 144.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for extradoc-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f938e50571ad8c3d048d409a191a6ae8606ab22901d13f23990bb2e308bc99de
MD5 ee66fe917e83d4594c4655dfb35dad32
BLAKE2b-256 4cd9ad19721becadb38f270f4928c41632005dfb6a5505df94b07bf333e96b7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for extradoc-0.4.1-py3-none-any.whl:

Publisher: publish-extradoc.yml on think41/extrasuite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page