QAnswer: Api Documentation
Project description
QAnswer Python SDK
Official Python SDK for the QAnswer API, automatically generated from the OpenAPI specification.
This SDK allows Python applications to interact with QAnswer's services programmatically without needing to craft raw HTTP requests.
🚀 Features
- Full coverage of QAnswer API endpoints
- Type-safe models via Pydantic
- Easy configuration of authentication and base URL
- Auto-generated and versioned with each API release
📦 Installation
You can install from PyPI:
pip install qanswer-sdk
Or add it to your requirements.txt
qanswer-sdk==3.1184.0
🔑 Authentication
Most endpoints require authentication. You can set your API key like this:
from qanswer_sdk import Configuration, ApiClient
from qanswer_sdk.apis import DefaultApi
# Configure API key authorization
config = Configuration(
host="https://api.qanswer.eu",
api_key={"Authorization": "Bearer <YOUR_TOKEN>"}
)
# Initialize client
with ApiClient(config) as client:
api = DefaultApi(client)
response = api.health_check()
print(response)
📖 Usage Examples
Call an endpoint
from qanswer_sdk import Configuration, ApiClient
from qanswer_sdk.apis import DefaultApi
config = Configuration(host="https://api.qanswer.eu")
with ApiClient(config) as client:
api = DefaultApi(client)
result = api.ask_question(question="What is ISO 27001?")
print(result)
Handle responses
print(result.answer) # direct answer
print(result.confidence) # model confidence
⚙️ Configuration
config = Configuration(
host="https://api.qanswer.eu",
api_key={"Authorization": "Bearer <YOUR_TOKEN>"},
timeout=30
)
📌 Versioning
This SDK follows the version of the QAnswer API.
The current version is: 3.1204.0 (branch: main)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qanswer_sdk-3.1204.0.tar.gz.
File metadata
- Download URL: qanswer_sdk-3.1204.0.tar.gz
- Upload date:
- Size: 199.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-64-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6d2daa7098a533b079d417eca6c6a0efb738283f1ae474b1ec6a928b5782841
|
|
| MD5 |
e5045182d27365f73893f523e875bc48
|
|
| BLAKE2b-256 |
c09a35aaaeba7b0ea838f0404587c1f2a8abf97b751e41ba011ca854108540c1
|
File details
Details for the file qanswer_sdk-3.1204.0-py3-none-any.whl.
File metadata
- Download URL: qanswer_sdk-3.1204.0-py3-none-any.whl
- Upload date:
- Size: 612.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-64-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2e8b05b58dcfc2516f0be7d1c4878dd6b0146d257d9c1a4ba0453f169ac2c53
|
|
| MD5 |
c0cb8bc16930612289b249cd45f872bc
|
|
| BLAKE2b-256 |
59cdad4f9bf6359f9cfd26d67ad5e716fd3b64886a1ef808cd58a078152de656
|