Skip to main content

Python SDK for Survey Coder Pro — AI-powered survey coding

Project description

surveycoder

Python SDK for Survey Coder Pro — AI-powered open-ended survey coding.

Installation

pip install surveycoder
# With pandas integration:
pip install surveycoder[pandas]

Quick Start

from surveycoder import SurveyCoderClient

client = SurveyCoderClient(api_key="scp_live_your_key")

result = client.code(
    responses=[
        {"id": "1", "text": "Me gusta el sabor pero es caro"},
        {"id": "2", "text": "Excelente servicio al cliente"},
    ],
    coding_type="qualitative",
    language="es",
)

print(result["codebook"])
print(result["results"])

Pandas Integration

df = client.code_to_dataframe(
    responses=[...],
    coding_type="qualitative",
)
df.to_excel("coded.xlsx")

Export

# Excel
excel_bytes = client.export_excel(
    project_id=result["project_id"],
    layout="wide_by_question",
    include_categories=False,
)
with open("coded.xlsx", "wb") as f:
    f.write(excel_bytes)

# CSV
csv_text = client.export_csv(project_id=result["project_id"])

Large Datasets (async jobs)

job = client.code(responses=large_dataset)  # >= 50 responses
result = client.wait_for_job(job["job_id"])  # Polls every 5s

API Docs

https://api.surveycoder.io/docs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

surveycoder-1.0.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

surveycoder-1.0.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file surveycoder-1.0.1.tar.gz.

File metadata

  • Download URL: surveycoder-1.0.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for surveycoder-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8b33ce9ea5a631dcdf11a8b2df6d7880a1cc551890f9de72ae9f3ea5bfe1bc5a
MD5 27586779c809c60d0be089ea19e335b0
BLAKE2b-256 a796b7b42d738f3d840846859571f2a941083f78f1a3625124f9a24a2dc1bf93

See more details on using hashes here.

File details

Details for the file surveycoder-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: surveycoder-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for surveycoder-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 02cb9cd1f75225cf9509aa0b1464f50cc2964850f76754f56d347ed6f966dac2
MD5 bcc650544a9a86dc10d949d4c7725697
BLAKE2b-256 392d05a48ec29387efd874c5cefc513fbf0028ad9069da78c174ee709db68138

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