The official Python3 Knowi API SDK.
Project description
Python3 - Knowi API SDK (knowipy)
This repository houses the official Python SDK for use with Knowi.
Knowi is an augmented analytics platform that instantly transforms any data into insights and data driven actions.
About
- The Knowi API SDK is the simplest way to automate your Knowi instance
- The SDK streamlines the API programming experience, allowing you to significantly reduce your written code
- This SDK was written for Python3, and is not compatible with Python2
- This library requires Python 3.6 and above.
- Execute scripts via
python3
Features
- Dashboard Management
- List, create, edit, clone, share, and delete dashboards
- View widgets in a dashboard, export dashboards to PDF
- Generate simple/secure dashboard share url
- List, share, delete dashboard filter-sets
- Widget Management
- List, create, edit, clone, share, and delete widgets
- Generate simple/secure widget share url
- Datasource Management
- List, clone, share, and delete datasources
- Query Management
- List, clone, share, run, and delete queries
- Categories Management
- List, copy, share, run, and delete categories
- Add and remove assets to/from categories
- User Management
- List, create, edit, and delete users
- Transfer user assets to another user
- Groups Management
- List, create, edit, and delete groups
- Natural Language Query Management
- Get NLP query suggestions on a dataset
- Execute NLP queries against a dataset
- Dataset Management
- Retrieve data from a dataset or query
- Single Sign On (SSO)
- Create and manage SSO users
- Update SSO user attributes including user content filters
Note: The resources below requires additional configuration. Contact support@knowi.com for assistance.
- Parent/Master Customer (Multi-tenancy)
- Create and manage a multi-tenancy model with a parent/master to sub-customer relationship
- Administer assets and access from the parent/master to sub-customers
- System Status Health Checks
- Checks all or specified Knowi components for connectivity and status report
Installation
We recommend using PyPI to install the Knowi SDK for Python
$ pip3 install knowipy --upgrade
Note: You may need to use
python3
before your commands to ensure you use the correct Python path. e.g.python3 --version
python --version
-- or --
python3 --version
Usage
- See examples.py for full usage and examples
- Retrieve your Client id/secret from your Knowi account
- Navigate to Settings -> Account Settings https://recordit.co/HAudn0LJ2E
from knowipy import Knowi
import os
# instantiate the client
knowi = Knowi(clientId=os.environ['KNOWI_CLIENT_ID'], clientSecret=os.environ['KNOWI_CLIENT_SECRET'])
# note: for on-prem deployments set the `host=<knowi_server_ip>` variable
knowi = Knowi(clientId=os.environ['KNOWI_CLIENT_ID'], clientSecret=os.environ['KNOWI_CLIENT_SECRET'],
host="≤knowi_server_ip>")
# get a list of dashboards
dashboard_list = knowi.dashboard_list()
# to refresh an existing query
query_refresh = knowi.query_refresh(queryId=1231)
Development
Getting Started
Assuming that you have Python3 and virtualenv
installed, set up your
environment and install the required dependencies like this instead of
the pip3 install knowipy
defined above:
$ git clone https://github.com/ezeagwulae/knowi-python-sdk.git
$ cd knowipy
$ virtualenv venv
...
$ . venv/bin/activate
$ pip install -r requirements.txt
$ pip install -e .
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file knowipy-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: knowipy-1.1.0-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68b04629dd597c032a8767e6d43aaa4f0bf6dc5c8ffe416702ad8bfe92d0f4cc |
|
MD5 | 1a02d168eecec7d15eabf1a8760b33e3 |
|
BLAKE2b-256 | 012b3ef8fc1630b5c4a7a10b6b22f80494c58116331127fdb4acf12dfcc1ba55 |