Skip to main content

QAnswer: Api Documentation

Project description

QAnswer Python SDK

PyPI version Python Versions License: MIT

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.1195.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

qanswer_sdk-3.1195.0.tar.gz (199.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qanswer_sdk-3.1195.0-py3-none-any.whl (612.4 kB view details)

Uploaded Python 3

File details

Details for the file qanswer_sdk-3.1195.0.tar.gz.

File metadata

  • Download URL: qanswer_sdk-3.1195.0.tar.gz
  • Upload date:
  • Size: 199.7 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

Hashes for qanswer_sdk-3.1195.0.tar.gz
Algorithm Hash digest
SHA256 585f1b068ac7e5f4161cf68fbe3c98853a8ea77e550187009bbc14a803d6d77f
MD5 f83fe55ba280f268cd5ecd7e9970805f
BLAKE2b-256 ee70a78dbca3612b545de4f4c8690049dbc9e3ddc786c62e32ac0e86cf906ee1

See more details on using hashes here.

File details

Details for the file qanswer_sdk-3.1195.0-py3-none-any.whl.

File metadata

  • Download URL: qanswer_sdk-3.1195.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

Hashes for qanswer_sdk-3.1195.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ddff55a1452bd0481b60489da2de0b524a000e6e340d29ce7d74f0eb5adb0ced
MD5 9725541be6f231dbda1c1de50a7a2a4d
BLAKE2b-256 bf36b45f5c6df27a22586777c809c36a7b899b1199360f48d34f0d4dabf202a3

See more details on using hashes here.

Supported by

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