Welcome to Confluence REST API’s documentation!¶
Confluence Python Library¶
This is a simple wrapper around the REST API which the Confluence provides. Consider the API to be stable as of v1.0.0 (now released)
c.f. endpoints.md for a list of endpoints and whether this library supports them yet. Please do send pull requests if you want an endpoint that isn’t covered!
Installation¶
pip install confluence-rest-library
Usage¶
from confluence.client import Confluence
with Confluence('https://site:8080/confluence', ('user', 'pass')) as c:
pages = c.search('ID=1')
Development and Deployment¶
See the Contribution guidelines for this project for details on how to make changes to this library.
Testing Locally¶
There are two sets of tests included. A suite of unit tests that verify the models can be built correctly and a suite of integration tests that run against a local instance of confluence. The unit tests can be run by simply invoking: .. code:
python setup.py test --addopts "tests"
The integration tests are more complex and require the developer to take the following steps:
- Install the Atlassian SDK
- Run
atlas-run-standalone --product confluence --version 6.6.0 --server localhost
- Wait for the server to complete starting up
- Run integration tests using
python setup.py test --addopts "integration_tests"
How to contribute¶
You’re very welcome to make bug fixes or enhancements to this library. This document lays out the guidelines for how to get those changes into the main package repository.
Getting Started¶
- Fork the repository on github: https://github.com/DaveTCode/confluence-python-lib
- Make changes
- Send pull request
Using your changes before they’re live¶
You may want to use the changes you’ve made to this library before the merging/review process has been completed. To do this you can install it into the global python environment by running this command from the top level directory.
pip install . --upgrade
Change Log¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
`1.2.2`_ - 2019-05-18¶
Added¶
- Allow passing through a flag to not validate Confluence SSL certificate
`1.2.1`_ - 2019-02-26¶
Added¶
- Added support for updating attachment metadata
- Added support for updating attachment contents
`1.1.1`_ - 2019-02-24¶
Added¶
- Added a function to get attachment data from an attachment object
Changed¶
- Nothing
`1.0.1`_ - 2018-08-17¶
Added¶
- Added support for handling 401 errors and wrapping them in specific exceptions
Changed¶
- Nothing
1.0.0 - 2018-06-02¶
Added¶
- Additional functional tests to bring coverage up to ~90%
Changed¶
- The API for getting labels has been changed so that the prefix is now an enum as the HTTP API expects.
0.15.0 - 2018-05-25¶
Added¶
- Option to update content without sending notifications
Changed¶
- Added lots of extra docstrings
0.14.0 - 2018-04-06¶
Added¶
- Get content by identifier
Changed¶
- Fixed update_content and added integration tests for it
`0.13.2`_ - 2018-04-04¶
Added¶
- Nothing
Changed¶
- Fixed content body implementation to contain the correct data and added integration tests to verify it
0.12.0 - 2018-03-18¶
Added¶
- Added support for creating new content (blogs & pages)
- Added functional tests for creating new content and various space functions
Changed¶
- hidden is now optional when viewing a Version object
0.11.0 - 2018-03-11¶
Added¶
- Added support for deleting content
- Added support for creating, updating and deleting labels
Changed¶
- Nothing
0.10.0 - 2018-03-10¶
Added¶
- Added support for all endpoints relating to space properties
Changed¶
- Complete overhaul of the way that failed responses are handled, all of them now raise custom exceptions.
0.8.0 - 2018-03-09¶
Added¶
- Added full support for manipulating watches on space and content
Changed¶
- Nothing
0.7.0 - 2018-01-30¶
Added¶
- Added basic support for updating content
- Many more of the fields on content objects are now stored when they’re expanded
Changed¶
- Major overhaul of the content based objects to better match the API provided
0.6.0 - 2018-01-26¶
Added¶
- Added longtask endpoints
- A markdown file containing all endpoints with their current state
Changed¶
- client.spaces is renamed to client.get_spaces in keeping with other endpoints
0.5.0 - 2018-01-26¶
Added¶
- Added support for python 2.7 & 3.5
- Added unit tests to verify the models are basically created how you’d expect
Changed¶
- Nothing
0.3.0 - 2018-01-18¶
Added¶
- Can now be treated as a context manager holding a single session for the duration of the class.
- README converted to RST for pypi
Changed¶
- Nothing