Atlas Doc Parser
raw JSON → 1.0.1 verified Mon Apr 27 auth: no python
A Python library for parsing Atlassian Document Format (ADF) to various output formats like HTML or Markdown. Designed for Confluence Cloud integration. Latest version 1.0.1 supports Python >=3.10,<4.0, with active development on GitHub.
pip install atlas-doc-parser Common errors
error ValueError: Unknown node type: 'media' ↓
cause The ADF contains a node type (e.g., media) that the parser does not support.
fix
Preprocess the ADF to remove or replace unsupported nodes before parsing.
error KeyError: 'text' ↓
cause ADF object missing required 'text' field in a text node.
fix
Ensure all text nodes have a 'text' key. Validate ADF structure.
Warnings
gotcha Input must be a valid ADF JSON structure. Invalid or missing keys may raise KeyError or ValueError. ↓
fix Validate your ADF JSON against Atlassian's schema before parsing.
gotcha The library does not support all ADF node types yet (e.g., media, table, blockquote). Unknown nodes are ignored. ↓
fix Check the library's supported node list; use fallback rendering for unsupported nodes.
Imports
- parse_adf_to_html
from atlas_doc_parser import parse_adf_to_html - parse_adf_to_markdown
from atlas_doc_parser import parse_adf_to_markdown
Quickstart
from atlas_doc_parser import parse_adf_to_html
adf_json = {
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Hello, world!"
}
]
}
]
}
html_output = parse_adf_to_html(adf_json)
print(html_output)