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.0.tar.gz (5.9 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.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: surveycoder-1.0.0.tar.gz
  • Upload date:
  • Size: 5.9 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.0.tar.gz
Algorithm Hash digest
SHA256 6c3a797bcc6b80da7f477fed82dce5122cca1b3d8812a47ce2db106d2547519d
MD5 65d871e25050294655a82d8bfd38f68c
BLAKE2b-256 6eee7c1cd23625fde6879d8be3d20f5006605c044bc4039e7d285a21d25d8b45

See more details on using hashes here.

File details

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

File metadata

  • Download URL: surveycoder-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88cf983508870e2977560a16f2aa4083bb780543608a42d27038625530d30ea1
MD5 efa52c07903b83180482a2f64614536d
BLAKE2b-256 07f9cec5da3353f9365e5c60e8005f67b673df70f88723c64c8e662c0cf9b7f9

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