qrs-api-client (Qlik Sense Repository API Client)
Python client for Qlik Sense Repository Service API.
Forked from clintcarr/qrspy.
Requirements
- Python 3.9+
requests >= 2.32.3
Optional:
requests_ntlm >= 1.2.0— only required for NTLM authentication
Installation
# Minimal install (certificate authentication only)
pip install qrs-api-client
# With NTLM authentication support
pip install qrs-api-client[ntlm]
Connecting using certificates
Export the Qlik Sense certificates in PEM format from the Qlik Sense Enterprise server to a local folder before running the code.
from qrs_api_client import QRSClient, AuthManager
auth_manager = AuthManager(
cert_path="<path_to_certificates>/client.pem",
key_path="<path_to_certificates>/client_key.pem",
root_cert_path="<path_to_certificates>/root.pem",
)
client = QRSClient(
server_name="<server_name>",
server_port=4242,
auth_manager=auth_manager,
auth_method="certificate",
verify_ssl=True,
)
about = client.get("/qrs/about/api/description", {"extended": "false", "method": "POST"})
if about:
print(about)
else:
print("API request error.")
Connecting using NTLM
Install with the ntlm extra: pip install qrs-api-client[ntlm].
from qrs_api_client import QRSClient, AuthManager
auth_manager = AuthManager(
user_id="<DOMAIN>\\<user_id>",
password="<password>",
root_cert_path="<path_to_certificates>/root.pem",
)
client = QRSClient(
server_name="<server_name>",
server_port=443,
auth_manager=auth_manager,
auth_method="ntlm",
verify_ssl=False,
)
about = client.get("/qrs/about/api/description", {"extended": "false", "method": "POST"})
print(about)
Loading configuration from environment variables or .env files
qrs-api-client does not load any configuration automatically. This keeps it a clean, predictable library — you are in full control of where credentials come from.
A common pattern is to store credentials in environment variables or a .env file and load them in your own application code:
pip install python-dotenv
# .env in your project folder (add this to .gitignore!)
QLIK_CERT_PATH=/path/to/client.pem
QLIK_KEY_PATH=/path/to/client_key.pem
QLIK_ROOT_CERT_PATH=/path/to/root.pem
QLIK_SERVER_NAME=qliksense.example.com
QLIK_SERVER_PORT=4242
import os
from dotenv import load_dotenv
from qrs_api_client import QRSClient, AuthManager
load_dotenv()
auth_manager = AuthManager(
cert_path=os.environ["QLIK_CERT_PATH"],
key_path=os.environ["QLIK_KEY_PATH"],
root_cert_path=os.environ["QLIK_ROOT_CERT_PATH"],
)
client = QRSClient(
server_name=os.environ["QLIK_SERVER_NAME"],
server_port=int(os.environ["QLIK_SERVER_PORT"]),
auth_manager=auth_manager,
auth_method="certificate",
verify_ssl=True,
)
Any other config source (Vault, AWS Secrets Manager, YAML files, command-line arguments) works the same way — just pass the values into AuthManager() and QRSClient().
Query parameters: dict or string
The HTTP methods accept params as a dict:
client.get("/qrs/about", {"extended": "false"})
Logging
The client uses the standard logging module under the name qrs_api_client.client. To see debug output:
import logging
logging.basicConfig(level=logging.DEBUG)
Examples of usage
See the examples folder.
Documentation
Full API reference: https://rumen-vasilev.github.io/qrs-api-client/
License
MIT — see LICENSE.
Metadata
Release files for qrs-api-client 2.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| qrs_api_client-2.7.0.tar.gz | 20.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qrs_api_client-2.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.0 kB
Release files / qrs_api_client-2.7.0.tar.gz
| Download URL | qrs_api_client-2.7.0.tar.gz |
|---|---|
| Size | 20.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
844f35b7f13aba0ba1c28e4b79d50e0791d41ac6ca5faaf11b53a0159dbb0c08
|
|
BLAKE2b-256 checksum How to use checksums |
c65b5a7dd0e7112c0ed13b6b4b12d9c8dffdcba0a8183e132f32f59a0b78787f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / qrs_api_client-2.7.0-py3-none-any.whl
| Download URL | qrs_api_client-2.7.0-py3-none-any.whl |
|---|---|
| Size | 20.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1960c9119a90ca6be5a6e7b8c3316c5fe0585a9aff4ddc00781c5e657ca0827f
|
|
BLAKE2b-256 checksum How to use checksums |
47547f5b19c0a2abb68a553b9547940a432b52163782f5e0b22f79d632f0438f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for qrs-api-client 2.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.