Skip to main content

Library for accessing KnowledgeOwl

Project description

Python implementation of knowledgeowl API

Examples

Create connection to knowledge owl:

import knowledgeowl
ko = knowledgeowl.KnowledgeOwl('api_key', 'project_id')

List all articles and print their ID and Name:

resp = ko.list_articles()
for i in resp['data']:
    print('{name}: {id}'.format(**i))

Get article by article id:

>>> ko.get_article('58cbd78a32131c852498774d')
2017-03-20 08:04:57 INFO connectionpool._get_conn Resetting dropped connection: app.knowledgeowl.com
{u'valid': True, u'data': {u'inherited_roles': None, u'search_phrases': u'', u'internal_title': u'', u'current_version_id': u'xxxxxxxxxxxxxxxxxxxxxxxx', u'application_screens': [u''], u'content_article': None, u'meta_page_title': u'', u'current_version': {u'text': u'updated by ko admin', u'en': {u'text': u'', u'title': u'Test'}, u'title': u'test'}, u'id': u'58cbd78a32131c852498774d', u'auto_save': u'', u'category': u'xxxxxxxxxxxxxxxxxxxxxxxx', u'view_count': None, u'url_hash': u'testapi', u'author': u'xxxxxxxxxxxxxxxxxxxxxxxx', u'ready_versions': None, u'callout': u'none', u'remove_pdf': u'', u'languages': None, u'meta_description': u'', u'current_version_number': 1, u'searchTitle': {u'en': u'Test'}, u'parents': [u'xxxxxxxxxxxxxxxxxxxxxxxx'], u'project_id': u'xxxxxxxxxxxxxxxxxxxxxxxx', u'type': u'article', u'callout_video': u'', u'status': u'published', u'redirect_link': None, u'index': 6, u'toc_title': u'', u'visibility': u'public', u'date_published': {u'usec': 0, u'sec': -68400}, u'reader_roles': u'', u'related_articles': [u''], u'pdf': u'/help/pdfexport/id/58cbd78a32131c852498774d', u'template_article': u'', u'remove_feedback': u'', u'article_link': None, u'tags': u'', u'hide_from_toc': u'', u'callout_expire': 1490619453, u'name': u'Test', u'date_modified': u'03/20/2017 8:57 am EDT', u'prevent_searching': u'', u'date_deleted': None, u'summary': False, u'remove_comments': u'', u'meta_data': None, u'category_view': u'', u'date_created': u'03/17/2017 8:33 am EDT', u'user_teams': u'', u'modified_author': u'xxxxxxxxxxxxxxxxxxxxxxxx'}}

Update article:

r = ko.update_article('58cbd78a32131c852498774d', index=6).json()

Notes:

There are certain fields you shouldn’t try to update. Here is the list of fields you can update.:

>>> knowledgeowl.ARTICLE_KEYS
['name', 'visibility', 'status', 'url_hash', 'toc_title', 'category', 'application_screens', 'index', 'category_view', 'prevent_searching', 'hide_from_toc', 'remove_pdf', 'callout', 'callout_expire', 'callout_video', 'reader_roles', 'current_version']
>>> knowledgeowl.CATEGORY_KEYS
['name', 'visibility', 'status', 'url_hash', 'type', 'parent_id', 'toc_title', 'faq_display', 'toc_hide_children', 'description', 'index', 'cat_toggle_override', 'reader_roles', 'hide_from_toc']

Project details


Download files

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

Source Distribution

knowledgeowl-0.0.2.tar.gz (5.3 kB view details)

Uploaded Source

File details

Details for the file knowledgeowl-0.0.2.tar.gz.

File metadata

File hashes

Hashes for knowledgeowl-0.0.2.tar.gz
Algorithm Hash digest
SHA256 96f4fffbbe33b3a8744698f94893ce779d35fd564a941fa74f16a08b672b189e
MD5 7b49e4633bb13354c4276d4f27f6ec94
BLAKE2b-256 8f5aaf0f80b015c65381543ca7e88cf8a57594d39e9b411f8e4b3e4952cdfa63

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page