Skip to main content

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 URL
  • ATHENA_DOCX_API_KEY — Athena API key or service-issued DOCX Studio token

License

MIT

Download files

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

Source Distribution

athena_python_docx-0.21.8.tar.gz (805.0 kB view details)

Uploaded Source

Built Distribution

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

athena_python_docx-0.21.8-py3-none-any.whl (288.6 kB view details)

Uploaded Python 3

File details

Details for the file athena_python_docx-0.21.8.tar.gz.

File metadata

  • Download URL: athena_python_docx-0.21.8.tar.gz
  • Upload date:
  • Size: 805.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.14

File hashes

Hashes for athena_python_docx-0.21.8.tar.gz
Algorithm Hash digest
SHA256 5f6332d653316b859811eb3ff0ed30c53e3cb17831f4705c18f99d820ee32f0a
MD5 21e586a30d612cd14e861f4790ed8c2f
BLAKE2b-256 04ba60ca82cac8fa655c37b91cf6822af47fe1374e2d50356539383e5e75ab58

See more details on using hashes here.

File details

Details for the file athena_python_docx-0.21.8-py3-none-any.whl.

File metadata

File hashes

Hashes for athena_python_docx-0.21.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b28060b5fc6594b2a3499cd61893178343ee0349bdf5a68169f2b6af63063fb7
MD5 fef5158c3dadd04f1c86f35a18f0e27a
BLAKE2b-256 4985a2fdf6531b9387d8f74a70f5a87a6c79c38d4057c32afe9f86489da96a71

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.21.8 This release

2 files

0.21.7

2 files

0.21.6

2 files

0.21.5

2 files

0.21.3

2 files

0.21.2

2 files

0.21.1

2 files

0.21.0

2 files

0.20.0

2 files

0.19.0

2 files

0.18.3

2 files

0.18.2

2 files

0.18.1

2 files

0.18.0

2 files

0.17.0

2 files

0.16.1

2 files

0.16.0

2 files

0.15.5

2 files

0.15.4

2 files

0.15.3

2 files

0.15.2

2 files

0.15.1

2 files

0.15.0

2 files

0.14.0

2 files

0.13.0

2 files

0.12.0

2 files

0.11.3

2 files

0.11.2

2 files

0.11.1

2 files

0.11.0

2 files

0.10.1

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.8

2 files

0.1.6

2 files

0.1.5

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

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