haip.confluence is a simple module to communicate with confluence REST API.
- getBody: get confluence page by id
- setBody: set confluence page content by id
- getChildren: get children of a page --> (version, title, body)
pip install haip-confluenceor from source:
git clone https://github.com/haipdev/confluence.git/path-to-my-config-dir/confluence.yml
confluence:
url: https://myconfluence.domain.com/rest/api/latest
username: user
password: pass
timeout: 10import haip.config as config
import haip.confluence as confluence
config.load('/path-to-my-config-dir', 'dev')
content = await confluence.getBody(12345)
page = await confluence.setBody(12345, 'hello world')
children = await confluence.getChildren(12344)Tests are written using pytest and located in the "tests" directory.
pytest testsFeel free to use and enhance this project. Pull requests are welcome.
- Reinhard Hainz - Initial work - haipdev
This project is licensed under the MIT License - see the LICENSE file for details