adf-lib
A Python library for creating and manipulating ADF (Atlassian Document Format) documents
What it is and what it does
adf_lib is a Python library for programmatically building Atlassian Document Format documents. It wraps ADF's hierarchical structure (version, type, content) in a clean object-oriented API, letting you construct documents by adding typed content elements like headings, paragraphs, tables, and formatted text, then export them as dictionaries for use in Atlassian products or other systems that consume ADF.
The library provides classes for the main document container (ADF), text content with formatting marks (Text), tables with headers and cells (Table), and links. It supports text formatting through marks like bold, italic, code, strikethrough, and text color. Tables can be configured with different layouts and display modes. The package includes custom validation exceptions and is designed to catch common mistakes like empty text or invalid formatting marks.
Use it for:
- Generate Jira issue descriptions or comments programmatically from application data
- Build Confluence page content dynamically without manual markup authoring
- Export structured reports or documentation as ADF for import into Atlassian tools
- Create templated documents with consistent formatting and structure
- Automate document generation for workflows that feed into Atlassian products
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
adf_lib creates and manipulates Atlassian Document Format (ADF) documents programmatically, providing a type-safe API for building structured documents with headings, paragraphs, tables, and rich text formatting.
Yes, if you need to generate ADF documents programmatically. The package is actively maintained, has no dependencies, installs easily, and is MIT-licensed. However, it is in Alpha status with a short release history (since January 2025), so evaluate stability for production use and verify it covers the ADF features you need.
Install
adf-lib on PyPI
pip
pip install adf-libuv
uv add adf-libpoetry
poetry add adf-libInstalling adf-lib
Before you install
Low install friction with no runtime dependencies. Active maintenance as of 2026-08-08, though the project is in Alpha status (Development Status :: 3) and relatively young (first release 2025-01-10).
License in practice
MIT License permits free use, modification, and distribution with minimal restrictions. You may use this in proprietary projects, though you must retain the copyright notice and license text.
Quickstart
pip install adf_lib
from adf_lib import ADF, Text
from adf_lib.constants.enums import HeadingLevel
doc = ADF()
doc.add(Text("My Document").heading(HeadingLevel.H1))
doc.add(Text("Paragraph text", "strong").paragraph())
adf_dict = doc.to_dict()
Verify before relying
- Whether the library handles all ADF spec features or only a subset of content types
- Performance characteristics with large documents or complex table structures
- Stability guarantees given Alpha status and limited release history
Package facts
| License | MIT License Copyright (c) 2024 ADF Library Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 563 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 144,277/month — #11,157 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: adf_lib-0.2.1-py3-none-any.whl
Keywords: adf, atlassian, document, format, markup
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
atlassian-doc-builderProgrammatically generate and validate…
permissive · top 15,000 on PyPI
atlas-doc-parserConverts Atlassian Document Format (ADF) JSON…
permissive · top 15,000 on PyPI
ezodfezodf creates, opens, and modifies OpenDocument…
permissive · top 15,000 on PyPI
spire-docSpire.Doc creates, reads, modifies, and…
unclear · top 15,000 on PyPI
pyexcel-ezodfCreate, open, and modify OpenDocument Format…
permissive · top 15,000 on PyPI
pandocPandoc Python Library wraps the Pandoc document…
permissive · top 15,000 on PyPI
odfdoodfdo is a Python library for creating,…
permissive · top 15,000 on PyPI
PyRTF3PyRTF3 generates Rich Text Format (RTF)…
copyleft · top 15,000 on PyPI
mammothConverts Microsoft Word .docx documents to…
permissive · top 5,000 on PyPI
opendataloader-pdfExtracts structured data (Markdown, JSON, HTML)…
permissive · top 15,000 on PyPI