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
Documentobjects - reconciles base vs desired documents into Docs API
batchUpdaterequests - 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—DocsClientorchestrationsrc/extradoc/serde/—Document ↔ XML foldersrc/extradoc/reconcile/— base/desired diff to batchUpdate requestssrc/extradoc/mock/— in-process mock Docs API for testssrc/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
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 extradoc-0.4.2.tar.gz.
File metadata
- Download URL: extradoc-0.4.2.tar.gz
- Upload date:
- Size: 935.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce0912c669d41f3a03b8ea288413c561e43821ba36adeac057317d2fa4d0bacf
|
|
| MD5 |
4bd2167ad74626db463cbd08703b7707
|
|
| BLAKE2b-256 |
d54adb766937924ca241c5c46f5a1b141a8963ecdd0d4822e4156ed9dda663e1
|
Provenance
The following attestation bundles were made for extradoc-0.4.2.tar.gz:
Publisher:
publish-extradoc.yml on think41/extrasuite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
extradoc-0.4.2.tar.gz -
Subject digest:
ce0912c669d41f3a03b8ea288413c561e43821ba36adeac057317d2fa4d0bacf - Sigstore transparency entry: 1282837305
- Sigstore integration time:
-
Permalink:
think41/extrasuite@36402fcf20d1e6043f87241ad812e179f6208ccb -
Branch / Tag:
refs/tags/extradoc-v0.4.2 - Owner: https://github.com/think41
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-extradoc.yml@36402fcf20d1e6043f87241ad812e179f6208ccb -
Trigger Event:
push
-
Statement type:
File details
Details for the file extradoc-0.4.2-py3-none-any.whl.
File metadata
- Download URL: extradoc-0.4.2-py3-none-any.whl
- Upload date:
- Size: 247.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eda17bd63fcae273e04d336070b33cd7b4ab2a32d53854a74da9f9b9bea59c64
|
|
| MD5 |
83d66f8c4a33deb56d5421a0454ab9af
|
|
| BLAKE2b-256 |
cb96da0c8084519c682d3e867a5fe2e79900d3484ac9cd1b190cd6a60ef29c88
|
Provenance
The following attestation bundles were made for extradoc-0.4.2-py3-none-any.whl:
Publisher:
publish-extradoc.yml on think41/extrasuite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
extradoc-0.4.2-py3-none-any.whl -
Subject digest:
eda17bd63fcae273e04d336070b33cd7b4ab2a32d53854a74da9f9b9bea59c64 - Sigstore transparency entry: 1282837309
- Sigstore integration time:
-
Permalink:
think41/extrasuite@36402fcf20d1e6043f87241ad812e179f6208ccb -
Branch / Tag:
refs/tags/extradoc-v0.4.2 - Owner: https://github.com/think41
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-extradoc.yml@36402fcf20d1e6043f87241ad812e179f6208ccb -
Trigger Event:
push
-
Statement type: