├── doc └── html │ ├── crarr.png │ ├── index.html │ ├── frames.html │ ├── toc-PythonConfluenceAPI-module.html │ ├── redirect.html │ ├── toc-PythonConfluenceAPI.cfapi-module.html │ ├── toc-PythonConfluenceAPI.api-module.html │ ├── toc.html │ ├── toc-everything.html │ ├── class-tree.html │ ├── module-tree.html │ ├── PythonConfluenceAPI-pysrc.html │ ├── PythonConfluenceAPI-module.html │ ├── api-objects.txt │ ├── PythonConfluenceAPI.cfapi-module.html │ ├── PythonConfluenceAPI.api-module.html │ ├── epydoc.js │ ├── help.html │ ├── epydoc.css │ ├── PythonConfluenceAPI.cfapi.ConfluenceFuturesAPI-class.html │ └── identifier-index.html ├── pythonconfluenceapilight.png ├── makedocs.sh ├── requirements.txt ├── PythonConfluenceAPI ├── __init__.py └── cfapi.py ├── Examples ├── create_space.py └── get_latest_content.py ├── .gitignore ├── setup.py ├── README.md ├── LICENSE └── ez_setup.py /doc/html/crarr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rpcope1/PythonConfluenceAPI/HEAD/doc/html/crarr.png -------------------------------------------------------------------------------- /pythonconfluenceapilight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rpcope1/PythonConfluenceAPI/HEAD/pythonconfluenceapilight.png -------------------------------------------------------------------------------- /makedocs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | epydoc -o doc/html --html --show-imports -n PythonConfluenceAPI -u https://github.com/pushrodtechnology/PythonConfluenceAPI --no-sourcecode PythonConfluenceAPI 3 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # The requests 'security' extra prevents InsecurePlatformWarning 2 | # on e.g. Ubuntu 14.04 LTS 3 | 4 | anyjson>=0.3.3,<1 5 | future>=0.15.2 6 | futures>=3.0.3,<4 7 | requests[security]>=2.3.0,<3 8 | requests-futures>=0.9.5,<1 9 | future>=0.15.2,<1 10 | -------------------------------------------------------------------------------- /PythonConfluenceAPI/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from __future__ import division 3 | from __future__ import print_function 4 | from __future__ import unicode_literals 5 | 6 | from future import standard_library 7 | standard_library.install_aliases() 8 | 9 | __author__ = 'Robert Cope, Pushrod Technology' 10 | 11 | from .api import ConfluenceAPI, all_of 12 | from .cfapi import ConfluenceFuturesAPI 13 | -------------------------------------------------------------------------------- /doc/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | PythonConfluenceAPI 7 | 8 | 9 | 10 | 12 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /doc/html/frames.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | PythonConfluenceAPI 7 | 8 | 9 | 10 | 12 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Examples/create_space.py: -------------------------------------------------------------------------------- 1 | __author__ = 'Robert Cope' 2 | 3 | from PythonConfluenceAPI import ConfluenceAPI 4 | 5 | USERNAME = '' 6 | PASSWORD = '' 7 | WIKI_SITE = 'https://my-awesome-organization.atlassian.net/wiki' 8 | 9 | api = ConfluenceAPI(USERNAME, PASSWORD, WIKI_SITE) 10 | api.create_new_space({ 11 | 'key': 'LOL', 12 | 'name': 'My testing space', 13 | 'description': { 14 | 'plain': {'value': 'This is my new testing space', 'representation': 'plain'} 15 | } 16 | }) 17 | # Generate a page for our space 18 | api.create_new_content({ 19 | 'type': 'page', 20 | 'title': 'My landing page for TESTSPACE!', 21 | 'space': {'key': 'LOL'}, 22 | 'body': { 23 | 'storage': {'value': '

Welcome to the landing page!

Lorem Ipsum

', 24 | 'representation': 'storage' 25 | } 26 | } 27 | }) 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | 5 | # C extensions 6 | *.so 7 | 8 | # Distribution / packaging 9 | .Python 10 | env/ 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | *.egg-info/ 23 | .installed.cfg 24 | *.egg 25 | 26 | # PyInstaller 27 | # Usually these files are written by a python script from a template 28 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 29 | *.manifest 30 | *.spec 31 | 32 | # Installer logs 33 | pip-log.txt 34 | pip-delete-this-directory.txt 35 | 36 | # Unit test / coverage reports 37 | htmlcov/ 38 | .tox/ 39 | .coverage 40 | .coverage.* 41 | .cache 42 | nosetests.xml 43 | coverage.xml 44 | *,cover 45 | 46 | # Translations 47 | *.mo 48 | *.pot 49 | 50 | # Django stuff: 51 | *.log 52 | 53 | # Sphinx documentation 54 | docs/_build/ 55 | 56 | # PyBuilder 57 | target/ 58 | -------------------------------------------------------------------------------- /Examples/get_latest_content.py: -------------------------------------------------------------------------------- 1 | __author__ = 'Robert Cope' 2 | 3 | from PythonConfluenceAPI import ConfluenceAPI 4 | import sys 5 | 6 | 7 | def compatible_print(msg): 8 | sys.stdout.write("{}\n".format(msg)) 9 | sys.stdout.flush() 10 | 11 | USERNAME = '' 12 | PASSWORD = '' 13 | WIKI_SITE = 'https://my-awesome-organization.atlassian.net/wiki' 14 | 15 | api = ConfluenceAPI(USERNAME, PASSWORD, WIKI_SITE) 16 | new_pages = api.get_content('') 17 | compatible_print("Newest pages:") 18 | for page in new_pages: 19 | compatible_print("{} - {} ({})".format(page.get("space", {}).get("key", "???"), 20 | page.get("title", "(No title)"), 21 | page.get("id", "(No ID!?)"))) 22 | content = page.get("body", {}).get("view", {}).get("value", "No content.") 23 | content = content[:37] + "..." if len(content) > 40 else content 24 | compatible_print("Preview: {}".format(content)) -------------------------------------------------------------------------------- /doc/html/toc-PythonConfluenceAPI-module.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | PythonConfluenceAPI 7 | 8 | 9 | 10 | 11 | 13 |

Module PythonConfluenceAPI

14 |
15 |
16 | [hide private] 18 | 19 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /doc/html/redirect.html: -------------------------------------------------------------------------------- 1 | Epydoc Redirect Page 2 | 3 | 4 | 5 | 6 | 7 | 8 | 18 | 19 |

Epydoc Auto-redirect page

20 | 21 |

When javascript is enabled, this page will redirect URLs of 22 | the form redirect.html#dotted.name to the 23 | documentation for the object with the given fully-qualified 24 | dotted name.

25 |

 

26 | 27 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /doc/html/toc-PythonConfluenceAPI.cfapi-module.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | cfapi 7 | 8 | 9 | 10 | 11 | 13 |

Module cfapi

14 |
15 |

Classes

16 | ConfluenceFuturesAPI

Functions

18 | request_patch

20 | [hide private] 22 | 23 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /doc/html/toc-PythonConfluenceAPI.api-module.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | api 7 | 8 | 9 | 10 | 11 | 13 |

Module api

14 |
15 |

Classes

16 | ConfluenceAPI

Functions

18 | all_of

Variables

20 | api_logger
nh

23 | [hide private] 25 | 26 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | __author__ = 'Robert Cope, Pushrod Technology' 2 | __author_email__ = 'robert.cope@pushrodtechnology.com' 3 | __version__ = '0.0.1rc6' 4 | 5 | import ez_setup 6 | ez_setup.use_setuptools() 7 | 8 | from setuptools import setup 9 | 10 | setup(name='PythonConfluenceAPI', 11 | author=__author__, 12 | author_email=__author_email__, 13 | version=__version__, 14 | description="PythonConfluenceAPI is a Pythonic API wrapper over the Confluence REST API," 15 | " which cleanly wraps all of the methods present in the current Confluence API spec, " 16 | "and is easily adapter to be used with minimal effort in other frameworks such as concurrent " 17 | "futures, greenlets, and other concurrency schemes.", 18 | packages=['PythonConfluenceAPI'], 19 | scripts=['ez_setup.py', 'setup.py'], 20 | license="LGPLv3", 21 | keywords="atlassian confluence api", 22 | url="https://github.com/pushrodtechnology/PythonConfluenceAPI", 23 | install_requires=['requests>=2.3.0', 'anyjson', 'futures', 'requests-futures'], 24 | classifiers=["Development Status :: 2 - Pre-Alpha", 25 | "Environment :: Other Environment", 26 | "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)", 27 | "Operating System :: OS Independent", 28 | "Intended Audience :: Developers", 29 | "Intended Audience :: System Administrators", 30 | "Topic :: Internet :: WWW/HTTP", 31 | "Topic :: Software Development :: Libraries :: Python Modules"]) 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![PyPI version](https://badge.fury.io/py/PythonConfluenceAPI.svg)](http://badge.fury.io/py/PythonConfluenceAPI) 2 | 3 | ![Alt Text](https://raw.githubusercontent.com/pushrodtechnology/PythonConfluenceAPI/master/pythonconfluenceapilight.png "PythonConfluenceAPI") 4 | 5 | # PythonConfluenceAPI 6 | PythonConfluenceAPI is a Pythonic API wrapper over the Confluence REST API, which cleanly wraps *all* of the 7 | methods present in the current Confluence API spec, and is easily adapter to be used with minimal effort in other 8 | frameworks such as concurrent futures, greenlets, and other concurrency schemes. 9 | 10 | Read the latest PythonConfluenceAPI docs [here.](http://htmlpreview.github.io/?https://github.com/pushrodtechnology/PythonConfluenceAPI/blob/master/doc/html/index.html) 11 | 12 | # How To Use 13 | 14 | # Load API wrapper from library 15 | from PythonConfluenceAPI import ConfluenceAPI 16 | 17 | # Create API object. 18 | api = ConfluenceAPI('username', 'password', 'https://my.atlassian.site.com/wiki') 19 | 20 | # Get latest visible content from confluence instance. 21 | confluence_recent_data = api.get_content() 22 | 23 | # Create a new confluence space 24 | api.create_new_space({'key': 'TEST', 'name': 'My Test Space', 'description': 'This is a test confluence space'}) 25 | 26 | All of the API methods have docstrings attached which mirror the official Atlassian documentation, as the API 27 | currently is a rather thin wrapper over top of the Confluence API. Users are advised to consult the source code or 28 | look at the Atlassian API documentation for further info. Examples are also provided in the Examples directory of 29 | the repository. 30 | 31 | # License 32 | This repository was written for Pushrod Technology by Robert Cope, and is licensed as LGPLv3. 33 | -------------------------------------------------------------------------------- /doc/html/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Table of Contents 7 | 8 | 9 | 10 | 11 | 13 |

Table of Contents

14 |
15 | Everything 16 |
17 |

Modules

18 | PythonConfluenceAPI
PythonConfluenceAPI.api
PythonConfluenceAPI.cfapi

22 | [hide private] 24 | 25 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /doc/html/toc-everything.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Everything 7 | 8 | 9 | 10 | 11 | 13 |

Everything

14 |
15 |

All Classes

16 | PythonConfluenceAPI.api.ConfluenceAPI
PythonConfluenceAPI.cfapi.ConfluenceFuturesAPI

All Functions

19 | PythonConfluenceAPI.api.all_of
PythonConfluenceAPI.cfapi.request_patch

All Variables

22 | PythonConfluenceAPI.api.api_logger
PythonConfluenceAPI.api.nh

25 | [hide private] 27 | 28 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /doc/html/class-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Class Hierarchy 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | 18 | 20 | 21 | 22 | 24 | 25 | 26 | 28 | 29 | 30 | 32 | 33 | 34 | 39 | 40 | 41 | 42 | 43 | 44 | 55 | 56 |
  45 | 46 | 47 | 49 | 53 |
[hide private]
[frames] | no frames]
54 |
57 |
58 | [ Module Hierarchy 59 | | Class Hierarchy ] 60 |

61 |

Class Hierarchy

62 | 71 | 72 | 74 | 75 | 76 | 78 | 79 | 80 | 82 | 83 | 84 | 86 | 87 | 88 | 90 | 91 | 92 | 97 | 98 | 99 | 100 | 101 | 104 | 108 | 109 |
110 | 111 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /doc/html/module-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Module Hierarchy 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | 18 | 20 | 21 | 22 | 24 | 25 | 26 | 28 | 29 | 30 | 32 | 33 | 34 | 39 | 40 | 41 | 42 | 43 | 44 | 55 | 56 |
  45 | 46 | 47 | 49 | 53 |
[hide private]
[frames] | no frames]
54 |
57 |
58 | [ Module Hierarchy 59 | | Class Hierarchy ] 60 |

61 |

Module Hierarchy

62 | 70 | 71 | 73 | 74 | 75 | 77 | 78 | 79 | 81 | 82 | 83 | 85 | 86 | 87 | 89 | 90 | 91 | 96 | 97 | 98 | 99 | 100 | 103 | 107 | 108 |
109 | 110 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /doc/html/PythonConfluenceAPI-pysrc.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | PythonConfluenceAPI 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | 18 | 20 | 21 | 22 | 24 | 25 | 26 | 28 | 29 | 30 | 32 | 33 | 34 | 39 | 40 | 41 | 42 | 43 | 48 | 59 | 60 |
44 | 45 | Package PythonConfluenceAPI 46 | 47 | 49 | 50 | 51 | 53 | 57 |
[hide private]
[frames] | no frames]
58 |
61 |

Source Code for Package PythonConfluenceAPI

62 |
 63 | 1  __author__ = 'Robert Cope', 'Pushrod Technology' 
 64 | 2   
 65 | 3  from api import ConfluenceAPI 
 66 | 4   
 71 | 
72 |
73 | 74 | 76 | 77 | 78 | 80 | 81 | 82 | 84 | 85 | 86 | 88 | 89 | 90 | 92 | 93 | 94 | 99 | 100 | 101 | 102 | 103 | 106 | 110 | 111 |
112 | 113 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /PythonConfluenceAPI/cfapi.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | import future.standard_library 3 | future.standard_library.install_aliases() 4 | 5 | __author__ = 'Robert Cope' 6 | 7 | from requests.auth import HTTPBasicAuth 8 | from .api import ConfluenceAPI, api_logger, json 9 | from requests_futures.sessions import FuturesSession 10 | from urllib.parse import urljoin 11 | 12 | 13 | # By default requests-futures request method returns the response object instead of the results of the callback; 14 | # this is undesirable here, since the callback result is really the expected end result. This patches the module 15 | # to get that expected behavior. 16 | def request_patch(self, *args, **kwargs): 17 | """Maintains the existing api for Session.request. 18 | Used by all of the higher level methods, e.g. Session.get. 19 | The background_callback param allows you to do some processing on the 20 | response in the background, e.g. call resp.json() so that json parsing 21 | happens in the background thread. 22 | """ 23 | func = sup = super(FuturesSession, self).request 24 | 25 | background_callback = kwargs.pop('background_callback', None) 26 | if background_callback: 27 | def wrap(*args_, **kwargs_): 28 | resp = sup(*args_, **kwargs_) 29 | # Patch the closure to return the callback. 30 | return background_callback(self, resp) 31 | 32 | func = wrap 33 | return self.executor.submit(func, *args, **kwargs) 34 | 35 | FuturesSession.request = request_patch 36 | 37 | 38 | class ConfluenceFuturesAPI(ConfluenceAPI): 39 | def __init__(self, username, password, uri_base, user_agent=ConfluenceAPI.DEFAULT_USER_AGENT, 40 | executor=None, max_workers=10): 41 | """ 42 | Initialize the async concurrent.futures API object. 43 | :param username: Your Confluence username. 44 | :param password: Your Confluence password. 45 | :param uri_base: The base url for your Confluence wiki (e.g. myorg.atlassian.com/wiki) 46 | :param user_agent: (Optional): The user-agent you wish to send on requests to the API. 47 | DEFAULT: PythonConfluenceAPI. 48 | :param executor: (Optional): The concurrent.futures executor to power the API calls. Default: None, create a 49 | new ThreadPoolExecutor. 50 | :param max_workers: (Optional): If the executor is not specified and the default ThreadPoolExecutor is spawned, 51 | this specifies the number of worker threads to create. 52 | """ 53 | super(ConfluenceFuturesAPI, self).__init__(username, password, uri_base, user_agent) 54 | self.executor = executor 55 | self.max_workers = max_workers 56 | 57 | def _start_http_session(self): 58 | """ 59 | Start a new requests HTTP session, clearing cookies and session data. 60 | :return: None 61 | """ 62 | api_logger.debug("Starting new HTTP session...") 63 | self.session = FuturesSession(executor=self.executor, max_workers=self.max_workers) 64 | self.session.headers.update({"User-Agent": self.user_agent}) 65 | if self.username and self.password: 66 | api_logger.debug("Requests will use authorization.") 67 | self.session.auth = HTTPBasicAuth(self.username, self.password) 68 | 69 | def _service_request(self, request_type, sub_uri, params=None, callback=None, 70 | raise_for_status=True, raw=False, **kwargs): 71 | """ 72 | Base method for handling HTTP requests via the current requests session. 73 | :param request_type: The request type as a string (e.g. "POST", "GET", "PUT", etc.) 74 | :param sub_uri: The REST end point (sub-uri) to communicate with. 75 | :param params: (Optional) HTTP Request parameters. Default: none 76 | :param callback: (Optional) A callback function to be excuted on the resulting requests response. 77 | This synchronous implementation will return the results of the callback. 78 | Default: None. This method returns either the decoded JSON or the raw request content. 79 | :param raise_for_status: (Optional) When set True, we raise requests.HTTPError on 4xx or 5xx status. When 80 | set False, non-2xx/3xx status code is ignored. Default: True 81 | :param raw: (Optional) If no callback is set, return the raw content from the request if this is set True. 82 | If False, the method attempts to parse the request as JSON data and return the resutls. 83 | Default: False 84 | :param kwargs: Additional parameters to pass to the session request call. 85 | :return: The concurrent.futures object that holds the future for the API method call. 86 | """ 87 | api_logger.debug("Sending request: {} ({})".format(sub_uri, request_type)) 88 | if not self.session: 89 | self._start_http_session() 90 | uri = urljoin(self.uri_base, sub_uri) 91 | if params: 92 | kwargs.update(params=params) 93 | if callback: 94 | def base_callback(_, response): 95 | if raise_for_status: 96 | response.raise_for_status() 97 | response.encoding = 'utf-8' 98 | return callback(response) 99 | else: 100 | def base_callback(_, response): 101 | if raise_for_status: 102 | response.raise_for_status() 103 | response.encoding = 'utf-8' 104 | return response.content if raw else json.loads(response.text) 105 | response_future = self.session.request(request_type, uri, background_callback=base_callback, **kwargs) 106 | return response_future 107 | -------------------------------------------------------------------------------- /doc/html/PythonConfluenceAPI-module.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | PythonConfluenceAPI 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | 18 | 20 | 21 | 22 | 24 | 25 | 26 | 28 | 29 | 30 | 32 | 33 | 34 | 39 | 40 | 41 | 42 | 43 | 48 | 59 | 60 |
44 | 45 | Package PythonConfluenceAPI 46 | 47 | 49 | 50 | 51 | 53 | 57 |
[hide private]
[frames] | no frames]
58 |
61 | 62 |

Package PythonConfluenceAPI

63 |
64 |
Authors:
65 |
66 | Robert Cope, 67 | Pushrod Technology 68 |
69 |
70 |
71 | 72 | 74 | 75 | 86 | 87 | 92 |
76 | 77 | 78 | 79 | 83 | 84 |
Submodules[hide private]
85 |
88 |
93 | 94 |
95 |

Imports: 96 | ConfluenceAPI, 97 | all_of, 98 | ConfluenceFuturesAPI 99 |


100 | 101 | 103 | 104 | 105 | 107 | 108 | 109 | 111 | 112 | 113 | 115 | 116 | 117 | 119 | 120 | 121 | 126 | 127 | 128 | 129 | 130 | 133 | 137 | 138 |
139 | 140 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /doc/html/api-objects.txt: -------------------------------------------------------------------------------- 1 | PythonConfluenceAPI PythonConfluenceAPI-module.html 2 | PythonConfluenceAPI.api PythonConfluenceAPI.api-module.html 3 | PythonConfluenceAPI.api.nh PythonConfluenceAPI.api-module.html#nh 4 | PythonConfluenceAPI.api.all_of PythonConfluenceAPI.api-module.html#all_of 5 | PythonConfluenceAPI.api.api_logger PythonConfluenceAPI.api-module.html#api_logger 6 | PythonConfluenceAPI.cfapi PythonConfluenceAPI.cfapi-module.html 7 | PythonConfluenceAPI.cfapi.request_patch PythonConfluenceAPI.cfapi-module.html#request_patch 8 | PythonConfluenceAPI.api.ConfluenceAPI PythonConfluenceAPI.api.ConfluenceAPI-class.html 9 | PythonConfluenceAPI.api.ConfluenceAPI.create_new_private_space PythonConfluenceAPI.api.ConfluenceAPI-class.html#create_new_private_space 10 | PythonConfluenceAPI.api.ConfluenceAPI.update_attachment_metadata PythonConfluenceAPI.api.ConfluenceAPI-class.html#update_attachment_metadata 11 | PythonConfluenceAPI.api.ConfluenceAPI.update_space PythonConfluenceAPI.api.ConfluenceAPI-class.html#update_space 12 | PythonConfluenceAPI.api.ConfluenceAPI.convert_contentbody_to_new_type PythonConfluenceAPI.api.ConfluenceAPI-class.html#convert_contentbody_to_new_type 13 | PythonConfluenceAPI.api.ConfluenceAPI.get_op_restrictions_for_content_id PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_op_restrictions_for_content_id 14 | PythonConfluenceAPI.api.ConfluenceAPI.get_content PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_content 15 | PythonConfluenceAPI.api.ConfluenceAPI.get_space_content PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_space_content 16 | PythonConfluenceAPI.api.ConfluenceAPI.get_op_restrictions_by_content_operation PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_op_restrictions_by_content_operation 17 | PythonConfluenceAPI.api.ConfluenceAPI.__init__ PythonConfluenceAPI.api.ConfluenceAPI-class.html#__init__ 18 | PythonConfluenceAPI.api.ConfluenceAPI.get_long_tasks PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_long_tasks 19 | PythonConfluenceAPI.api.ConfluenceAPI.delete_property PythonConfluenceAPI.api.ConfluenceAPI-class.html#delete_property 20 | PythonConfluenceAPI.api.ConfluenceAPI._service_put_request PythonConfluenceAPI.api.ConfluenceAPI-class.html#_service_put_request 21 | PythonConfluenceAPI.api.ConfluenceAPI.get_content_property_by_key PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_content_property_by_key 22 | PythonConfluenceAPI.api.ConfluenceAPI.get_content_labels PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_content_labels 23 | PythonConfluenceAPI.api.ConfluenceAPI.get_content_macro_by_macro_id PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_content_macro_by_macro_id 24 | PythonConfluenceAPI.api.ConfluenceAPI._start_http_session PythonConfluenceAPI.api.ConfluenceAPI-class.html#_start_http_session 25 | PythonConfluenceAPI.api.ConfluenceAPI.get_spaces PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_spaces 26 | PythonConfluenceAPI.api.ConfluenceAPI._service_post_request PythonConfluenceAPI.api.ConfluenceAPI-class.html#_service_post_request 27 | PythonConfluenceAPI.api.ConfluenceAPI.get_content_children_by_type PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_content_children_by_type 28 | PythonConfluenceAPI.api.ConfluenceAPI.get_content_history_by_id PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_content_history_by_id 29 | PythonConfluenceAPI.api.ConfluenceAPI.delete_space PythonConfluenceAPI.api.ConfluenceAPI-class.html#delete_space 30 | PythonConfluenceAPI.api.ConfluenceAPI.get_space_information PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_space_information 31 | PythonConfluenceAPI.api.ConfluenceAPI.create_new_content PythonConfluenceAPI.api.ConfluenceAPI-class.html#create_new_content 32 | PythonConfluenceAPI.api.ConfluenceAPI.update_attachment PythonConfluenceAPI.api.ConfluenceAPI-class.html#update_attachment 33 | PythonConfluenceAPI.api.ConfluenceAPI.get_content_macro_by_hash PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_content_macro_by_hash 34 | PythonConfluenceAPI.api.ConfluenceAPI.create_new_label_by_content_id PythonConfluenceAPI.api.ConfluenceAPI-class.html#create_new_label_by_content_id 35 | PythonConfluenceAPI.api.ConfluenceAPI.create_new_space PythonConfluenceAPI.api.ConfluenceAPI-class.html#create_new_space 36 | PythonConfluenceAPI.api.ConfluenceAPI.UPDATE_CONTENT_REQUIRED_KEYS PythonConfluenceAPI.api.ConfluenceAPI-class.html#UPDATE_CONTENT_REQUIRED_KEYS 37 | PythonConfluenceAPI.api.ConfluenceAPI._service_get_request PythonConfluenceAPI.api.ConfluenceAPI-class.html#_service_get_request 38 | PythonConfluenceAPI.api.ConfluenceAPI.update_content_by_id PythonConfluenceAPI.api.ConfluenceAPI-class.html#update_content_by_id 39 | PythonConfluenceAPI.api.ConfluenceAPI.NEW_CONTENT_REQUIRED_KEYS PythonConfluenceAPI.api.ConfluenceAPI-class.html#NEW_CONTENT_REQUIRED_KEYS 40 | PythonConfluenceAPI.api.ConfluenceAPI.get_content_by_id PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_content_by_id 41 | PythonConfluenceAPI.api.ConfluenceAPI.get_space_content_by_type PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_space_content_by_type 42 | PythonConfluenceAPI.api.ConfluenceAPI.create_new_content_property PythonConfluenceAPI.api.ConfluenceAPI-class.html#create_new_content_property 43 | PythonConfluenceAPI.api.ConfluenceAPI.get_content_properties PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_content_properties 44 | PythonConfluenceAPI.api.ConfluenceAPI.create_new_property PythonConfluenceAPI.api.ConfluenceAPI-class.html#create_new_property 45 | PythonConfluenceAPI.api.ConfluenceAPI.get_content_comments PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_content_comments 46 | PythonConfluenceAPI.api.ConfluenceAPI.delete_label_by_id PythonConfluenceAPI.api.ConfluenceAPI-class.html#delete_label_by_id 47 | PythonConfluenceAPI.api.ConfluenceAPI.get_content_descendants_by_type PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_content_descendants_by_type 48 | PythonConfluenceAPI.api.ConfluenceAPI.get_content_descendants PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_content_descendants 49 | PythonConfluenceAPI.api.ConfluenceAPI._service_request PythonConfluenceAPI.api.ConfluenceAPI-class.html#_service_request 50 | PythonConfluenceAPI.api.ConfluenceAPI.update_property PythonConfluenceAPI.api.ConfluenceAPI-class.html#update_property 51 | PythonConfluenceAPI.api.ConfluenceAPI.DEFAULT_USER_AGENT PythonConfluenceAPI.api.ConfluenceAPI-class.html#DEFAULT_USER_AGENT 52 | PythonConfluenceAPI.api.ConfluenceAPI.get_content_children PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_content_children 53 | PythonConfluenceAPI.api.ConfluenceAPI.get_long_task_info PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_long_task_info 54 | PythonConfluenceAPI.api.ConfluenceAPI.delete_content_by_id PythonConfluenceAPI.api.ConfluenceAPI-class.html#delete_content_by_id 55 | PythonConfluenceAPI.api.ConfluenceAPI.create_new_attachment_by_content_id PythonConfluenceAPI.api.ConfluenceAPI-class.html#create_new_attachment_by_content_id 56 | PythonConfluenceAPI.api.ConfluenceAPI._service_delete_request PythonConfluenceAPI.api.ConfluenceAPI-class.html#_service_delete_request 57 | PythonConfluenceAPI.api.ConfluenceAPI.search_content PythonConfluenceAPI.api.ConfluenceAPI-class.html#search_content 58 | PythonConfluenceAPI.api.ConfluenceAPI.ATTACHMENT_METADATA_KEYS PythonConfluenceAPI.api.ConfluenceAPI-class.html#ATTACHMENT_METADATA_KEYS 59 | PythonConfluenceAPI.api.ConfluenceAPI.get_content_attachments PythonConfluenceAPI.api.ConfluenceAPI-class.html#get_content_attachments 60 | PythonConfluenceAPI.cfapi.ConfluenceFuturesAPI PythonConfluenceAPI.cfapi.ConfluenceFuturesAPI-class.html 61 | PythonConfluenceAPI.cfapi.ConfluenceFuturesAPI.__init__ PythonConfluenceAPI.cfapi.ConfluenceFuturesAPI-class.html#__init__ 62 | PythonConfluenceAPI.cfapi.ConfluenceFuturesAPI._start_http_session PythonConfluenceAPI.cfapi.ConfluenceFuturesAPI-class.html#_start_http_session 63 | PythonConfluenceAPI.cfapi.ConfluenceFuturesAPI._service_request PythonConfluenceAPI.cfapi.ConfluenceFuturesAPI-class.html#_service_request 64 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | 9 | This version of the GNU Lesser General Public License incorporates 10 | the terms and conditions of version 3 of the GNU General Public 11 | License, supplemented by the additional permissions listed below. 12 | 13 | 0. Additional Definitions. 14 | 15 | As used herein, "this License" refers to version 3 of the GNU Lesser 16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU 17 | General Public License. 18 | 19 | "The Library" refers to a covered work governed by this License, 20 | other than an Application or a Combined Work as defined below. 21 | 22 | An "Application" is any work that makes use of an interface provided 23 | by the Library, but which is not otherwise based on the Library. 24 | Defining a subclass of a class defined by the Library is deemed a mode 25 | of using an interface provided by the Library. 26 | 27 | A "Combined Work" is a work produced by combining or linking an 28 | Application with the Library. The particular version of the Library 29 | with which the Combined Work was made is also called the "Linked 30 | Version". 31 | 32 | The "Minimal Corresponding Source" for a Combined Work means the 33 | Corresponding Source for the Combined Work, excluding any source code 34 | for portions of the Combined Work that, considered in isolation, are 35 | based on the Application, and not on the Linked Version. 36 | 37 | The "Corresponding Application Code" for a Combined Work means the 38 | object code and/or source code for the Application, including any data 39 | and utility programs needed for reproducing the Combined Work from the 40 | Application, but excluding the System Libraries of the Combined Work. 41 | 42 | 1. Exception to Section 3 of the GNU GPL. 43 | 44 | You may convey a covered work under sections 3 and 4 of this License 45 | without being bound by section 3 of the GNU GPL. 46 | 47 | 2. Conveying Modified Versions. 48 | 49 | If you modify a copy of the Library, and, in your modifications, a 50 | facility refers to a function or data to be supplied by an Application 51 | that uses the facility (other than as an argument passed when the 52 | facility is invoked), then you may convey a copy of the modified 53 | version: 54 | 55 | a) under this License, provided that you make a good faith effort to 56 | ensure that, in the event an Application does not supply the 57 | function or data, the facility still operates, and performs 58 | whatever part of its purpose remains meaningful, or 59 | 60 | b) under the GNU GPL, with none of the additional permissions of 61 | this License applicable to that copy. 62 | 63 | 3. Object Code Incorporating Material from Library Header Files. 64 | 65 | The object code form of an Application may incorporate material from 66 | a header file that is part of the Library. You may convey such object 67 | code under terms of your choice, provided that, if the incorporated 68 | material is not limited to numerical parameters, data structure 69 | layouts and accessors, or small macros, inline functions and templates 70 | (ten or fewer lines in length), you do both of the following: 71 | 72 | a) Give prominent notice with each copy of the object code that the 73 | Library is used in it and that the Library and its use are 74 | covered by this License. 75 | 76 | b) Accompany the object code with a copy of the GNU GPL and this license 77 | document. 78 | 79 | 4. Combined Works. 80 | 81 | You may convey a Combined Work under terms of your choice that, 82 | taken together, effectively do not restrict modification of the 83 | portions of the Library contained in the Combined Work and reverse 84 | engineering for debugging such modifications, if you also do each of 85 | the following: 86 | 87 | a) Give prominent notice with each copy of the Combined Work that 88 | the Library is used in it and that the Library and its use are 89 | covered by this License. 90 | 91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license 92 | document. 93 | 94 | c) For a Combined Work that displays copyright notices during 95 | execution, include the copyright notice for the Library among 96 | these notices, as well as a reference directing the user to the 97 | copies of the GNU GPL and this license document. 98 | 99 | d) Do one of the following: 100 | 101 | 0) Convey the Minimal Corresponding Source under the terms of this 102 | License, and the Corresponding Application Code in a form 103 | suitable for, and under terms that permit, the user to 104 | recombine or relink the Application with a modified version of 105 | the Linked Version to produce a modified Combined Work, in the 106 | manner specified by section 6 of the GNU GPL for conveying 107 | Corresponding Source. 108 | 109 | 1) Use a suitable shared library mechanism for linking with the 110 | Library. A suitable mechanism is one that (a) uses at run time 111 | a copy of the Library already present on the user's computer 112 | system, and (b) will operate properly with a modified version 113 | of the Library that is interface-compatible with the Linked 114 | Version. 115 | 116 | e) Provide Installation Information, but only if you would otherwise 117 | be required to provide such information under section 6 of the 118 | GNU GPL, and only to the extent that such information is 119 | necessary to install and execute a modified version of the 120 | Combined Work produced by recombining or relinking the 121 | Application with a modified version of the Linked Version. (If 122 | you use option 4d0, the Installation Information must accompany 123 | the Minimal Corresponding Source and Corresponding Application 124 | Code. If you use option 4d1, you must provide the Installation 125 | Information in the manner specified by section 6 of the GNU GPL 126 | for conveying Corresponding Source.) 127 | 128 | 5. Combined Libraries. 129 | 130 | You may place library facilities that are a work based on the 131 | Library side by side in a single library together with other library 132 | facilities that are not Applications and are not covered by this 133 | License, and convey such a combined library under terms of your 134 | choice, if you do both of the following: 135 | 136 | a) Accompany the combined library with a copy of the same work based 137 | on the Library, uncombined with any other library facilities, 138 | conveyed under the terms of this License. 139 | 140 | b) Give prominent notice with the combined library that part of it 141 | is a work based on the Library, and explaining where to find the 142 | accompanying uncombined form of the same work. 143 | 144 | 6. Revised Versions of the GNU Lesser General Public License. 145 | 146 | The Free Software Foundation may publish revised and/or new versions 147 | of the GNU Lesser General Public License from time to time. Such new 148 | versions will be similar in spirit to the present version, but may 149 | differ in detail to address new problems or concerns. 150 | 151 | Each version is given a distinguishing version number. If the 152 | Library as you received it specifies that a certain numbered version 153 | of the GNU Lesser General Public License "or any later version" 154 | applies to it, you have the option of following the terms and 155 | conditions either of that published version or of any later version 156 | published by the Free Software Foundation. If the Library as you 157 | received it does not specify a version number of the GNU Lesser 158 | General Public License, you may choose any version of the GNU Lesser 159 | General Public License ever published by the Free Software Foundation. 160 | 161 | If the Library as you received it specifies that a proxy can decide 162 | whether future versions of the GNU Lesser General Public License shall 163 | apply, that proxy's public statement of acceptance of any version is 164 | permanent authorization for you to choose that version for the 165 | Library. 166 | 167 | -------------------------------------------------------------------------------- /doc/html/PythonConfluenceAPI.cfapi-module.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | PythonConfluenceAPI.cfapi 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | 18 | 20 | 21 | 22 | 24 | 25 | 26 | 28 | 29 | 30 | 32 | 33 | 34 | 39 | 40 | 41 | 42 | 43 | 49 | 60 | 61 |
44 | 45 | Package PythonConfluenceAPI :: 46 | Module cfapi 47 | 48 | 50 | 51 | 52 | 54 | 58 |
[hide private]
[frames] | no frames]
59 |
62 | 63 |

Module cfapi

64 |
65 |

Author: 66 | Robert Cope 67 |

68 |
69 | 70 | 72 | 73 | 84 | 85 | 86 | 91 | 92 |
74 | 75 | 76 | 77 | 81 | 82 |
Classes[hide private]
83 |
87 |   88 | 89 | ConfluenceFuturesAPI 90 |
93 | 94 | 95 | 97 | 98 | 109 | 110 | 111 | 128 | 129 |
99 | 100 | 101 | 102 | 106 | 107 |
Functions[hide private]
108 |
112 |   113 | 114 | 115 | 116 | 120 | 124 | 125 |
request_patch(self, 117 | *args, 118 | **kwargs)
119 | Maintains the existing api for Session.request.
121 | 122 | 123 |
126 | 127 |
130 |

Imports: 131 | HTTPBasicAuth, 132 | ConfluenceAPI, 133 | api_logger, 134 | json, 135 | FuturesSession, 136 | urljoin 137 |


138 | 139 | 140 | 142 | 143 | 154 | 155 |
144 | 145 | 146 | 147 | 151 | 152 |
Function Details[hide private]
153 |
156 | 157 |
158 | 160 |
161 | 162 | 170 |
163 |

request_patch(self, 164 | *args, 165 | **kwargs) 166 |

167 |
  169 |
171 | 172 |

Maintains the existing api for Session.request. Used by all of the 173 | higher level methods, e.g. Session.get. The background_callback param 174 | allows you to do some processing on the response in the background, e.g. 175 | call resp.json() so that json parsing happens in the background 176 | thread.

177 |
178 |
179 |
180 |
181 |
182 | 183 | 185 | 186 | 187 | 189 | 190 | 191 | 193 | 194 | 195 | 197 | 198 | 199 | 201 | 202 | 203 | 208 | 209 | 210 | 211 | 212 | 215 | 219 | 220 |
221 | 222 | 231 | 232 | 233 | -------------------------------------------------------------------------------- /doc/html/PythonConfluenceAPI.api-module.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | PythonConfluenceAPI.api 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | 18 | 20 | 21 | 22 | 24 | 25 | 26 | 28 | 29 | 30 | 32 | 33 | 34 | 39 | 40 | 41 | 42 | 43 | 49 | 60 | 61 |
44 | 45 | Package PythonConfluenceAPI :: 46 | Module api 47 | 48 | 50 | 51 | 52 | 54 | 58 |
[hide private]
[frames] | no frames]
59 |
62 | 63 |

Module api

64 |
65 |

Author: 66 | Robert Cope 67 |

68 |
69 | 70 | 72 | 73 | 84 | 85 | 86 | 91 | 92 |
74 | 75 | 76 | 77 | 81 | 82 |
Classes[hide private]
83 |
87 |   88 | 89 | ConfluenceAPI 90 |
93 | 94 | 95 | 97 | 98 | 109 | 110 | 111 | 129 | 130 |
99 | 100 | 101 | 102 | 106 | 107 |
Functions[hide private]
108 |
112 |   113 | 114 | 115 | 116 | 121 | 125 | 126 |
all_of(api_call, 117 | *args, 118 | **kwargs)
119 | Generator that iterates over all results of an API call that requires 120 | limit/start pagination.
122 | 123 | 124 |
127 | 128 |
131 | 132 | 133 | 135 | 136 | 147 | 148 | 149 | 154 | 155 | 156 | 161 | 162 |
137 | 138 | 139 | 140 | 144 | 145 |
Variables[hide private]
146 |
150 |   151 | 152 | api_logger = logging.getLogger(__name__) 153 |
157 |   158 | 159 | nh = logging.NullHandler() 160 |
163 |

Imports: 164 | sys, 165 | requests, 166 | HTTPBasicAuth, 167 | urljoin, 168 | logging, 169 | json 170 |


171 | 172 | 173 | 175 | 176 | 187 | 188 |
177 | 178 | 179 | 180 | 184 | 185 |
Function Details[hide private]
186 |
189 | 190 |
191 | 193 |
194 | 195 | 203 |
196 |

all_of(api_call, 197 | *args, 198 | **kwargs) 199 |

200 |
  202 |
204 | 205 |

Generator that iterates over all results of an API call that requires 206 | limit/start pagination.

207 |

If the `limit` keyword argument is set, it is used to stop the 208 | generator after the given number of result items.

209 |
210 | >>> for i, v in enumerate(all_of(api.get_content)):
211 | >>>     v = bunchify(v)
212 | >>>     print('     '.join((str(i), v.type, v.id, v.status, v.title)))
213 |

:param api_call: Confluence API call (method). :param args: Positional 214 | arguments of the call. :param kwargs: Keyword arguments of the call.

215 |
216 |
217 |
218 |
219 |
220 | 221 | 223 | 224 | 225 | 227 | 228 | 229 | 231 | 232 | 233 | 235 | 236 | 237 | 239 | 240 | 241 | 246 | 247 | 248 | 249 | 250 | 253 | 257 | 258 |
259 | 260 | 269 | 270 | 271 | -------------------------------------------------------------------------------- /doc/html/epydoc.js: -------------------------------------------------------------------------------- 1 | function toggle_private() { 2 | // Search for any private/public links on this page. Store 3 | // their old text in "cmd," so we will know what action to 4 | // take; and change their text to the opposite action. 5 | var cmd = "?"; 6 | var elts = document.getElementsByTagName("a"); 7 | for(var i=0; i...
"; 127 | elt.innerHTML = s; 128 | } 129 | } 130 | 131 | function toggle(id) { 132 | elt = document.getElementById(id+"-toggle"); 133 | if (elt.innerHTML == "-") 134 | collapse(id); 135 | else 136 | expand(id); 137 | return false; 138 | } 139 | 140 | function highlight(id) { 141 | var elt = document.getElementById(id+"-def"); 142 | if (elt) elt.className = "py-highlight-hdr"; 143 | var elt = document.getElementById(id+"-expanded"); 144 | if (elt) elt.className = "py-highlight"; 145 | var elt = document.getElementById(id+"-collapsed"); 146 | if (elt) elt.className = "py-highlight"; 147 | } 148 | 149 | function num_lines(s) { 150 | var n = 1; 151 | var pos = s.indexOf("\n"); 152 | while ( pos > 0) { 153 | n += 1; 154 | pos = s.indexOf("\n", pos+1); 155 | } 156 | return n; 157 | } 158 | 159 | // Collapse all blocks that mave more than `min_lines` lines. 160 | function collapse_all(min_lines) { 161 | var elts = document.getElementsByTagName("div"); 162 | for (var i=0; i 0) 166 | if (elt.id.substring(split, elt.id.length) == "-expanded") 167 | if (num_lines(elt.innerHTML) > min_lines) 168 | collapse(elt.id.substring(0, split)); 169 | } 170 | } 171 | 172 | function expandto(href) { 173 | var start = href.indexOf("#")+1; 174 | if (start != 0 && start != href.length) { 175 | if (href.substring(start, href.length) != "-") { 176 | collapse_all(4); 177 | pos = href.indexOf(".", start); 178 | while (pos != -1) { 179 | var id = href.substring(start, pos); 180 | expand(id); 181 | pos = href.indexOf(".", pos+1); 182 | } 183 | var id = href.substring(start, href.length); 184 | expand(id); 185 | highlight(id); 186 | } 187 | } 188 | } 189 | 190 | function kill_doclink(id) { 191 | var parent = document.getElementById(id); 192 | parent.removeChild(parent.childNodes.item(0)); 193 | } 194 | function auto_kill_doclink(ev) { 195 | if (!ev) var ev = window.event; 196 | if (!this.contains(ev.toElement)) { 197 | var parent = document.getElementById(this.parentID); 198 | parent.removeChild(parent.childNodes.item(0)); 199 | } 200 | } 201 | 202 | function doclink(id, name, targets_id) { 203 | var elt = document.getElementById(id); 204 | 205 | // If we already opened the box, then destroy it. 206 | // (This case should never occur, but leave it in just in case.) 207 | if (elt.childNodes.length > 1) { 208 | elt.removeChild(elt.childNodes.item(0)); 209 | } 210 | else { 211 | // The outer box: relative + inline positioning. 212 | var box1 = document.createElement("div"); 213 | box1.style.position = "relative"; 214 | box1.style.display = "inline"; 215 | box1.style.top = 0; 216 | box1.style.left = 0; 217 | 218 | // A shadow for fun 219 | var shadow = document.createElement("div"); 220 | shadow.style.position = "absolute"; 221 | shadow.style.left = "-1.3em"; 222 | shadow.style.top = "-1.3em"; 223 | shadow.style.background = "#404040"; 224 | 225 | // The inner box: absolute positioning. 226 | var box2 = document.createElement("div"); 227 | box2.style.position = "relative"; 228 | box2.style.border = "1px solid #a0a0a0"; 229 | box2.style.left = "-.2em"; 230 | box2.style.top = "-.2em"; 231 | box2.style.background = "white"; 232 | box2.style.padding = ".3em .4em .3em .4em"; 233 | box2.style.fontStyle = "normal"; 234 | box2.onmouseout=auto_kill_doclink; 235 | box2.parentID = id; 236 | 237 | // Get the targets 238 | var targets_elt = document.getElementById(targets_id); 239 | var targets = targets_elt.getAttribute("targets"); 240 | var links = ""; 241 | target_list = targets.split(","); 242 | for (var i=0; i" + 246 | target[0] + ""; 247 | } 248 | 249 | // Put it all together. 250 | elt.insertBefore(box1, elt.childNodes.item(0)); 251 | //box1.appendChild(box2); 252 | box1.appendChild(shadow); 253 | shadow.appendChild(box2); 254 | box2.innerHTML = 255 | "Which "+name+" do you want to see documentation for?" + 256 | ""; 261 | } 262 | return false; 263 | } 264 | 265 | function get_anchor() { 266 | var href = location.href; 267 | var start = href.indexOf("#")+1; 268 | if ((start != 0) && (start != href.length)) 269 | return href.substring(start, href.length); 270 | } 271 | function redirect_url(dottedName) { 272 | // Scan through each element of the "pages" list, and check 273 | // if "name" matches with any of them. 274 | for (var i=0; i-m" or "-c"; 277 | // extract the portion & compare it to dottedName. 278 | var pagename = pages[i].substring(0, pages[i].length-2); 279 | if (pagename == dottedName.substring(0,pagename.length)) { 280 | 281 | // We've found a page that matches `dottedName`; 282 | // construct its URL, using leftover `dottedName` 283 | // content to form an anchor. 284 | var pagetype = pages[i].charAt(pages[i].length-1); 285 | var url = pagename + ((pagetype=="m")?"-module.html": 286 | "-class.html"); 287 | if (dottedName.length > pagename.length) 288 | url += "#" + dottedName.substring(pagename.length+1, 289 | dottedName.length); 290 | return url; 291 | } 292 | } 293 | } 294 | -------------------------------------------------------------------------------- /doc/html/help.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Help 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | 18 | 20 | 21 | 22 | 24 | 25 | 26 | 28 | 29 | 30 | 32 | 33 | 34 | 39 | 40 | 41 | 42 | 43 | 44 | 55 | 56 |
  45 | 46 | 47 | 49 | 53 |
[hide private]
[frames] | no frames]
54 |
57 | 58 |

API Documentation

59 | 60 |

This document contains the API (Application Programming Interface) 61 | documentation for PythonConfluenceAPI. Documentation for the Python 62 | objects defined by the project is divided into separate pages for each 63 | package, module, and class. The API documentation also includes two 64 | pages containing information about the project as a whole: a trees 65 | page, and an index page.

66 | 67 |

Object Documentation

68 | 69 |

Each Package Documentation page contains:

70 |
    71 |
  • A description of the package.
  • 72 |
  • A list of the modules and sub-packages contained by the 73 | package.
  • 74 |
  • A summary of the classes defined by the package.
  • 75 |
  • A summary of the functions defined by the package.
  • 76 |
  • A summary of the variables defined by the package.
  • 77 |
  • A detailed description of each function defined by the 78 | package.
  • 79 |
  • A detailed description of each variable defined by the 80 | package.
  • 81 |
82 | 83 |

Each Module Documentation page contains:

84 |
    85 |
  • A description of the module.
  • 86 |
  • A summary of the classes defined by the module.
  • 87 |
  • A summary of the functions defined by the module.
  • 88 |
  • A summary of the variables defined by the module.
  • 89 |
  • A detailed description of each function defined by the 90 | module.
  • 91 |
  • A detailed description of each variable defined by the 92 | module.
  • 93 |
94 | 95 |

Each Class Documentation page contains:

96 |
    97 |
  • A class inheritance diagram.
  • 98 |
  • A list of known subclasses.
  • 99 |
  • A description of the class.
  • 100 |
  • A summary of the methods defined by the class.
  • 101 |
  • A summary of the instance variables defined by the class.
  • 102 |
  • A summary of the class (static) variables defined by the 103 | class.
  • 104 |
  • A detailed description of each method defined by the 105 | class.
  • 106 |
  • A detailed description of each instance variable defined by the 107 | class.
  • 108 |
  • A detailed description of each class (static) variable defined 109 | by the class.
  • 110 |
111 | 112 |

Project Documentation

113 | 114 |

The Trees page contains the module and class hierarchies:

115 |
    116 |
  • The module hierarchy lists every package and module, with 117 | modules grouped into packages. At the top level, and within each 118 | package, modules and sub-packages are listed alphabetically.
  • 119 |
  • The class hierarchy lists every class, grouped by base 120 | class. If a class has more than one base class, then it will be 121 | listed under each base class. At the top level, and under each base 122 | class, classes are listed alphabetically.
  • 123 |
124 | 125 |

The Index page contains indices of terms and 126 | identifiers:

127 |
    128 |
  • The term index lists every term indexed by any object's 129 | documentation. For each term, the index provides links to each 130 | place where the term is indexed.
  • 131 |
  • The identifier index lists the (short) name of every package, 132 | module, class, method, function, variable, and parameter. For each 133 | identifier, the index provides a short description, and a link to 134 | its documentation.
  • 135 |
136 | 137 |

The Table of Contents

138 | 139 |

The table of contents occupies the two frames on the left side of 140 | the window. The upper-left frame displays the project 141 | contents, and the lower-left frame displays the module 142 | contents:

143 | 144 | 145 | 146 | 148 | 151 | 152 | 153 | 156 | 157 |
147 | Project
Contents
...
149 | API
Documentation
Frame


150 |
154 | Module
Contents
 
...
  155 |

158 | 159 |

The project contents frame contains a list of all packages 160 | and modules that are defined by the project. Clicking on an entry 161 | will display its contents in the module contents frame. Clicking on a 162 | special entry, labeled "Everything," will display the contents of 163 | the entire project.

164 | 165 |

The module contents frame contains a list of every 166 | submodule, class, type, exception, function, and variable defined by a 167 | module or package. Clicking on an entry will display its 168 | documentation in the API documentation frame. Clicking on the name of 169 | the module, at the top of the frame, will display the documentation 170 | for the module itself.

171 | 172 |

The "frames" and "no frames" buttons below the top 173 | navigation bar can be used to control whether the table of contents is 174 | displayed or not.

175 | 176 |

The Navigation Bar

177 | 178 |

A navigation bar is located at the top and bottom of every page. 179 | It indicates what type of page you are currently viewing, and allows 180 | you to go to related pages. The following table describes the labels 181 | on the navigation bar. Note that not some labels (such as 182 | [Parent]) are not displayed on all pages.

183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 197 | 198 | 199 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 |
LabelHighlighted when...Links to...
[Parent](never highlighted) the parent of the current package
[Package]viewing a packagethe package containing the current object 196 |
[Module]viewing a modulethe module containing the current object 200 |
[Class]viewing a class the class containing the current object
[Trees]viewing the trees page the trees page
[Index]viewing the index page the index page
[Help]viewing the help page the help page
214 | 215 |

The "show private" and "hide private" buttons below 216 | the top navigation bar can be used to control whether documentation 217 | for private objects is displayed. Private objects are usually defined 218 | as objects whose (short) names begin with a single underscore, but do 219 | not end with an underscore. For example, "_x", 220 | "__pprint", and "epydoc.epytext._tokenize" 221 | are private objects; but "re.sub", 222 | "__init__", and "type_" are not. However, 223 | if a module defines the "__all__" variable, then its 224 | contents are used to decide which objects are private.

225 | 226 |

A timestamp below the bottom navigation bar indicates when each 227 | page was last updated.

228 | 229 | 231 | 232 | 233 | 235 | 236 | 237 | 239 | 240 | 241 | 243 | 244 | 245 | 247 | 248 | 249 | 254 | 255 | 256 | 257 | 258 | 261 | 265 | 266 |
267 | 268 | 277 | 278 | 279 | -------------------------------------------------------------------------------- /ez_setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """ 4 | Setuptools bootstrapping installer. 5 | 6 | Run this script to install or upgrade setuptools. 7 | """ 8 | 9 | import os 10 | import shutil 11 | import sys 12 | import tempfile 13 | import zipfile 14 | import optparse 15 | import subprocess 16 | import platform 17 | import textwrap 18 | import contextlib 19 | import warnings 20 | 21 | from distutils import log 22 | 23 | try: 24 | from urllib.request import urlopen 25 | except ImportError: 26 | from urllib2 import urlopen 27 | 28 | try: 29 | from site import USER_SITE 30 | except ImportError: 31 | USER_SITE = None 32 | 33 | DEFAULT_VERSION = "18.0.1" 34 | DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" 35 | DEFAULT_SAVE_DIR = os.curdir 36 | 37 | 38 | def _python_cmd(*args): 39 | """ 40 | Execute a command. 41 | 42 | Return True if the command succeeded. 43 | """ 44 | args = (sys.executable,) + args 45 | return subprocess.call(args) == 0 46 | 47 | 48 | def _install(archive_filename, install_args=()): 49 | """Install Setuptools.""" 50 | with archive_context(archive_filename): 51 | # installing 52 | log.warn('Installing Setuptools') 53 | if not _python_cmd('setup.py', 'install', *install_args): 54 | log.warn('Something went wrong during the installation.') 55 | log.warn('See the error message above.') 56 | # exitcode will be 2 57 | return 2 58 | 59 | 60 | def _build_egg(egg, archive_filename, to_dir): 61 | """Build Setuptools egg.""" 62 | with archive_context(archive_filename): 63 | # building an egg 64 | log.warn('Building a Setuptools egg in %s', to_dir) 65 | _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir) 66 | # returning the result 67 | log.warn(egg) 68 | if not os.path.exists(egg): 69 | raise IOError('Could not build the egg.') 70 | 71 | 72 | class ContextualZipFile(zipfile.ZipFile): 73 | 74 | """Supplement ZipFile class to support context manager for Python 2.6.""" 75 | 76 | def __enter__(self): 77 | return self 78 | 79 | def __exit__(self, type, value, traceback): 80 | self.close() 81 | 82 | def __new__(cls, *args, **kwargs): 83 | """Construct a ZipFile or ContextualZipFile as appropriate.""" 84 | if hasattr(zipfile.ZipFile, '__exit__'): 85 | return zipfile.ZipFile(*args, **kwargs) 86 | return super(ContextualZipFile, cls).__new__(cls) 87 | 88 | 89 | @contextlib.contextmanager 90 | def archive_context(filename): 91 | """ 92 | Unzip filename to a temporary directory, set to the cwd. 93 | 94 | The unzipped target is cleaned up after. 95 | """ 96 | tmpdir = tempfile.mkdtemp() 97 | log.warn('Extracting in %s', tmpdir) 98 | old_wd = os.getcwd() 99 | try: 100 | os.chdir(tmpdir) 101 | with ContextualZipFile(filename) as archive: 102 | archive.extractall() 103 | 104 | # going in the directory 105 | subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0]) 106 | os.chdir(subdir) 107 | log.warn('Now working in %s', subdir) 108 | yield 109 | 110 | finally: 111 | os.chdir(old_wd) 112 | shutil.rmtree(tmpdir) 113 | 114 | 115 | def _do_download(version, download_base, to_dir, download_delay): 116 | """Download Setuptools.""" 117 | egg = os.path.join(to_dir, 'setuptools-%s-py%d.%d.egg' 118 | % (version, sys.version_info[0], sys.version_info[1])) 119 | if not os.path.exists(egg): 120 | archive = download_setuptools(version, download_base, 121 | to_dir, download_delay) 122 | _build_egg(egg, archive, to_dir) 123 | sys.path.insert(0, egg) 124 | 125 | # Remove previously-imported pkg_resources if present (see 126 | # https://bitbucket.org/pypa/setuptools/pull-request/7/ for details). 127 | if 'pkg_resources' in sys.modules: 128 | del sys.modules['pkg_resources'] 129 | 130 | import setuptools 131 | setuptools.bootstrap_install_from = egg 132 | 133 | 134 | def use_setuptools( 135 | version=DEFAULT_VERSION, download_base=DEFAULT_URL, 136 | to_dir=DEFAULT_SAVE_DIR, download_delay=15): 137 | """ 138 | Ensure that a setuptools version is installed. 139 | 140 | Return None. Raise SystemExit if the requested version 141 | or later cannot be installed. 142 | """ 143 | to_dir = os.path.abspath(to_dir) 144 | 145 | # prior to importing, capture the module state for 146 | # representative modules. 147 | rep_modules = 'pkg_resources', 'setuptools' 148 | imported = set(sys.modules).intersection(rep_modules) 149 | 150 | try: 151 | import pkg_resources 152 | pkg_resources.require("setuptools>=" + version) 153 | # a suitable version is already installed 154 | return 155 | except ImportError: 156 | # pkg_resources not available; setuptools is not installed; download 157 | pass 158 | except pkg_resources.DistributionNotFound: 159 | # no version of setuptools was found; allow download 160 | pass 161 | except pkg_resources.VersionConflict as VC_err: 162 | if imported: 163 | _conflict_bail(VC_err, version) 164 | 165 | # otherwise, unload pkg_resources to allow the downloaded version to 166 | # take precedence. 167 | del pkg_resources 168 | _unload_pkg_resources() 169 | 170 | return _do_download(version, download_base, to_dir, download_delay) 171 | 172 | 173 | def _conflict_bail(VC_err, version): 174 | """ 175 | Setuptools was imported prior to invocation, so it is 176 | unsafe to unload it. Bail out. 177 | """ 178 | conflict_tmpl = textwrap.dedent(""" 179 | The required version of setuptools (>={version}) is not available, 180 | and can't be installed while this script is running. Please 181 | install a more recent version first, using 182 | 'easy_install -U setuptools'. 183 | 184 | (Currently using {VC_err.args[0]!r}) 185 | """) 186 | msg = conflict_tmpl.format(**locals()) 187 | sys.stderr.write(msg) 188 | sys.exit(2) 189 | 190 | 191 | def _unload_pkg_resources(): 192 | del_modules = [ 193 | name for name in sys.modules 194 | if name.startswith('pkg_resources') 195 | ] 196 | for mod_name in del_modules: 197 | del sys.modules[mod_name] 198 | 199 | 200 | def _clean_check(cmd, target): 201 | """ 202 | Run the command to download target. 203 | 204 | If the command fails, clean up before re-raising the error. 205 | """ 206 | try: 207 | subprocess.check_call(cmd) 208 | except subprocess.CalledProcessError: 209 | if os.access(target, os.F_OK): 210 | os.unlink(target) 211 | raise 212 | 213 | 214 | def download_file_powershell(url, target): 215 | """ 216 | Download the file at url to target using Powershell. 217 | 218 | Powershell will validate trust. 219 | Raise an exception if the command cannot complete. 220 | """ 221 | target = os.path.abspath(target) 222 | ps_cmd = ( 223 | "[System.Net.WebRequest]::DefaultWebProxy.Credentials = " 224 | "[System.Net.CredentialCache]::DefaultCredentials; " 225 | "(new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)" 226 | % vars() 227 | ) 228 | cmd = [ 229 | 'powershell', 230 | '-Command', 231 | ps_cmd, 232 | ] 233 | _clean_check(cmd, target) 234 | 235 | 236 | def has_powershell(): 237 | """Determine if Powershell is available.""" 238 | if platform.system() != 'Windows': 239 | return False 240 | cmd = ['powershell', '-Command', 'echo test'] 241 | with open(os.path.devnull, 'wb') as devnull: 242 | try: 243 | subprocess.check_call(cmd, stdout=devnull, stderr=devnull) 244 | except Exception: 245 | return False 246 | return True 247 | download_file_powershell.viable = has_powershell 248 | 249 | 250 | def download_file_curl(url, target): 251 | cmd = ['curl', url, '--silent', '--output', target] 252 | _clean_check(cmd, target) 253 | 254 | 255 | def has_curl(): 256 | cmd = ['curl', '--version'] 257 | with open(os.path.devnull, 'wb') as devnull: 258 | try: 259 | subprocess.check_call(cmd, stdout=devnull, stderr=devnull) 260 | except Exception: 261 | return False 262 | return True 263 | download_file_curl.viable = has_curl 264 | 265 | 266 | def download_file_wget(url, target): 267 | cmd = ['wget', url, '--quiet', '--output-document', target] 268 | _clean_check(cmd, target) 269 | 270 | 271 | def has_wget(): 272 | cmd = ['wget', '--version'] 273 | with open(os.path.devnull, 'wb') as devnull: 274 | try: 275 | subprocess.check_call(cmd, stdout=devnull, stderr=devnull) 276 | except Exception: 277 | return False 278 | return True 279 | download_file_wget.viable = has_wget 280 | 281 | 282 | def download_file_insecure(url, target): 283 | """Use Python to download the file, without connection authentication.""" 284 | src = urlopen(url) 285 | try: 286 | # Read all the data in one block. 287 | data = src.read() 288 | finally: 289 | src.close() 290 | 291 | # Write all the data in one block to avoid creating a partial file. 292 | with open(target, "wb") as dst: 293 | dst.write(data) 294 | download_file_insecure.viable = lambda: True 295 | 296 | 297 | def get_best_downloader(): 298 | downloaders = ( 299 | download_file_powershell, 300 | download_file_curl, 301 | download_file_wget, 302 | download_file_insecure, 303 | ) 304 | viable_downloaders = (dl for dl in downloaders if dl.viable()) 305 | return next(viable_downloaders, None) 306 | 307 | 308 | def download_setuptools( 309 | version=DEFAULT_VERSION, download_base=DEFAULT_URL, 310 | to_dir=DEFAULT_SAVE_DIR, delay=15, 311 | downloader_factory=get_best_downloader): 312 | """ 313 | Download setuptools from a specified location and return its filename. 314 | 315 | `version` should be a valid setuptools version number that is available 316 | as an sdist for download under the `download_base` URL (which should end 317 | with a '/'). `to_dir` is the directory where the egg will be downloaded. 318 | `delay` is the number of seconds to pause before an actual download 319 | attempt. 320 | 321 | ``downloader_factory`` should be a function taking no arguments and 322 | returning a function for downloading a URL to a target. 323 | """ 324 | # making sure we use the absolute path 325 | to_dir = os.path.abspath(to_dir) 326 | zip_name = "setuptools-%s.zip" % version 327 | url = download_base + zip_name 328 | saveto = os.path.join(to_dir, zip_name) 329 | if not os.path.exists(saveto): # Avoid repeated downloads 330 | log.warn("Downloading %s", url) 331 | downloader = downloader_factory() 332 | downloader(url, saveto) 333 | return os.path.realpath(saveto) 334 | 335 | 336 | def _build_install_args(options): 337 | """ 338 | Build the arguments to 'python setup.py install' on the setuptools package. 339 | 340 | Returns list of command line arguments. 341 | """ 342 | return ['--user'] if options.user_install else [] 343 | 344 | 345 | def _parse_args(): 346 | """Parse the command line for options.""" 347 | parser = optparse.OptionParser() 348 | parser.add_option( 349 | '--user', dest='user_install', action='store_true', default=False, 350 | help='install in user site package (requires Python 2.6 or later)') 351 | parser.add_option( 352 | '--download-base', dest='download_base', metavar="URL", 353 | default=DEFAULT_URL, 354 | help='alternative URL from where to download the setuptools package') 355 | parser.add_option( 356 | '--insecure', dest='downloader_factory', action='store_const', 357 | const=lambda: download_file_insecure, default=get_best_downloader, 358 | help='Use internal, non-validating downloader' 359 | ) 360 | parser.add_option( 361 | '--version', help="Specify which version to download", 362 | default=DEFAULT_VERSION, 363 | ) 364 | parser.add_option( 365 | '--to-dir', 366 | help="Directory to save (and re-use) package", 367 | default=DEFAULT_SAVE_DIR, 368 | ) 369 | options, args = parser.parse_args() 370 | # positional arguments are ignored 371 | return options 372 | 373 | 374 | def _download_args(options): 375 | """Return args for download_setuptools function from cmdline args.""" 376 | return dict( 377 | version=options.version, 378 | download_base=options.download_base, 379 | downloader_factory=options.downloader_factory, 380 | to_dir=options.to_dir, 381 | ) 382 | 383 | 384 | def main(): 385 | """Install or upgrade setuptools and EasyInstall.""" 386 | options = _parse_args() 387 | archive = download_setuptools(**_download_args(options)) 388 | return _install(archive, _build_install_args(options)) 389 | 390 | if __name__ == '__main__': 391 | sys.exit(main()) 392 | -------------------------------------------------------------------------------- /doc/html/epydoc.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* Epydoc CSS Stylesheet 4 | * 5 | * This stylesheet can be used to customize the appearance of epydoc's 6 | * HTML output. 7 | * 8 | */ 9 | 10 | /* Default Colors & Styles 11 | * - Set the default foreground & background color with 'body'; and 12 | * link colors with 'a:link' and 'a:visited'. 13 | * - Use bold for decision list terms. 14 | * - The heading styles defined here are used for headings *within* 15 | * docstring descriptions. All headings used by epydoc itself use 16 | * either class='epydoc' or class='toc' (CSS styles for both 17 | * defined below). 18 | */ 19 | body { background: #ffffff; color: #000000; } 20 | p { margin-top: 0.5em; margin-bottom: 0.5em; } 21 | a:link { color: #0000ff; } 22 | a:visited { color: #204080; } 23 | dt { font-weight: bold; } 24 | h1 { font-size: +140%; font-style: italic; 25 | font-weight: bold; } 26 | h2 { font-size: +125%; font-style: italic; 27 | font-weight: bold; } 28 | h3 { font-size: +110%; font-style: italic; 29 | font-weight: normal; } 30 | code { font-size: 100%; } 31 | /* N.B.: class, not pseudoclass */ 32 | a.link { font-family: monospace; } 33 | 34 | /* Page Header & Footer 35 | * - The standard page header consists of a navigation bar (with 36 | * pointers to standard pages such as 'home' and 'trees'); a 37 | * breadcrumbs list, which can be used to navigate to containing 38 | * classes or modules; options links, to show/hide private 39 | * variables and to show/hide frames; and a page title (using 40 | *

). The page title may be followed by a link to the 41 | * corresponding source code (using 'span.codelink'). 42 | * - The footer consists of a navigation bar, a timestamp, and a 43 | * pointer to epydoc's homepage. 44 | */ 45 | h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; } 46 | h2.epydoc { font-size: +130%; font-weight: bold; } 47 | h3.epydoc { font-size: +115%; font-weight: bold; 48 | margin-top: 0.2em; } 49 | td h3.epydoc { font-size: +115%; font-weight: bold; 50 | margin-bottom: 0; } 51 | table.navbar { background: #a0c0ff; color: #000000; 52 | border: 2px groove #c0d0d0; } 53 | table.navbar table { color: #000000; } 54 | th.navbar-select { background: #70b0ff; 55 | color: #000000; } 56 | table.navbar a { text-decoration: none; } 57 | table.navbar a:link { color: #0000ff; } 58 | table.navbar a:visited { color: #204080; } 59 | span.breadcrumbs { font-size: 85%; font-weight: bold; } 60 | span.options { font-size: 70%; } 61 | span.codelink { font-size: 85%; } 62 | td.footer { font-size: 85%; } 63 | 64 | /* Table Headers 65 | * - Each summary table and details section begins with a 'header' 66 | * row. This row contains a section title (marked by 67 | * 'span.table-header') as well as a show/hide private link 68 | * (marked by 'span.options', defined above). 69 | * - Summary tables that contain user-defined groups mark those 70 | * groups using 'group header' rows. 71 | */ 72 | td.table-header { background: #70b0ff; color: #000000; 73 | border: 1px solid #608090; } 74 | td.table-header table { color: #000000; } 75 | td.table-header table a:link { color: #0000ff; } 76 | td.table-header table a:visited { color: #204080; } 77 | span.table-header { font-size: 120%; font-weight: bold; } 78 | th.group-header { background: #c0e0f8; color: #000000; 79 | text-align: left; font-style: italic; 80 | font-size: 115%; 81 | border: 1px solid #608090; } 82 | 83 | /* Summary Tables (functions, variables, etc) 84 | * - Each object is described by a single row of the table with 85 | * two cells. The left cell gives the object's type, and is 86 | * marked with 'code.summary-type'. The right cell gives the 87 | * object's name and a summary description. 88 | * - CSS styles for the table's header and group headers are 89 | * defined above, under 'Table Headers' 90 | */ 91 | table.summary { border-collapse: collapse; 92 | background: #e8f0f8; color: #000000; 93 | border: 1px solid #608090; 94 | margin-bottom: 0.5em; } 95 | td.summary { border: 1px solid #608090; } 96 | code.summary-type { font-size: 85%; } 97 | table.summary a:link { color: #0000ff; } 98 | table.summary a:visited { color: #204080; } 99 | 100 | 101 | /* Details Tables (functions, variables, etc) 102 | * - Each object is described in its own div. 103 | * - A single-row summary table w/ table-header is used as 104 | * a header for each details section (CSS style for table-header 105 | * is defined above, under 'Table Headers'). 106 | */ 107 | table.details { border-collapse: collapse; 108 | background: #e8f0f8; color: #000000; 109 | border: 1px solid #608090; 110 | margin: .2em 0 0 0; } 111 | table.details table { color: #000000; } 112 | table.details a:link { color: #0000ff; } 113 | table.details a:visited { color: #204080; } 114 | 115 | /* Fields */ 116 | dl.fields { margin-left: 2em; margin-top: 1em; 117 | margin-bottom: 1em; } 118 | dl.fields dd ul { margin-left: 0em; padding-left: 0em; } 119 | dl.fields dd ul li ul { margin-left: 2em; padding-left: 0em; } 120 | div.fields { margin-left: 2em; } 121 | div.fields p { margin-bottom: 0.5em; } 122 | 123 | /* Index tables (identifier index, term index, etc) 124 | * - link-index is used for indices containing lists of links 125 | * (namely, the identifier index & term index). 126 | * - index-where is used in link indices for the text indicating 127 | * the container/source for each link. 128 | * - metadata-index is used for indices containing metadata 129 | * extracted from fields (namely, the bug index & todo index). 130 | */ 131 | table.link-index { border-collapse: collapse; 132 | background: #e8f0f8; color: #000000; 133 | border: 1px solid #608090; } 134 | td.link-index { border-width: 0px; } 135 | table.link-index a:link { color: #0000ff; } 136 | table.link-index a:visited { color: #204080; } 137 | span.index-where { font-size: 70%; } 138 | table.metadata-index { border-collapse: collapse; 139 | background: #e8f0f8; color: #000000; 140 | border: 1px solid #608090; 141 | margin: .2em 0 0 0; } 142 | td.metadata-index { border-width: 1px; border-style: solid; } 143 | table.metadata-index a:link { color: #0000ff; } 144 | table.metadata-index a:visited { color: #204080; } 145 | 146 | /* Function signatures 147 | * - sig* is used for the signature in the details section. 148 | * - .summary-sig* is used for the signature in the summary 149 | * table, and when listing property accessor functions. 150 | * */ 151 | .sig-name { color: #006080; } 152 | .sig-arg { color: #008060; } 153 | .sig-default { color: #602000; } 154 | .summary-sig { font-family: monospace; } 155 | .summary-sig-name { color: #006080; font-weight: bold; } 156 | table.summary a.summary-sig-name:link 157 | { color: #006080; font-weight: bold; } 158 | table.summary a.summary-sig-name:visited 159 | { color: #006080; font-weight: bold; } 160 | .summary-sig-arg { color: #006040; } 161 | .summary-sig-default { color: #501800; } 162 | 163 | /* Subclass list 164 | */ 165 | ul.subclass-list { display: inline; } 166 | ul.subclass-list li { display: inline; } 167 | 168 | /* To render variables, classes etc. like functions */ 169 | table.summary .summary-name { color: #006080; font-weight: bold; 170 | font-family: monospace; } 171 | table.summary 172 | a.summary-name:link { color: #006080; font-weight: bold; 173 | font-family: monospace; } 174 | table.summary 175 | a.summary-name:visited { color: #006080; font-weight: bold; 176 | font-family: monospace; } 177 | 178 | /* Variable values 179 | * - In the 'variable details' sections, each varaible's value is 180 | * listed in a 'pre.variable' box. The width of this box is 181 | * restricted to 80 chars; if the value's repr is longer than 182 | * this it will be wrapped, using a backslash marked with 183 | * class 'variable-linewrap'. If the value's repr is longer 184 | * than 3 lines, the rest will be ellided; and an ellipsis 185 | * marker ('...' marked with 'variable-ellipsis') will be used. 186 | * - If the value is a string, its quote marks will be marked 187 | * with 'variable-quote'. 188 | * - If the variable is a regexp, it is syntax-highlighted using 189 | * the re* CSS classes. 190 | */ 191 | pre.variable { padding: .5em; margin: 0; 192 | background: #dce4ec; color: #000000; 193 | border: 1px solid #708890; } 194 | .variable-linewrap { color: #604000; font-weight: bold; } 195 | .variable-ellipsis { color: #604000; font-weight: bold; } 196 | .variable-quote { color: #604000; font-weight: bold; } 197 | .variable-group { color: #008000; font-weight: bold; } 198 | .variable-op { color: #604000; font-weight: bold; } 199 | .variable-string { color: #006030; } 200 | .variable-unknown { color: #a00000; font-weight: bold; } 201 | .re { color: #000000; } 202 | .re-char { color: #006030; } 203 | .re-op { color: #600000; } 204 | .re-group { color: #003060; } 205 | .re-ref { color: #404040; } 206 | 207 | /* Base tree 208 | * - Used by class pages to display the base class hierarchy. 209 | */ 210 | pre.base-tree { font-size: 80%; margin: 0; } 211 | 212 | /* Frames-based table of contents headers 213 | * - Consists of two frames: one for selecting modules; and 214 | * the other listing the contents of the selected module. 215 | * - h1.toc is used for each frame's heading 216 | * - h2.toc is used for subheadings within each frame. 217 | */ 218 | h1.toc { text-align: center; font-size: 105%; 219 | margin: 0; font-weight: bold; 220 | padding: 0; } 221 | h2.toc { font-size: 100%; font-weight: bold; 222 | margin: 0.5em 0 0 -0.3em; } 223 | 224 | /* Syntax Highlighting for Source Code 225 | * - doctest examples are displayed in a 'pre.py-doctest' block. 226 | * If the example is in a details table entry, then it will use 227 | * the colors specified by the 'table pre.py-doctest' line. 228 | * - Source code listings are displayed in a 'pre.py-src' block. 229 | * Each line is marked with 'span.py-line' (used to draw a line 230 | * down the left margin, separating the code from the line 231 | * numbers). Line numbers are displayed with 'span.py-lineno'. 232 | * The expand/collapse block toggle button is displayed with 233 | * 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not 234 | * modify the font size of the text.) 235 | * - If a source code page is opened with an anchor, then the 236 | * corresponding code block will be highlighted. The code 237 | * block's header is highlighted with 'py-highlight-hdr'; and 238 | * the code block's body is highlighted with 'py-highlight'. 239 | * - The remaining py-* classes are used to perform syntax 240 | * highlighting (py-string for string literals, py-name for names, 241 | * etc.) 242 | */ 243 | pre.py-doctest { padding: .5em; margin: 1em; 244 | background: #e8f0f8; color: #000000; 245 | border: 1px solid #708890; } 246 | table pre.py-doctest { background: #dce4ec; 247 | color: #000000; } 248 | pre.py-src { border: 2px solid #000000; 249 | background: #f0f0f0; color: #000000; } 250 | .py-line { border-left: 2px solid #000000; 251 | margin-left: .2em; padding-left: .4em; } 252 | .py-lineno { font-style: italic; font-size: 90%; 253 | padding-left: .5em; } 254 | a.py-toggle { text-decoration: none; } 255 | div.py-highlight-hdr { border-top: 2px solid #000000; 256 | border-bottom: 2px solid #000000; 257 | background: #d8e8e8; } 258 | div.py-highlight { border-bottom: 2px solid #000000; 259 | background: #d0e0e0; } 260 | .py-prompt { color: #005050; font-weight: bold;} 261 | .py-more { color: #005050; font-weight: bold;} 262 | .py-string { color: #006030; } 263 | .py-comment { color: #003060; } 264 | .py-keyword { color: #600000; } 265 | .py-output { color: #404040; } 266 | .py-name { color: #000050; } 267 | .py-name:link { color: #000050 !important; } 268 | .py-name:visited { color: #000050 !important; } 269 | .py-number { color: #005000; } 270 | .py-defname { color: #000060; font-weight: bold; } 271 | .py-def-name { color: #000060; font-weight: bold; } 272 | .py-base-class { color: #000060; } 273 | .py-param { color: #000060; } 274 | .py-docstring { color: #006030; } 275 | .py-decorator { color: #804020; } 276 | /* Use this if you don't want links to names underlined: */ 277 | /*a.py-name { text-decoration: none; }*/ 278 | 279 | /* Graphs & Diagrams 280 | * - These CSS styles are used for graphs & diagrams generated using 281 | * Graphviz dot. 'img.graph-without-title' is used for bare 282 | * diagrams (to remove the border created by making the image 283 | * clickable). 284 | */ 285 | img.graph-without-title { border: none; } 286 | img.graph-with-title { border: 1px solid #000000; } 287 | span.graph-title { font-weight: bold; } 288 | span.graph-caption { } 289 | 290 | /* General-purpose classes 291 | * - 'p.indent-wrapped-lines' defines a paragraph whose first line 292 | * is not indented, but whose subsequent lines are. 293 | * - The 'nomargin-top' class is used to remove the top margin (e.g. 294 | * from lists). The 'nomargin' class is used to remove both the 295 | * top and bottom margin (but not the left or right margin -- 296 | * for lists, that would cause the bullets to disappear.) 297 | */ 298 | p.indent-wrapped-lines { padding: 0 0 0 7em; text-indent: -7em; 299 | margin: 0; } 300 | .nomargin-top { margin-top: 0; } 301 | .nomargin { margin-top: 0; margin-bottom: 0; } 302 | 303 | /* HTML Log */ 304 | div.log-block { padding: 0; margin: .5em 0 .5em 0; 305 | background: #e8f0f8; color: #000000; 306 | border: 1px solid #000000; } 307 | div.log-error { padding: .1em .3em .1em .3em; margin: 4px; 308 | background: #ffb0b0; color: #000000; 309 | border: 1px solid #000000; } 310 | div.log-warning { padding: .1em .3em .1em .3em; margin: 4px; 311 | background: #ffffb0; color: #000000; 312 | border: 1px solid #000000; } 313 | div.log-info { padding: .1em .3em .1em .3em; margin: 4px; 314 | background: #b0ffb0; color: #000000; 315 | border: 1px solid #000000; } 316 | h2.log-hdr { background: #70b0ff; color: #000000; 317 | margin: 0; padding: 0em 0.5em 0em 0.5em; 318 | border-bottom: 1px solid #000000; font-size: 110%; } 319 | p.log { font-weight: bold; margin: .5em 0 .5em 0; } 320 | tr.opt-changed { color: #000000; font-weight: bold; } 321 | tr.opt-default { color: #606060; } 322 | pre.log { margin: 0; padding: 0; padding-left: 1em; } 323 | -------------------------------------------------------------------------------- /doc/html/PythonConfluenceAPI.cfapi.ConfluenceFuturesAPI-class.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | PythonConfluenceAPI.cfapi.ConfluenceFuturesAPI 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | 18 | 20 | 21 | 22 | 24 | 25 | 26 | 28 | 29 | 30 | 32 | 33 | 34 | 39 | 40 | 41 | 42 | 43 | 50 | 61 | 62 |
44 | 45 | Package PythonConfluenceAPI :: 46 | Module cfapi :: 47 | Class ConfluenceFuturesAPI 48 | 49 | 51 | 52 | 53 | 55 | 59 |
[hide private]
[frames] | no frames]
60 |
63 | 64 |

Class ConfluenceFuturesAPI

65 |
 66 |        object --+    
 67 |                 |    
 68 | api.ConfluenceAPI --+
 69 |                     |
 70 |                    ConfluenceFuturesAPI
 71 | 
72 | 73 |
74 | 75 | 76 | 78 | 79 | 90 | 91 | 92 | 113 | 114 | 115 | 130 | 131 | 132 | 154 | 155 | 156 | 220 | 221 |
80 | 81 | 82 | 83 | 87 | 88 |
Instance Methods[hide private]
89 |
93 |   94 | 95 | 96 | 97 | 105 | 109 | 110 |
__init__(self, 98 | username, 99 | password, 100 | uri_base, 101 | user_agent=ConfluenceAPI.DEFAULT_USER_AGENT, 102 | executor=None, 103 | max_workers=10)
104 | Initialize the async concurrent.futures API object.
106 | 107 | 108 |
111 | 112 |
116 |   117 | 118 | 119 | 120 | 122 | 126 | 127 |
_start_http_session(self)
121 | Start a new requests HTTP session, clearing cookies and session data.
123 | 124 | 125 |
128 | 129 |
133 |   134 | 135 | 136 | 137 | 146 | 150 | 151 |
_service_request(self, 138 | request_type, 139 | sub_uri, 140 | params=None, 141 | callback=None, 142 | raise_for_status=True, 143 | raw=False, 144 | **kwargs)
145 | Base method for handling HTTP requests via the current requests session.
147 | 148 | 149 |
152 | 153 |
157 |

Inherited from api.ConfluenceAPI: 158 | convert_contentbody_to_new_type, 159 | create_new_attachment_by_content_id, 160 | create_new_content, 161 | create_new_content_property, 162 | create_new_label_by_content_id, 163 | create_new_private_space, 164 | create_new_property, 165 | create_new_space, 166 | delete_content_by_id, 167 | delete_label_by_id, 168 | delete_property, 169 | delete_space, 170 | get_content, 171 | get_content_attachments, 172 | get_content_by_id, 173 | get_content_children, 174 | get_content_children_by_type, 175 | get_content_comments, 176 | get_content_descendants, 177 | get_content_descendants_by_type, 178 | get_content_history_by_id, 179 | get_content_labels, 180 | get_content_macro_by_hash, 181 | get_content_macro_by_macro_id, 182 | get_content_properties, 183 | get_content_property_by_key, 184 | get_long_task_info, 185 | get_long_tasks, 186 | get_op_restrictions_by_content_operation, 187 | get_op_restrictions_for_content_id, 188 | get_space_content, 189 | get_space_content_by_type, 190 | get_space_information, 191 | get_spaces, 192 | search_content, 193 | update_attachment, 194 | update_attachment_metadata, 195 | update_content_by_id, 196 | update_property, 197 | update_space 198 |

199 |

Inherited from api.ConfluenceAPI (private): 200 | _service_delete_request, 201 | _service_get_request, 202 | _service_post_request, 203 | _service_put_request 204 |

205 |

Inherited from object: 206 | __delattr__, 207 | __format__, 208 | __getattribute__, 209 | __hash__, 210 | __new__, 211 | __reduce__, 212 | __reduce_ex__, 213 | __repr__, 214 | __setattr__, 215 | __sizeof__, 216 | __str__, 217 | __subclasshook__ 218 |

219 |
222 | 223 | 224 | 226 | 227 | 238 | 239 | 240 | 248 | 249 |
228 | 229 | 230 | 231 | 235 | 236 |
Class Variables[hide private]
237 |
241 |

Inherited from api.ConfluenceAPI: 242 | ATTACHMENT_METADATA_KEYS, 243 | DEFAULT_USER_AGENT, 244 | NEW_CONTENT_REQUIRED_KEYS, 245 | UPDATE_CONTENT_REQUIRED_KEYS 246 |

247 |
250 | 251 | 252 | 254 | 255 | 266 | 267 | 268 | 273 | 274 |
256 | 257 | 258 | 259 | 263 | 264 |
Properties[hide private]
265 |
269 |

Inherited from object: 270 | __class__ 271 |

272 |
275 | 276 | 277 | 279 | 280 | 291 | 292 |
281 | 282 | 283 | 284 | 288 | 289 |
Method Details[hide private]
290 |
293 | 294 |
295 | 297 |
298 | 299 | 312 |
300 |

__init__(self, 301 | username, 302 | password, 303 | uri_base, 304 | user_agent=ConfluenceAPI.DEFAULT_USER_AGENT, 305 | executor=None, 306 | max_workers=10) 307 |
(Constructor) 308 |

309 |
  311 |
313 | 314 |
315 | 
316 | Initialize the async concurrent.futures API object.
317 | :param username: Your Confluence username.
318 | :param password: Your Confluence password.
319 | :param uri_base: The base url for your Confluence wiki (e.g. myorg.atlassian.com/wiki)
320 | :param user_agent: (Optional): The user-agent you wish to send on requests to the API.
321 |                    DEFAULT: PythonConfluenceAPI.
322 | :param executor: (Optional): The concurrent.futures executor to power the API calls. Default: None, create a
323 |                  new ThreadPoolExecutor.
324 | :param max_workers: (Optional): If the executor is not specified and the default ThreadPoolExecutor is spawned,
325 |                     this specifies the number of worker threads to create.
326 | 
327 | 
328 |
329 |
Overrides: 330 | object.__init__ 331 |
332 |
333 |
334 |
335 | 336 |
337 | 339 |
340 | 341 | 347 |
342 |

_start_http_session(self) 343 |

344 |
  346 |
348 | 349 |

Start a new requests HTTP session, clearing cookies and session data. 350 | :return: None

351 |
352 |
Overrides: 353 | api.ConfluenceAPI._start_http_session 354 |
355 |
356 |
357 |
358 | 359 |
360 | 362 |
363 | 364 | 377 |
365 |

_service_request(self, 366 | request_type, 367 | sub_uri, 368 | params=None, 369 | callback=None, 370 | raise_for_status=True, 371 | raw=False, 372 | **kwargs) 373 |

374 |
  376 |
378 | 379 |
380 | 
381 | Base method for handling HTTP requests via the current requests session.
382 | :param request_type: The request type as a string (e.g. "POST", "GET", "PUT", etc.)
383 | :param sub_uri: The REST end point (sub-uri) to communicate with.
384 | :param params: (Optional) HTTP Request parameters. Default: none
385 | :param callback: (Optional) A callback function to be excuted on the resulting requests response.
386 |                  This synchronous implementation will return the results of the callback.
387 |                  Default: None. This method returns either the decoded JSON or the raw request content.
388 | :param raise_for_status: (Optional) When set True, we raise requests.HTTPError on 4xx or 5xx status. When
389 |                          set False, non-2xx/3xx status code is ignored. Default: True
390 | :param raw: (Optional) If no callback is set, return the raw content from the request if this is set True.
391 |             If False, the method attempts to parse the request as JSON data and return the resutls.
392 |             Default: False
393 | :param kwargs: Additional parameters to pass to the session request call.
394 | :return: The concurrent.futures object that holds the future for the API method call.
395 | 
396 | 
397 |
398 |
Overrides: 399 | api.ConfluenceAPI._service_request 400 |
401 |
402 |
403 |
404 |
405 | 406 | 408 | 409 | 410 | 412 | 413 | 414 | 416 | 417 | 418 | 420 | 421 | 422 | 424 | 425 | 426 | 431 | 432 | 433 | 434 | 435 | 438 | 442 | 443 |
444 | 445 | 454 | 455 | 456 | -------------------------------------------------------------------------------- /doc/html/identifier-index.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Identifier Index 7 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | 18 | 20 | 21 | 22 | 24 | 25 | 26 | 28 | 29 | 30 | 32 | 33 | 34 | 39 | 40 | 41 | 42 | 43 | 44 | 55 | 56 |
  45 | 46 | 47 | 49 | 53 |
[hide private]
[frames] | no frames]
54 |
57 | 58 |
59 |

Identifier Index

60 |
61 | [ 62 | A 63 | B 64 | C 65 | D 66 | E 67 | F 68 | G 69 | H 70 | I 71 | J 72 | K 73 | L 74 | M 75 | N 76 | O 77 | P 78 | Q 79 | R 80 | S 81 | T 82 | U 83 | V 84 | W 85 | X 86 | Y 87 | Z 88 | _ 89 | ] 90 |
91 | 92 | 93 | 111 | 112 | 170 | 171 | 199 | 200 | 323 | 324 | 336 | 337 | 347 | 348 | 359 | 360 | 372 | 373 | 408 | 409 | 452 |

A

94 | 95 | 96 | 98 | 100 | 101 | 102 | 103 | 105 | 107 | 108 | 109 | 110 |

C

113 | 114 | 115 | 117 | 119 | 121 | 122 | 123 | 125 | 127 | 129 | 130 | 131 | 133 | 135 | 137 | 138 | 139 | 141 | 143 | 145 | 146 | 147 | 149 | 151 | 153 | 154 | 155 | 157 | 159 | 160 | 161 | 162 | 164 | 166 | 167 | 168 | 169 |

D

172 | 173 | 174 | 176 | 178 | 180 | 181 | 182 | 184 | 186 | 188 | 189 | 190 | 192 | 194 | 196 | 197 | 198 |

G

201 | 202 | 203 | 205 | 207 | 209 | 210 | 211 | 213 | 215 | 217 | 218 | 219 | 221 | 223 | 225 | 226 | 227 | 229 | 231 | 233 | 234 | 235 | 237 | 239 | 241 | 242 | 243 | 245 | 247 | 249 | 250 | 251 | 253 | 255 | 257 | 258 | 259 | 261 | 263 | 265 | 266 | 267 | 269 | 271 | 273 | 274 | 275 | 277 | 279 | 281 | 282 | 283 | 285 | 287 | 289 | 290 | 291 | 293 | 295 | 297 | 298 | 299 | 301 | 303 | 305 | 306 | 307 | 309 | 311 | 313 | 314 | 315 | 317 | 319 | 320 | 321 | 322 |

N

325 | 326 | 327 | 329 | 331 | 332 | 333 | 334 | 335 |

P

338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 |

R

349 | 350 | 351 | 353 | 354 | 355 | 356 | 357 | 358 |

S

361 | 362 | 363 | 365 | 367 | 368 | 369 | 370 | 371 |

U

374 | 375 | 376 | 378 | 380 | 382 | 383 | 384 | 386 | 388 | 390 | 391 | 392 | 394 | 396 | 398 | 399 | 400 | 402 | 404 | 405 | 406 | 407 |

_

410 | 411 | 412 | 414 | 416 | 418 | 419 | 420 | 422 | 424 | 426 | 427 | 428 | 430 | 432 | 434 | 435 | 436 | 438 | 440 | 442 | 443 | 444 | 446 | 448 | 449 | 450 | 451 |
453 |

454 | 456 | 457 | 458 | 460 | 461 | 462 | 464 | 465 | 466 | 468 | 469 | 470 | 472 | 473 | 474 | 479 | 480 | 481 | 482 | 483 | 486 | 490 | 491 |
492 | 493 | 502 | 503 | 504 | --------------------------------------------------------------------------------