Skip to main content
Documentation Status https://github.com/MacHu-GWU/docpack_confluence-project/actions/workflows/main.yml/badge.svg https://codecov.io/gh/MacHu-GWU/docpack_confluence-project/branch/main/graph/badge.svg https://img.shields.io/pypi/v/docpack-confluence.svg https://img.shields.io/pypi/l/docpack-confluence.svg https://img.shields.io/pypi/pyversions/docpack-confluence.svg https://img.shields.io/badge/✍️_Release_History!--None.svg?style=social&logo=github https://img.shields.io/badge/⭐_Star_me_on_GitHub!--None.svg?style=social&logo=github
https://img.shields.io/badge/Link-API-blue.svg https://img.shields.io/badge/Link-Install-blue.svg https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

docpack_confluence

https://docpack-confluence.readthedocs.io/en/latest/_static/docpack_confluence-logo.png

Batch export Confluence pages to AI-ready formats.

docpack_confluence helps you export Confluence documentation to Markdown/XML files optimized for AI knowledge bases. Whether you’re building a RAG pipeline, uploading to ChatGPT/Claude/Gemini, or creating a custom knowledge base, this library handles the heavy lifting.

Why Use This Library?

  • Precise Selection: Use gitignore-style include/exclude patterns to export exactly the pages you need

  • AI-Ready Output: Generates XML-wrapped Markdown with source URLs and metadata

  • All-in-One Export: Merge all pages into a single file for easy drag-and-drop to AI platforms

  • Multi-Space Support: Export from multiple Confluence spaces (even different sites) in one operation

  • Deep Hierarchy Support: Handles Confluence’s API depth limitations automatically

Quick Example

from pathlib import Path
from sanhe_confluence_sdk import Confluence
from docpack_confluence.api import SpaceExportConfig, ExportSpec

# Setup client
client = Confluence(
    url="https://your-domain.atlassian.net",
    username="your-email@example.com",
    password="your-api-token",  # From https://id.atlassian.com/manage-profile/security/api-tokens
)

# Export with include/exclude patterns
spec = ExportSpec(
    space_configs=[
        SpaceExportConfig(
            client=client,
            space_key="DOCS",
            include=[
                "https://your-domain.atlassian.net/wiki/spaces/DOCS/pages/123/User-Guide/**",
            ],
            exclude=[
                "https://your-domain.atlassian.net/wiki/spaces/DOCS/pages/456/Internal/**",
            ],
        ),
    ],
    dir_out=Path("./export"),
)
spec.export()

# Output:
# ./export/
#   space_key_DOCS/
#     User Guide ~ Getting Started.xml
#     User Guide ~ Configuration.xml
#     ...
#   all_in_one_knowledge_base.txt  <- Ready for AI platforms!

Pattern Syntax:

  • /** - Include page and all descendants

  • /* - Include descendants only (not the page itself)

  • No suffix - Include only the specific page

Install

$ pip install docpack-confluence

For full documentation, visit docpack-confluence.readthedocs.io.

Metadata

Release files for docpack-confluence 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docpack-confluence 0.1.3
File Size Uploaded
docpack_confluence-0.1.3.tar.gz 26.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for docpack-confluence 0.1.3
File Interpreter ABI Platform
docpack_confluence-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 56.6 kB

Release files / docpack_confluence-0.1.3.tar.gz

Download URL docpack_confluence-0.1.3.tar.gz
Size 26.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cf7864afd1becf4005f84a08ca2b45da0ac6980dd1d821415593c210f8c1e7d6
BLAKE2b-256 checksum
How to use checksums
02009e07a4e5e103c2a74ce1c5c77e549f0086de7c0503db05455c124878c1a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.8

Release files / docpack_confluence-0.1.3-py3-none-any.whl

Download URL docpack_confluence-0.1.3-py3-none-any.whl
Size 30.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1921ee34e349c87e990fec99adb90c8ad17e7e2e7fb8c87ea779bab5c2df084
BLAKE2b-256 checksum
How to use checksums
0d3873a321784d15bcf3c799ad85cb65c784c69f3b8a6877cb087398f3e4c5a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.8

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page