Welcome to Confluence’s documentation!

Contents:

class confluence.Confluence(profile=None, url='http://localhost:8090/', username='admin', password='admin', appid=None)
__init__(profile=None, url='http://localhost:8090/', username='admin', password='admin', appid=None)

Returns a Confluence object by loading the connection details from the config.ini file.

Parameters:
  • profile – The name of the section from config.ini file that stores server config url/username/password
  • url – URL of the Confluence server
  • username – username to use for authentication
  • password – password to use for authentication
Returns:

Confluence – an instance to a Confluence object.

Raises :

EnvironmentError

Usage:

>>> from confluence import Confluence
>>>
>>> conf = Confluence(profile='confluence')
>>> conf.storePageContent("test","test","hello world!")

Also create a config.ini like this and put it in current directory, user home directory or PYTHONPATH.

[confluence]
url=https://confluence.atlassian.com
# only the `url` is mandatory
user=...
pass=...
convertWikiToStorageFormat(markup)

Converts a wiki text to it’s XML/HTML format. Useful if you prefer to generate pages using wiki syntax instead of XML.

Still, remember that once you cannot retrieve the original wiki text, as confluence is not storing it anymore. Due to this wiki syntax is usefull only for computer generated pages.

Warning: this works only with Conflucence 4.0 or newer, on older versions it will raise an error.

Parameters:markup
Returns:
getPage(page, space)

Returns a page object as a dictionary.

Parameters:
  • page
  • space
Returns:

dictionary. result[‘content’] contains the body of the page.

getPageId(page, space)

Retuns the numeric id of a confluence page.

Parameters:
  • page
  • space
Returns:

Integer: page numeric id

renderContent(space, page)

Obtains the HTML content of a wiki page.

Parameters:
  • space
  • page
Returns:

string: HTML content

storePageContent(page, space, content)

Modifies the content of a Confluence page.

Parameters:
  • page
  • space
  • content
Returns:

bool: True if succeeded

Indices and tables

Table Of Contents

This Page