doconda to your Lambda function’s package and call doconda.documents.create(format=..., prompt=...) (or with your
Markdown in content). The call waits until the file is ready and returns its download links; documents.download
gives you the bytes to store in S3 or send on.
Steps
- Put your Doconda API key (dashboard → API keys) in the function’s
DOCONDA_API_KEYenvironment variable, preferably from a secret rather than in code. - Package the dependency (Python 3.9 or later; its only dependency is
httpx):pip install doconda -t package/and add yourlambda_function.pyto the zip. - Write the handler:
{"format": "xlsx", "markdown": "# Budget\n\n| Item | Amount |\n|---|---|\n| Venue | 1200 |"}.
To have the AI write it, pass prompt instead of content.
Raise the function’s timeout: creating from your Markdown at fast quality takes a few seconds, but standard can take
several minutes (see quality levels). If you don’t want the Lambda to wait, use
create_in_background(...), which answers right away, and get notified with a webhook (doconda.webhooks.create(url)).
What you get back
outputs: the file and its PDF. Links expire after 5 minutes;documents.outputs(id)gives fresh ones.- To store the file in S3:
doconda.documents.download(doc["id"], "xlsx")returns the bytes. status:ready,ready_with_warnings,needs_review(checkdocuments.report(id)) orfailed(not charged).
FAQ
Do I need python-docx, python-pptx or openpyxl?
Do I need python-docx, python-pptx or openpyxl?
No. The SDK only makes the call; you get the finished, editable file with its PDF.
Does it retry on network errors?
Does it retry on network errors?
Yes: network errors, 429 and 5xx are retried automatically (
max_retries=2 by default) before raising
DocondaError.Where are the documents stored?
Where are the documents stored?
In the European Union (Ireland), and the AI that processes them also runs in the EU.
How much does it cost?
How much does it cost?
You pay per delivered document; failed ones are not charged. See pricing.
Keep reading
- Python SDK: every method.
- Amazon Bedrock: if the Lambda runs a Bedrock agent.
- Quickstart.