Zelinqa Python SDK
The official Python client for Zelinqa. Configure a domain in Zelinqa Studio, publish it, and let the API select the next useful question for each conversation.
Python 3.11+ · Sync and async clients · Typed responses
Install
pip install zelinqa
Set your API key
Create a runtime API key for your published domain in Studio and set it on your backend:
export ZELINQA_API_KEY="YOUR_RUNTIME_API_KEY"
Keep API keys out of browser code, mobile apps, logs and source control.
Get a question and send the reply
This small console example asks one question and submits the person's reply. For choice questions, enter one of the displayed labels exactly.
from zelinqa import ZelinqaClient
with ZelinqaClient() as client:
session = client.start_session(client_reference="demo-001")
decision = session.next()
if decision.action == "ask":
question = decision.candidates[0]
print(question.text)
for choice in question.choices:
print(f"- {choice.label}")
reply = input("> ")
if not reply.strip():
decision = session.answer(outcome="asked_no_answer")
elif question.choices:
decision = session.answer(choice_labels=[reply])
else:
decision = session.answer(reply)
print(decision.action) # "ask" for another question, or "stop"
The session handle supplies session, decision, question and choice IDs for you.
Each answer() records the reply and returns the next decision; do not call
next() again just to retrieve that question. Use a session sequentially and
store session.id in your backend if you need to resume after a restart.
Open questions need the person's actual words. Choices alone need no model
call; free text is analyzed by the engine. Report a real refusal with
outcome="refused", or an empty reply with outcome="asked_no_answer".
Keep warnings visible and let your application decide when to finish. Once the
session reaches max_turns, the decision has action == "stop" and
stop_reason == "max_turns_reached"; later calls return the same stop.
What you can do
- Run conversations, resume sessions, add context and record business feedback.
- Use
AsyncZelinqaClientwithawaitfor asynchronous applications. - Read questions, edit drafts and publish with
ZelinqaConfigurationClientand the corresponding configuration scopes. - Handle typed errors, configure timeouts and retries, and provide idempotency keys.
Learn more
- Documentation and API reference
- Python guide: choices, async, configuration and errors
- Changelog
- Report an issue
License
Apache-2.0. See LICENSE.
Metadata
Release files for zelinqa 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zelinqa-1.0.1.tar.gz | 29.4 kB | With provenance | Details for zelinqa-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zelinqa-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for zelinqa-1.0.1-py3-none-any.whl |
Total release size: 62.3 kB
Release files / zelinqa-1.0.1.tar.gz
| Download URL | zelinqa-1.0.1.tar.gz |
|---|---|
| Size | 29.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be55f1f84eea7949cabcd480c0f5a39b76a182233b2090e4a6ffba69258c7731
|
|
BLAKE2b-256 checksum How to use checksums |
8880991a878ba1e7c7af4278eb5bb5cb004e6da5678247df34248bbb2f72f154
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logRelease files / zelinqa-1.0.1-py3-none-any.whl
| Download URL | zelinqa-1.0.1-py3-none-any.whl |
|---|---|
| Size | 32.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c0d99d36eda8cbdaea49f3c645f63fccf85493b82c5ecd60135ec377adf5577
|
|
BLAKE2b-256 checksum How to use checksums |
a59bf91cc47d76b58585a0600f78dccbb620b512c89325b34f00fb9cfa2c26a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logSecurity for zelinqa 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for zelinqa-1.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.