Drop-in replacement for python-docx that connects to Athena's DOCX Studio collaborative document stack
Project description
athena-python-docx
Drop-in replacement for python-docx that connects to Athena's Keryx-backed Word document stack.
Quick start
from docx import Document
from docx.shared import Inches, Pt, RGBColor
# Open an existing Word document asset by its Athena asset_id
with Document("asset_abc123") as doc:
doc.add_heading("Market Analysis", level=1)
p = doc.add_paragraph()
r = p.add_run("Revenue grew ")
highlight = p.add_run("12.3% year-over-year")
highlight.bold = True
highlight.font.color.rgb = RGBColor(0x00, 0x80, 0x00)
p.add_run(".")
t = doc.add_table(rows=2, cols=2, style="TableGrid")
t.cell(0, 0).text = "Segment"
t.cell(0, 1).text = "Revenue"
t.cell(1, 0).text = "Enterprise"
t.cell(1, 1).text = "$4.3M"
doc.save()
API parity rule
This SDK mirrors python-docx's public API exactly. See CLAUDE.md for the full contract.
Development
uv venv
uv pip install -e ".[dev]"
uv run pytest tests/ -x
DocX Execution Lab
For fast local repros against real Athena document assets, use the
headless runner in scripts/docx_exec_lab.py. It executes an arbitrary
Python snippet with this checkout of athena-python-docx, captures
stdout/stderr/errors/timings, and can export the resulting .docx for
text assertions. scripts/docx_exec_lab_server.py adds a local UI with
an Olympus Word document embed preview pane. See DOCX_EXEC_LAB.md.
Environment variables
Required when connecting to DOCX Studio (set by Athena backend when executing in Daytona):
ATHENA_DOCX_BASE_URL— DOCX Studio API base URLATHENA_DOCX_API_KEY— Athena API key or service-issued DOCX Studio token
License
MIT
Project details
Release history Release notifications | RSS feed
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 athena_python_docx-0.21.0.tar.gz.
File metadata
- Download URL: athena_python_docx-0.21.0.tar.gz
- Upload date:
- Size: 796.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
529e33d276515ba243087ed8ddef4ba28077621f13bdce17b10f4e8363d54f62
|
|
| MD5 |
3ef6e9a39e6a0776812aeae02df02352
|
|
| BLAKE2b-256 |
1df5b26742759512a9162819fbf30e0bee5f2574175bb9c8a5a79ad4d54e4716
|
File details
Details for the file athena_python_docx-0.21.0-py3-none-any.whl.
File metadata
- Download URL: athena_python_docx-0.21.0-py3-none-any.whl
- Upload date:
- Size: 284.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d06852ad733455c64f21c0cf76a4531829d2816bc52ff2f48b09c81c6ff3f4a2
|
|
| MD5 |
a122368c14358a0dfdceb9620d05894b
|
|
| BLAKE2b-256 |
0ac913a32b73a711319987d6626d12b9732100ab7316e865e9b5e0acf8c879ff
|