Nowadays Python is becoming very popular because it contains a wide variety of API’s that can be used to achieve any kind of functionality. On the other hand, Atlassian is becoming very popular because it is open source and very widely used.

In this article, we will discuss how two Python API’s (Atlassian and keyring) can be used to create and update Confluence pages. This use case is very important when Python is used to execute test cases and in the end, it is required to publish test case results on confluence.

Atlassian API is used to update (publish) content on the confluence page and it can be downloaded from here, whereas keyring API’s come default with Python and is used to get the password of the logged-in system.

  1. Install Python on the system and map the pyton/pip folders to system variables.
  2. Clone git hub project: https://github.com/atlassian-api/atlassian-python-api
  3. Install Atlassian-api using following command: pip install Atlassian-python-API
  4. Install python keyring module using pip install keyring
  5. Create a keyring string using the following steps:
  • Under Manage User Credentials (from Control Panel)
  • Add a new generic credential.
  • Give it a meaningful name to form keypair so that it can be accessed from Python.
  • Add windows username and password.

#python #api #web-development

Using Python API's to Create and Update Confluence Page
9.55 GEEK