Python SDK for Doconda: convert, generate and edit Word, PowerPoint, Excel and PDF documents from AI agents (Amazon Bedrock, Vertex AI, OpenAI, Claude, LangChain).
pip install doconda==0.6.1 Copy PIP instructions
Convert, generate 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.
doconda.tools() returns ready-made tools (name, description, JSON Schema, run) to convert, create and edit documents. If the API answers with an error, run doesn't raise: it returns {"error": " ", "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.
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
ai-agents anthropic azure-openai bedrock chatbot crewai document-generation docx docx-generator excel excel-generator gemini langchain llm mcp openai pdf powerpoint pptx pptx-generator report-generator tools vertex-ai word xlsx
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
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.
None of the files in this release were uploaded with provenance metadata.
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.




