Document¶
- class kuma.Document(client, endpoint)¶
This is the kuma.Document class that defines a kuma Document. It lets you access it raw HTML data, summary, children pages etc. Basically it wraps the Kuma API in an easy, useful and elegand Python wrapper.
- children()¶
Returns the children documents of this kuma Document in Python dict format.
- client = None¶
Specify the kuma.Client to which requests will be delegated
- endpoint = None¶
Specify the endpoint of the current document
- get(query=None, meta=None)¶
Make a request to the client and return the result.
- get_child(name)¶
Return a child endpoint of the current document.
- html()¶
Returns the HTML code of the current kuma Document.
- json()¶
Returns the current document’s JSON data in Python dict format.
- raw¶
Return raw html data for the current document.
- section(section_id, raw=True, macros=True)¶
Return a specific section of the current page in raw format with macros applied (meaning render the kuma templates)
- subpages¶
Returns all the subpages of the current document in kuma.Document format.
- summary¶
Return the summary of the current document.
- toc()¶
Returns the current document’s Table of Contents in Python dict format.