Skip to main content

Project description

confluence-cloud-ashwani confluence-cloud-ashwani is an API wrapper for Atlassian Confluence written in Python

Installing

pip install confluence-cloud-python

Usage

Client instantiation

from sigconfluence.client import Client

client = Client('CLIENT_ID', 'CLIENT_SECRET')

OAuth 2.0 (3LO)

For more information: https://developer.atlassian.com/cloud/jira/platform/oauth-2-authorization-code-grants-3lo-for-apps/

Direct the user to the authorization URL to get an authorization code

A refresh token can be returned with the access token in your initial authorization flow. To do this, add the offline_access scope to the scope parameter of the authorization URL.

scope_list = ['read:confluence-space.summary', 'offline_access','read:confluence-props','read:confluence-content.all', 'read:confluence-content.summary', 'search:confluence']

url = client.authorization_url('REDIRECT_URI', scope_list, 'STATE')

Exchange authorization code for access token

response = client.exchange_code('REDIRECT_URI', 'CODE')

Set access token in the library

client.set_access_token('ACCESS_TOKEN')

Get the cloudid for your site

response = client.get_resource_list()

Set cloudid in the library

client.set_cloud_id('CLOUD_ID')

Refresh token

response = client.refresh_token('REFRESH_TOKEN')

Find all the Confluence Spaces

spaces = client.spaces.get_spaces()

Find all the contents

start = 0
limit = 100
contents_data = client.contents.get_contents('expand=body.storage&next=true&limit='+str(limit)+'&start='+str(start))
contents.extend(contents_data['results'])
start=limit
limit=contents_data['size']

print contents

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

confluence-cloud-python-1.1.2.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

confluence_cloud_python-1.1.2-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file confluence-cloud-python-1.1.2.tar.gz.

File metadata

  • Download URL: confluence-cloud-python-1.1.2.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for confluence-cloud-python-1.1.2.tar.gz
Algorithm Hash digest
SHA256 259032c38390b3f1a1d47803c14928d66f08f460626fd0c667130df328669fd8
MD5 bd6febfe4637fb664c770343c6eb9415
BLAKE2b-256 ec5a53cc4e30a9ca525dc7e9a7d95024978d89b76037a62ed8185b0decd2cd4d

See more details on using hashes here.

File details

Details for the file confluence_cloud_python-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: confluence_cloud_python-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0

File hashes

Hashes for confluence_cloud_python-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b763788248fe03f8d5ae6198b11c1e8f505236e916077fb364f72a81421b3613
MD5 1213e722d1367c7dff7e264727510a3e
BLAKE2b-256 e46e471d9bdcae739c5c9692b0528dad73d6f04fab00bfb9580f4ebb809bda54

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page