# QAnswer Python SDK
[](https://pypi.org/project/qanswer-sdk/)
[](https://pypi.org/project/qanswer-sdk/)
[](LICENSE)
Official **Python SDK** for the [QAnswer API](https://qanswer.eu), 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](https://docs.pydantic.dev)
- Easy configuration of authentication and base URL
- Auto-generated and versioned with each API release
---
## 📦 Installation
You can install from [PyPI](https://pypi.org/project/qanswer-sdk/):
```bash
pip install qanswer-sdk
```
Or add it to your `requirements.txt`
```txt
qanswer-sdk==3.1184.0
```
---
## 🔑 Authentication
Most endpoints require authentication. You can set your API key like this:
```python
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
```python
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
```python
print(result.answer) # direct answer
print(result.confidence) # model confidence
```
---
## ⚙️ Configuration
```python
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.1201.0 (branch: main)`
Raw data
{
"_id": null,
"home_page": "https://github.com/GIT_USER_ID/GIT_REPO_ID",
"name": "qanswer_sdk",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "OpenAPI, OpenAPI-Generator, QAnswer: Api Documentation",
"author": "OpenAPI Generator Community",
"author_email": "team@openapitools.org",
"download_url": "https://files.pythonhosted.org/packages/c9/e6/bd2690fade8fdbb9c2f7f9898a5480df5f3d2cc7e5bfbf324dd71e534240/qanswer_sdk-3.1201.0.tar.gz",
"platform": null,
"description": "# QAnswer Python SDK\n\n[](https://pypi.org/project/qanswer-sdk/)\n[](https://pypi.org/project/qanswer-sdk/)\n[](LICENSE)\n\nOfficial **Python SDK** for the [QAnswer API](https://qanswer.eu), automatically generated from the OpenAPI specification.\n\nThis SDK allows Python applications to interact with QAnswer's services programmatically without needing to craft raw HTTP requests.\n\n---\n\n## \ud83d\ude80 Features\n\n- Full coverage of QAnswer API endpoints \n- Type-safe models via [Pydantic](https://docs.pydantic.dev) \n- Easy configuration of authentication and base URL \n- Auto-generated and versioned with each API release \n\n---\n\n## \ud83d\udce6 Installation\n\nYou can install from [PyPI](https://pypi.org/project/qanswer-sdk/):\n\n```bash\npip install qanswer-sdk\n```\n\n\nOr add it to your `requirements.txt`\n\n```txt\nqanswer-sdk==3.1184.0\n```\n\n---\n\n## \ud83d\udd11 Authentication\n\nMost endpoints require authentication. You can set your API key like this:\n```python\nfrom qanswer_sdk import Configuration, ApiClient\nfrom qanswer_sdk.apis import DefaultApi\n\n# Configure API key authorization\nconfig = Configuration(\n host=\"https://api.qanswer.eu\",\n api_key={\"Authorization\": \"Bearer <YOUR_TOKEN>\"}\n)\n\n# Initialize client\nwith ApiClient(config) as client:\n api = DefaultApi(client)\n response = api.health_check()\n print(response)\n```\n\n---\n\n## \ud83d\udcd6 Usage Examples\n\n#### Call an endpoint\n\n```python\nfrom qanswer_sdk import Configuration, ApiClient\nfrom qanswer_sdk.apis import DefaultApi\n\nconfig = Configuration(host=\"https://api.qanswer.eu\")\n\nwith ApiClient(config) as client:\n api = DefaultApi(client)\n result = api.ask_question(question=\"What is ISO 27001?\")\n print(result)\n```\n\n#### Handle responses\n\n```python\nprint(result.answer) # direct answer\nprint(result.confidence) # model confidence\n```\n\n---\n\n## \u2699\ufe0f Configuration\n\n```python\nconfig = Configuration(\n host=\"https://api.qanswer.eu\",\n api_key={\"Authorization\": \"Bearer <YOUR_TOKEN>\"},\n timeout=30\n)\n```\n\n---\n\n\ud83d\udccc Versioning\n\nThis SDK follows the version of the QAnswer API.\nThe current version is: `3.1201.0 (branch: main)`",
"bugtrack_url": null,
"license": "NoLicense",
"summary": "QAnswer: Api Documentation",
"version": "3.1201.0",
"project_urls": {
"Homepage": "https://github.com/GIT_USER_ID/GIT_REPO_ID",
"Repository": "https://github.com/GIT_USER_ID/GIT_REPO_ID"
},
"split_keywords": [
"openapi",
" openapi-generator",
" qanswer: api documentation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0891fed6fdb772179af059c377aa1184cc532d3682837d1fd24e32d7a8a2a35c",
"md5": "2f7d37a4280f6bcbcc976139a427a050",
"sha256": "f2729128dc4e81e4167f22071b96228edec3c5695f0986ed5af693c95454db0e"
},
"downloads": -1,
"filename": "qanswer_sdk-3.1201.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2f7d37a4280f6bcbcc976139a427a050",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 612385,
"upload_time": "2025-09-06T16:40:07",
"upload_time_iso_8601": "2025-09-06T16:40:07.231177Z",
"url": "https://files.pythonhosted.org/packages/08/91/fed6fdb772179af059c377aa1184cc532d3682837d1fd24e32d7a8a2a35c/qanswer_sdk-3.1201.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c9e6bd2690fade8fdbb9c2f7f9898a5480df5f3d2cc7e5bfbf324dd71e534240",
"md5": "293f98bf260a7700310d75718ab5221f",
"sha256": "e9eb563507bd3d797c9a6714a1412b300172bc3a13901093963c2f0a89ddfaa2"
},
"downloads": -1,
"filename": "qanswer_sdk-3.1201.0.tar.gz",
"has_sig": false,
"md5_digest": "293f98bf260a7700310d75718ab5221f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 199643,
"upload_time": "2025-09-06T16:40:09",
"upload_time_iso_8601": "2025-09-06T16:40:09.082462Z",
"url": "https://files.pythonhosted.org/packages/c9/e6/bd2690fade8fdbb9c2f7f9898a5480df5f3d2cc7e5bfbf324dd71e534240/qanswer_sdk-3.1201.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-06 16:40:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "GIT_USER_ID",
"github_project": "GIT_REPO_ID",
"github_not_found": true,
"lcname": "qanswer_sdk"
}