No project description provided
Project description
ConfluenPy
ConfluenPy is a Python package that allows you to interact with Atlassian Confluence via the REST API to programmatically create and update documentation pages.
Example usage
# Example usage
confluence = atlassian.Confluence(
url='https://example.atlassian.net/',
username='your.user@company.com',
password=os.getenv('CONFLUENCE_API_TOKEN')
)
dbpl = Page(title='WonderDocs', space='IsVast', confluence=confluence)
# Add a table of contents
dbpl.body.toc()
# Add a horizontal rule
dbpl.body.text(PageFormatting.horizontal_rule())
# Takes the Readme.md file and converts it to confluence format
with open('README.md', encoding='utf-8') as markdown_text:
markdown = MarkdownToConfluenceConverter.convert(markdown_text.read())
# Only takes the second section of the markdown file
dbpl.body.content += markdown.section(2)
# Adds some more content
dbpl.body.heading('h1', "Biggest heading")
dbpl.body.text(TextFormatting.block_quote('This is a paragraph'))
dbpl.body.code_block(title='tt', content='Wonderful code')
# Update the page
dbpl.update()
Installation
Simply install the package using pip:
pip install confluenpy
Usage
Confluence pages are represented by the Page
class. The page content is handled by a PageBody
object, which represents it in the confluence wiki markup.
The following confluence macros are also supported via the wiki markup (see the MacroMixin
class for details.):
- toc
- code block
Markup support
The MarkdownToConfluenceConverter
class allows to convert markdown to confluence wiki markup. The following markdown elements are supported:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for confluenpy-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad0bf2c123b5a4dd51e10db4c43b0f2d4ce82b09d899bc89e5b6755a26526a00 |
|
MD5 | e59ebbd26ee10afa70e4aaee8d04e173 |
|
BLAKE2b-256 | 09b37532fd64f0ac369ee5b9ede09552c236096b22b975a42af04ca2dc588f81 |