Registry / http-networking / qsapi
library2.2.0pypypiunverified

qsAPI is a Python client library designed for interacting with Qlik Sense's QPS (Qlik Proxy Service) and QRS (Qlik Repository Service) interfaces. It simplifies common administrative and data operations within a Qlik Sense environment, providing a programmatic way to manage apps, users, security rules, and more. The current version is 2.2.0, and the library receives updates periodically, with major refactorings in its 2.1.0 release.

pip install qsapi
INSTALL
IMPORT
SIG · QSAPI
Q
qsapi
http-networkingpythonv2.2.0
Install
2.1s avg
Import
Disk
19MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 21.4MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.1s · import 0.000s · 22MB
19MB installed
● package 19MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

QlikSenseAPI
from qsapi import QlikSenseAPI
from qsAPI import QlikSenseAPI

This quickstart demonstrates how to initialize the `QlikSenseAPI` client using certificate-based authentication and fetch the Qlik Sense engine version. It highlights common configuration parameters for connecting to a Qlik Sense Enterprise server.

import os from qsapi.qsapi import QlikSenseAPI # Configure Qlik Sense connection details. Use environment variables for production. HOST = os.environ.get('QLIK_SENSE_HOST', 'your_qlik_sense_host') # e.g., 'yourserver.example.com' CERT_PATH = os.environ.get('QLIK_SENSE_CERT_PATH', '/path/to/client.pem') KEY_PATH = os.environ.get('QLIK_SENSE_KEY_PATH', '/path/to/client_key.pem') USER_DIRECTORY = os.environ.get('QLIK_SENSE_USER_DIRECTORY', 'DOMAIN') # e.g., 'YOURDOMAIN' USER_ID = os.environ.get('QLIK_SENSE_USER_ID', 'svc_api_user') try: # Initialize the Qlik Sense API client qs_api = QlikSenseAPI( host=HOST, certificate=CERT_PATH, key=KEY_PATH, user_directory=USER_DIRECTORY, user_id=USER_ID ) # Example: Get Qlik Sense Engine Version engine_version = qs_api.get_engine_version() print(f"Successfully connected to Qlik Sense. Engine Version: {engine_version}") # Example: Get a list of apps (uncomment to run) # apps = qs_api.get_apps() # print(f"Found {len(apps)} applications.") # for app in apps[:2]: # Print details for the first two apps # print(f" - App Name: {app.name}, ID: {app.id}") except FileNotFoundError as e: print(f"Error: Certificate or key file not found: {e}. Please ensure paths are correct.") except Exception as e: print(f"An unexpected error occurred: {e}")
Debug
Known issues
breakingThe package structure and import paths were refactored in version 2.1.0. The main `QlikSenseAPI` class moved from `qsapi` to `qsapi.qsapi`.
fix
Update your import statements from `from qsapi import QlikSenseAPI` to `from qsapi.qsapi import QlikSenseAPI`.
affects: < 2.1.0
gotchaQlik Sense API authentication via certificates requires correct absolute paths to `client.pem` and `client_key.pem` files, and these files must have appropriate read permissions for the user running the Python script.
fix
Verify that `certificate` and `key` parameters point to existing, readable `.pem` files. Ensure the user specified by `user_directory` and `user_id` in the API call is authorized within Qlik Sense for the actions attempted.
affects: All versions
gotchaThe `user_directory` and `user_id` parameters are crucial for associating the certificate with a Qlik Sense user. Incorrect values can lead to 'Forbidden' (HTTP 403) or 'Unauthorized' errors even with valid certificates.
fix
Double-check that `user_directory` matches the user directory configured in Qlik Sense (e.g., 'DOMAINS', 'LDAP', 'LOCAL'), and `user_id` is the exact user ID within that directory that the certificate is intended for.
affects: All versions
Upgrade
Version history
2.2.0latest on PyPI · released Oct 22, 2020
Audit
Dependencies
requestsrequiredUsed for making HTTP requests to the Qlik Sense APIs.
xmltodictrequiredUsed for parsing XML responses from some Qlik Sense endpoints.
Agent activity
38 hits · last 30 days
node
33
OpenAI (training)
1
Resources
qsapi — pip install qsapi · libregistry