Atlassian Document Builder

0.5.2 · active · verified Thu Apr 16

The `atlassian-doc-builder` library, currently at version 0.5.2, provides a programmatic way to create Atlassian Documents (ADF) for platforms like Confluence and Jira. It enables developers to automate report publication and generate structured content, supporting a tree-like document representation, JSON ADF rendering, parsing, and document validation. The project maintains an active release cadence with regular updates.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to create a basic Atlassian Document (ADF) with paragraphs, text, and a link, then outputs its JSON representation.

from atlassian_doc_builder import ADFDocument, ADFParagraph, ADFText, ADFLink

# Create a new Atlassian Document
doc = ADFDocument()

# Add a paragraph with plain text
doc.add_node(ADFParagraph().add_node(ADFText("Hello, Atlassian Document Builder!")))

# Add another paragraph with text and a link
paragraph_with_link = ADFParagraph()
paragraph_with_link.add_node(ADFText("Visit the "))
paragraph_with_link.add_node(ADFLink(text="official GitHub repository", href="https://github.com/khwong-c/atlassian-doc-builder"))
paragraph_with_link.add_node(ADFText(" for more examples."))
doc.add_node(paragraph_with_link)

# Print the generated ADF JSON (for demonstration, in a real app you might save or upload this)
print(doc.dumps(indent=2))

view raw JSON →