Skip to main content
To generate a Word file from Python without templates, send your content as Markdown (or a sentence) to Doconda and get back the laid-out .docx, plus its PDF. You don’t write code for paragraphs, styles or tables: you describe the look in one sentence (style) and it is applied to Word’s styles, so the file stays editable.

The problem in practice

  • Every heading, list and table is code: adding a new section means changing the program.
  • .docx templates have to be designed, versioned and kept in sync with their placeholders.
  • When formatting is applied paragraph by paragraph, the document looks right but is hard to edit later in Word.
  • Tables that overflow the page or headings stranded at the bottom of a page only show up when you open the file.

The solution with Doconda

With no content of your own, ask for the document in a sentence: prompt="Residential lease agreement for €900 a month".

What you get back

  • The .docx and its PDF (doconda.documents.download(doc["id"], "pdf")).
  • status: ready, ready_with_warnings, needs_review or failed (not charged).
  • style_unsupported: what you asked for in style that could not be applied. Never silently ignored.
  • A report (documents.report(id)) with anything worth checking.

FAQ

Install the SDK (pip install doconda) and call documents.create with format="docx" and your Markdown in content. The look goes in style, in plain language. No template file is needed.
Yes. Style is applied to Word’s styles (Normal, Heading 1…), not paragraph by paragraph. Change a style in Word and the whole document follows.
Yes. The Markdown supports headings, paragraphs, lists, tables, bold and italics, links, page breaks and images. The text is used as is.

Keep reading