Tapra Python SDK
Official Python client for the Tapra API: Tunisian Arabic / French / English code-switching transcription, speech, translation, and Arabizi ↔ Arabic conversion.
pip install "tapra[realtime]" # drop [realtime] if you only use the REST endpoints
from tapra import Tapra
client = Tapra(base_url="https://api.example.com") # api_key defaults to TAPRA_API_KEY
with open("meeting.m4a", "rb") as audio:
transcript = client.transcriptions.create(file=audio, timestamps="word")
print(transcript.text)
client.script.convert(text="3lech 7abit l9anoun?", direction="ZI2AR")
for event in client.translations.create_stream(input="عندي برشا خدمة", target="French"):
print(event.type, event.delta)
Async: AsyncTapra has the same methods. Errors raise typed exceptions
(PaymentRequiredError for HTTP 402, UnauthorizedError, …) whose .body.error holds
type and message. Pass idempotency_key= to retry metered requests safely, and use
client.<resource>.with_raw_response.<method>() to read x-tapra-cost-tnd.
Realtime transcription
from tapra import connect_realtime
async with connect_realtime(base_url="https://api.example.com", language="ar-AR") as session:
for chunk in pcm_chunks: # mono pcm_s16le, 16 kHz
await session.send_audio(chunk)
final = await session.stop()
print(final.text, final.usage)
Development
src/tapra/ is generated by Fern from openapi/tapra-api.json; do not edit it by hand.
src/tapra/realtime.py is hand-written (kept by .fernignore). Tests: sdks/tests/python.
Metadata
Release files for tapra 0.1.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 | |
|---|---|---|---|---|
| tapra-0.1.1.tar.gz | 53.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tapra-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 145.6 kB
Release files / tapra-0.1.1.tar.gz
| Download URL | tapra-0.1.1.tar.gz |
|---|---|
| Size | 53.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f1aca834ec92813b3b06288b12a75ea2d53a49397236461671887a4c1454ae73
|
|
BLAKE2b-256 checksum How to use checksums |
de358a6afdf55b095c21419cc789f8caebd24ff0d1153d225d6e3606c95de36a
|
| 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 Oct 7, 2026.
Transparency logRelease files / tapra-0.1.1-py3-none-any.whl
| Download URL | tapra-0.1.1-py3-none-any.whl |
|---|---|
| Size | 92.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b76b9cf4787b18ac6a31166673cc2689c2d88a5187c15db4dfbbe5a4b245d571
|
|
BLAKE2b-256 checksum How to use checksums |
6a343130225ee49844430c39943f8563297b4cce5b32d3aee9f20f82408a7f82
|
| 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 Oct 7, 2026.
Transparency logSecurity for tapra 0.1.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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for tapra-0.1.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 Oct 7, 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.