Logits Python SDK
logits-sdk is the official Python SDK for the Logits platform. Install it
under the distribution name logits-sdk; application code imports it as
logits.
Installation
pip install logits-sdk
Authentication
The SDK reads your Logits API key from the LOGITS_API_KEY environment variable.
Telemetry
Tinker telemetry is disabled by default. To opt in, set TINKER_TELEMETRY=1
before importing logits.
Usage
import logits
service_client = logits.ServiceClient()
sampling_client = service_client.create_sampling_client(base_model="Qwen/Qwen3-8B")
future = sampling_client.sample(
prompt=logits.ModelInput.from_ints([1, 2, 3]),
num_samples=1,
sampling_params=logits.SamplingParams(max_tokens=32),
)
result = future.result()
Async usage:
import logits
service_client = logits.ServiceClient()
sampling_client = await service_client.create_sampling_client_async(
base_model="Qwen/Qwen3-8B"
)
result = await sampling_client.sample_async(
prompt=logits.ModelInput.from_ints([1, 2, 3]),
num_samples=1,
sampling_params=logits.SamplingParams(max_tokens=32),
)
Close the underlying holder when a long-running process no longer needs the client:
service_client.holder.close()
Development
Install the package and test dependencies:
python -m pip install -e .
python -m pip install pytest pytest-timeout respx
Run the test suite:
pytest
Build and validate release artifacts:
python -m pip install build twine
python -m build
python -m twine check dist/*
Release Checklist
- Bump both
pyproject.tomlandsrc/logits/_version.py. - Run
pytest,python -m build, andpython -m twine check dist/*. - Confirm GitHub Actions CI is green on the release commit.
- Create a GitHub release from the version tag to trigger the publish workflow.
Metadata
Release files for logits-sdk 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| logits_sdk-0.1.6.tar.gz | 13.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| logits_sdk-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.7 kB
Release files / logits_sdk-0.1.6.tar.gz
| Download URL | logits_sdk-0.1.6.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6be6d0a746d55b33a87580c5bde8ae54af151e85faf57ccf5cc337e55c7d3377
|
|
BLAKE2b-256 checksum How to use checksums |
7b072fc8cdd2ffebfa1b47e3f22d02974224b59da7d34053e9f08b9a03b2ecc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 20, 2026.
Transparency logRelease files / logits_sdk-0.1.6-py3-none-any.whl
| Download URL | logits_sdk-0.1.6-py3-none-any.whl |
|---|---|
| Size | 13.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
96196a5a80916d241660bd6ed59a02c20fb8107d60ceb483a953f01c7b070ae0
|
|
BLAKE2b-256 checksum How to use checksums |
579da2f9ceb7eb549165b4fd6b0a14e10bd1e19a4a1f00145c78ecd6aa53dadb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 20, 2026.
Transparency log