Metadata-Version: 2.4
Name: qube-survey
Version: 1.0.0
Summary: Official Python client for the hosted QUBE Survey API
Author: Agentic Labs Limited
License: MIT
Project-URL: Homepage, https://qubesurvey.com
Project-URL: Documentation, https://docs.qubesurvey.com/python
Keywords: qube,survey,questionnaire,api,odin,qubescript
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# QUBE Survey Python Client

The official, zero-dependency Python client for the hosted **QUBE Survey** API.

Use this library to automate questionnaire version uploads, inspect review tickets, retrieve replay data, and integrate survey authoring pipelines into continuous integration or automated test harnesses.

## Installation

Install using pip:

```bash
pip install https://qubesurvey.com/downloads/qube_survey-1.0.0-py3-none-any.whl
```

Or download the standalone single-file module directly:

```bash
curl -O https://qubesurvey.com/downloads/qube_survey_client.py
```

## Quickstart

```python
from qube_survey import QubeSurveyClient, authorize

# 1. Authenticate using device code authorization (RFC 8628)
token = authorize("https://app.qubesurvey.com")

# 2. Initialize the client
client = QubeSurveyClient(token, "https://app.qubesurvey.com")

# 3. List projects
projects = client.list_projects()
for project in projects:
    print(project["id"], project["name"])

# 4. Upload an immutable questionnaire version
with open("survey.qube", "r", encoding="utf-8") as f:
    source_code = f.read()

version = client.create_version(
    project_id="your-project-id",
    instrument_id="nps_survey",
    source_name="survey.qube",
    source=source_code,
    language="qube",
)
print("Uploaded version:", version["id"])
```

## Requirements

- Python 3.9 or later
- Standard library only (no external dependencies required)
