doconda
Generate, review and edit Word (DOCX), PowerPoint (PPTX), Excel (XLSX) and PDF documents from your AI agent or chatbot, with one call. Editable files with real Word styles, reviewed before they are delivered.
Use it when your agent has to hand the user a document and you don't want to maintain python-docx, python-pptx, openpyxl or templates. Works with Amazon Bedrock, Vertex AI, Azure OpenAI, OpenAI, Claude, Gemini, LangChain, LangGraph, CrewAI, Strands and any model with tool calling.
pip install doconda
from doconda import Doconda
doconda = Doconda() # reads DOCONDA_API_KEY
doc = doconda.documents.create(format="docx", prompt="Report on the housing law")
print(doc["outputs"]) # links to the Word file and the PDF
open("report.docx", "wb").write(doconda.documents.download(doc["id"], "docx"))
Error messages and report texts come in English. For Spanish, pass Doconda(language="es") (sent as Accept-Language).
Codes (e.code) never change with the language.
As tools for your agent
doconda.tools() returns ready-made tools (name, description, JSON Schema, run) to create, review and edit documents. If the API answers with an error, run doesn't raise: it returns {"error": "<code>", "message": …, "fields": …} so the model can act on it. With Amazon Bedrock (Converse API):
import json
import os
import boto3
from doconda import Doconda
bedrock = boto3.client("bedrock-runtime")
model_id = os.environ["BEDROCK_MODEL_ID"] # any model enabled in your Bedrock account
tools = Doconda().tools()
tool_config = {
"tools": [
{"toolSpec": {"name": t.name, "description": t.description, "inputSchema": {"json": t.input_schema}}}
for t in tools
]
}
messages = [{"role": "user", "content": [{"text": "Make an Excel with the event budget"}]}]
while True:
res = bedrock.converse(modelId=model_id, messages=messages, toolConfig=tool_config)
message = res["output"]["message"]
messages.append(message)
if res["stopReason"] != "tool_use":
break
results = []
for block in message["content"]:
if "toolUse" in block:
use = block["toolUse"]
out = next(t for t in tools if t.name == use["name"]).run(use["input"])
results.append(
{"toolResult": {"toolUseId": use["toolUseId"], "content": [{"text": json.dumps(out)}]}}
)
messages.append({"role": "user", "content": results})
print(message["content"][0]["text"])
The same tools plug into Vertex AI / Gemini, OpenAI, Claude, LangChain or CrewAI: see the guides.
What else
documents.create(operation="review", file=…)andoperation="edit": review and fix, or change, an existing Word, PowerPoint, Excel or PDF.documents.stream(…): the document's HTML as it is written, then the finished document.extract(file): any file to Markdown for your model (free up to 1,000 pages a month, then €0.01 every 5 pages).files.upload(path)(orfiles.upload(data, filename)for bytes),webhooks.create(url)andverify_webhook(body, headers, secret).
Why Doconda
- Editable files: real Word styles, slide layouts and Excel formulas, not images or HTML exports.
- Reviewed before delivery: every file is checked and repaired; problems are reported, never hidden.
- Always a PDF and a preview of each page, ready to show in your chat UI.
- Works with any model that calls tools, and runs in the EU.
Examples
- Excel from an Amazon Bedrock agent
- A Vercel AI SDK chatbot that returns a Word file
- PowerPoint from Gemini on Vertex AI
- Review and fix a Word file before sending it
- More, one per stack (Bedrock, Vertex AI, Azure OpenAI, OpenAI, Claude, LangGraph, Strands, Mastra): B-C-Software/doconda-examples
Also in TypeScript: @doconda/sdk · Docs: https://docs.doconda.com/en/sdk/python · Guides per stack: https://docs.doconda.com/en/agents/introduction · Get an API key: https://doconda.com
Metadata
Release files for doconda 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| doconda-0.5.1.tar.gz | 18.1 kB | Without provenance | Details for doconda-0.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| doconda-0.5.1-py3-none-any.whl | Python 3 | none | any | Details for doconda-0.5.1-py3-none-any.whl |
Total release size: 31.9 kB
Release files / doconda-0.5.1.tar.gz
| Download URL | doconda-0.5.1.tar.gz |
|---|---|
| Size | 18.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c8bf74b1b663939f3191f1bf330340b162d10611aa3f2486746fea261783f330
|
|
BLAKE2b-256 checksum How to use checksums |
14b9694927d1fa771bf2875cd88ebd258dc150545f0937964260231ae1dcb00b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / doconda-0.5.1-py3-none-any.whl
| Download URL | doconda-0.5.1-py3-none-any.whl |
|---|---|
| Size | 13.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b8d073cf5e03830fe02f9061b696adb4dc48acf1746cc73da2731b0a7fe6da2c
|
|
BLAKE2b-256 checksum How to use checksums |
00888e9d861da7de955f18391de2fa84d088d374577f6479e9b3e7a63374266f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for doconda 0.5.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.