scriptivox 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ .venv/
4
+ dist/
5
+ build/
6
+ *.egg-info/
7
+ .pytest_cache/
8
+ .mypy_cache/
9
+ .env
10
+ .env.*
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Scriptivox
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,235 @@
1
+ Metadata-Version: 2.5
2
+ Name: scriptivox
3
+ Version: 0.1.0
4
+ Summary: Official Python SDK for the Scriptivox transcription API: upload, transcribe, wait, export SRT/VTT/text, list, and verify webhooks.
5
+ Project-URL: Homepage, https://www.scriptivox.com
6
+ Project-URL: Documentation, https://platform.scriptivox.com/docs/quickstart
7
+ Project-URL: Repository, https://github.com/SparkleOfficial/scriptivox-python
8
+ Project-URL: Issues, https://github.com/SparkleOfficial/scriptivox-python/issues
9
+ Author-email: Scriptivox <support@scriptivox.com>
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: api,asr,diarization,scriptivox,sdk,speech-to-text,srt,subtitles,transcription,vtt
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
24
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
25
+ Classifier: Typing :: Typed
26
+ Requires-Python: >=3.9
27
+ Requires-Dist: httpx<1,>=0.23
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest>=7; extra == 'dev'
30
+ Description-Content-Type: text/markdown
31
+
32
+ # Scriptivox Python SDK
33
+
34
+ The official Python client for the [Scriptivox transcription API](https://platform.scriptivox.com/docs/quickstart). Upload a file or pass a link, wait for the transcript, export SRT, VTT or text, list your jobs and verify webhooks. Sync and asyncio clients, typed responses and one exception class per error code.
35
+
36
+ - Python 3.9 or newer. One dependency: [httpx](https://www.python-httpx.org/).
37
+ - Every submit carries an `Idempotency-Key`, so a retried call never starts a second job.
38
+ - Large files are streamed from disk, never read into memory.
39
+
40
+ ## Install
41
+
42
+ ```bash
43
+ pip install scriptivox
44
+ ```
45
+
46
+ ## Quickstart
47
+
48
+ Create an API key on the [API Keys page](https://platform.scriptivox.com/platform/keys) and add balance on the [Billing page](https://platform.scriptivox.com/platform/billing).
49
+
50
+ ```python
51
+ from scriptivox import Scriptivox
52
+
53
+ client = Scriptivox() # reads SCRIPTIVOX_API_KEY, or pass api_key="sk_live_..."
54
+
55
+ job = client.transcribe(file="meeting.mp3", language="en")
56
+ done = client.wait(job["id"])
57
+ print(done["result"]["full_transcript"])
58
+ ```
59
+
60
+ From a public link (direct file links, Google Drive, Dropbox and OneDrive share links):
61
+
62
+ ```python
63
+ job = client.transcribe(url="https://example.com/podcast.mp3", diarize=True, speaker_count=2)
64
+ ```
65
+
66
+ Pass `language` when you know it: it is faster and more accurate than auto-detection. Omit it to auto-detect.
67
+
68
+ ## Captions and plain text
69
+
70
+ ```python
71
+ srt = client.get(job["id"], format="srt", max_words=4)
72
+ vtt = client.get(job["id"], format="vtt", include_speakers=True)
73
+ text = client.get(job["id"], format="text", include_timestamps=True)
74
+ ```
75
+
76
+ `format="json"` (the default) returns the whole job. The caption options are `max_words`, `max_chars`, `max_duration`, `sentence_aware`, `include_speakers`, `strip_chars` and, for text, `include_timestamps`. See [caption export](https://platform.scriptivox.com/docs/api-reference#get-result).
77
+
78
+ ## Upload with progress
79
+
80
+ ```python
81
+ def show(p):
82
+ print(f"{p.percent:5.1f}% {p.loaded}/{p.total} bytes")
83
+
84
+ upload = client.upload("lecture.mp4", on_progress=show)
85
+ job = client.transcribe(upload_id=upload["upload_id"])
86
+ # or in one call:
87
+ job = client.transcribe(file="lecture.mp4", on_upload_progress=show)
88
+ ```
89
+
90
+ `file` can be a path, `bytes`, or a binary file object (`open(path, "rb")`). For bytes or a stream without a name, pass `filename="audio.mp3"`. A non-seekable stream also needs `size=`. Filenames are made ASCII-safe for you (`Réunion.mp3` is sent as `Reunion.mp3`).
91
+
92
+ ## Waiting
93
+
94
+ `wait(id)` polls until the job ends. It waits 2 s between polls at first, growing to 10 s, and honours `Retry-After` when rate-limited. It returns the completed job. A job that fails raises `TranscriptionFailedError`, whose `code` is the job's `error.code`:
95
+
96
+ ```python
97
+ from scriptivox import TranscriptionFailedError
98
+
99
+ try:
100
+ done = client.wait(job["id"], timeout=3600)
101
+ except TranscriptionFailedError as e:
102
+ print(e.code, e.transcription["error"]["message"]) # e.g. URL_NOT_ACCESSIBLE
103
+ ```
104
+
105
+ Failed and cancelled jobs cost nothing. Prefer webhooks to polling for long files.
106
+
107
+ ## Listing, cancelling, deleting, balance
108
+
109
+ ```python
110
+ for t in client.list(status="completed"): # follows the cursor page by page
111
+ print(t["id"], t["audio_duration_seconds"])
112
+
113
+ client.cancel(job_id) # before transcription starts; not charged
114
+ client.delete(job_id) # a finished job and its transcript
115
+ b = client.balance()
116
+ print(b["available_cents"], b["auto_topup"]["enabled"])
117
+ ```
118
+
119
+ `list()` takes `status`, `from_`, `to` (datetime or ISO string), `limit` (page size) and `order`. Items leave out `result`; `get(id)` has it.
120
+
121
+ ## Webhooks
122
+
123
+ Pass `webhook_url` when you submit, and check every request with `verify_webhook`. It needs the **raw** body, your key's webhook signing secret (`whsec_…`, on the API Keys page) and the request headers. It refuses a bad signature and a timestamp more than 5 minutes old.
124
+
125
+ ```python
126
+ import os
127
+ from fastapi import FastAPI, Request, Response
128
+ from scriptivox import verify_webhook, WebhookVerificationError
129
+
130
+ app = FastAPI()
131
+
132
+ @app.post("/scriptivox")
133
+ async def scriptivox_webhook(request: Request):
134
+ try:
135
+ event = verify_webhook(await request.body(), request.headers, os.environ["SCRIPTIVOX_WEBHOOK_SECRET"])
136
+ except WebhookVerificationError:
137
+ return Response(status_code=400)
138
+ delivery_id = request.headers["x-scriptivox-delivery"] # the same on every retry: skip ones you have handled
139
+ if event["event"] == "transcription.completed":
140
+ print(event["transcription_id"], event["result"]["full_transcript"][:80])
141
+ elif event["event"] == "transcription.failed":
142
+ print(event["transcription_id"], event["error"]["code"])
143
+ return Response(status_code=200)
144
+ ```
145
+
146
+ Flask: `verify_webhook(request.get_data(), request.headers, secret)`. Django: `verify_webhook(request.body, request.headers, secret)`.
147
+
148
+ `client.test_webhook("https://your.server/scriptivox")` sends a signed `webhook.test` event and tells you what your server answered. `client.resend_webhook(job_id)` sends a finished job's final event again.
149
+
150
+ ## Errors
151
+
152
+ Every error extends `ScriptivoxError`. When the API answers with an error you get an `APIError` subclass named after its `error.code`, under a class for its HTTP status:
153
+
154
+ ```python
155
+ from scriptivox import APIError, PaymentRequiredError, RateLimitExceededError, ZeroBalanceError
156
+
157
+ try:
158
+ client.transcribe(url="https://example.com/a.mp3")
159
+ except ZeroBalanceError:
160
+ print("Add funds on the Billing page")
161
+ except RateLimitExceededError as e:
162
+ print("Too many jobs in progress:", e.error.get("in_flight"), "of", e.error.get("limit"))
163
+ except APIError as e:
164
+ print(e.status, e.code, e.message, e.request_id) # quote request_id to support
165
+ ```
166
+
167
+ | Class | When |
168
+ | --- | --- |
169
+ | `BadRequestError` (400): `InvalidRequestError`, `InvalidFilenameError`, `InvalidMediaFormatError`, … | The request is wrong; fix it, do not retry |
170
+ | `AuthenticationError` (401): `InvalidApiKeyError`, `ApiKeyRevokedError` | The key is missing, wrong or revoked |
171
+ | `PaymentRequiredError` (402): `InsufficientBalanceError`, `ZeroBalanceError` | Add balance |
172
+ | `NotFoundError` (404): `TranscriptionNotFoundError`, `UploadNotFoundError` | Wrong id |
173
+ | `ConflictError` (409), `IdempotencyKeyLockedError` | Not allowed in the job's current state |
174
+ | `RateLimitError` (429): `RateLimitExceededError` | Too many requests, or too many jobs in progress |
175
+ | `InternalServerError` (5xx), `ServiceUnavailableError` (503): `MaintenanceError` | Our side; safe to retry |
176
+ | `APIConnectionError`, `APITimeoutError` | No answer |
177
+ | `UploadFailedError` | The file upload itself failed |
178
+ | `TranscriptionFailedError` | `wait()`: the job ended failed |
179
+ | `WaitTimeoutError` | `wait()`: still running at the timeout |
180
+ | `WebhookVerificationError` | `verify_webhook()`: not a genuine, fresh webhook |
181
+
182
+ The full list of codes is in the [API reference](https://platform.scriptivox.com/docs/api-reference#error-codes).
183
+
184
+ ## Retries, timeouts and idempotency
185
+
186
+ - Requests that are safe to repeat (reads, deletes, cancels and submits with an `Idempotency-Key`) are retried up to 2 times after a dropped connection or a 5xx, waiting longer before each try (0.5 s, 1 s, 2 s, …).
187
+ - A `429` or `503` with `Retry-After` is retried after that many seconds, if it is 60 s or less. A `429` without `Retry-After` (the jobs-in-progress cap) is raised at once.
188
+ - `upload()` and `transcribe()` send a new random `Idempotency-Key` per call, reused on the SDK's own retries. Pass `idempotency_key=` (for example your own record id) to make a retry after a crash safe too.
189
+
190
+ ```python
191
+ client = Scriptivox(max_retries=4, timeout=30.0) # timeout per request, in seconds
192
+ ```
193
+
194
+ ## asyncio
195
+
196
+ ```python
197
+ import asyncio
198
+ from scriptivox import AsyncScriptivox
199
+
200
+ async def main():
201
+ async with AsyncScriptivox() as client:
202
+ job = await client.transcribe(file="meeting.mp3", language="en")
203
+ done = await client.wait(job["id"])
204
+ async for t in client.list(status="completed"):
205
+ print(t["id"])
206
+
207
+ asyncio.run(main())
208
+ ```
209
+
210
+ ## Configuration
211
+
212
+ | Setting | Argument | Environment variable | Default |
213
+ | --- | --- | --- | --- |
214
+ | API key | `api_key` | `SCRIPTIVOX_API_KEY` | none (required) |
215
+ | Base URL | `base_url` | `SCRIPTIVOX_BASE_URL` | `https://api.scriptivox.com` |
216
+ | Retries | `max_retries` | | 2 |
217
+ | Request timeout (s) | `timeout` | | 60 |
218
+ | Your own httpx client | `http_client` | | a new `httpx.Client` |
219
+
220
+ Responses are plain dicts, typed with `TypedDict`s generated from the [OpenAPI document](https://platform.scriptivox.com/openapi.json) (`scriptivox.Transcription`, `scriptivox.Balance`, …).
221
+
222
+ ## Development
223
+
224
+ ```bash
225
+ python scripts/generate.py # regenerate _types.py and _error_codes.py from openapi/openapi.json
226
+ python scripts/generate.py --fetch # refresh the snapshot from platform.scriptivox.com first
227
+ pip install -e '.[dev]' && pytest # unit tests, no network
228
+
229
+ # integration tests against a test deployment
230
+ SCRIPTIVOX_API_KEY=sk_live_... SCRIPTIVOX_BASE_URL=https://api-test.scriptivox.com pytest tests/test_integration.py
231
+ ```
232
+
233
+ ## License
234
+
235
+ MIT
@@ -0,0 +1,204 @@
1
+ # Scriptivox Python SDK
2
+
3
+ The official Python client for the [Scriptivox transcription API](https://platform.scriptivox.com/docs/quickstart). Upload a file or pass a link, wait for the transcript, export SRT, VTT or text, list your jobs and verify webhooks. Sync and asyncio clients, typed responses and one exception class per error code.
4
+
5
+ - Python 3.9 or newer. One dependency: [httpx](https://www.python-httpx.org/).
6
+ - Every submit carries an `Idempotency-Key`, so a retried call never starts a second job.
7
+ - Large files are streamed from disk, never read into memory.
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ pip install scriptivox
13
+ ```
14
+
15
+ ## Quickstart
16
+
17
+ Create an API key on the [API Keys page](https://platform.scriptivox.com/platform/keys) and add balance on the [Billing page](https://platform.scriptivox.com/platform/billing).
18
+
19
+ ```python
20
+ from scriptivox import Scriptivox
21
+
22
+ client = Scriptivox() # reads SCRIPTIVOX_API_KEY, or pass api_key="sk_live_..."
23
+
24
+ job = client.transcribe(file="meeting.mp3", language="en")
25
+ done = client.wait(job["id"])
26
+ print(done["result"]["full_transcript"])
27
+ ```
28
+
29
+ From a public link (direct file links, Google Drive, Dropbox and OneDrive share links):
30
+
31
+ ```python
32
+ job = client.transcribe(url="https://example.com/podcast.mp3", diarize=True, speaker_count=2)
33
+ ```
34
+
35
+ Pass `language` when you know it: it is faster and more accurate than auto-detection. Omit it to auto-detect.
36
+
37
+ ## Captions and plain text
38
+
39
+ ```python
40
+ srt = client.get(job["id"], format="srt", max_words=4)
41
+ vtt = client.get(job["id"], format="vtt", include_speakers=True)
42
+ text = client.get(job["id"], format="text", include_timestamps=True)
43
+ ```
44
+
45
+ `format="json"` (the default) returns the whole job. The caption options are `max_words`, `max_chars`, `max_duration`, `sentence_aware`, `include_speakers`, `strip_chars` and, for text, `include_timestamps`. See [caption export](https://platform.scriptivox.com/docs/api-reference#get-result).
46
+
47
+ ## Upload with progress
48
+
49
+ ```python
50
+ def show(p):
51
+ print(f"{p.percent:5.1f}% {p.loaded}/{p.total} bytes")
52
+
53
+ upload = client.upload("lecture.mp4", on_progress=show)
54
+ job = client.transcribe(upload_id=upload["upload_id"])
55
+ # or in one call:
56
+ job = client.transcribe(file="lecture.mp4", on_upload_progress=show)
57
+ ```
58
+
59
+ `file` can be a path, `bytes`, or a binary file object (`open(path, "rb")`). For bytes or a stream without a name, pass `filename="audio.mp3"`. A non-seekable stream also needs `size=`. Filenames are made ASCII-safe for you (`Réunion.mp3` is sent as `Reunion.mp3`).
60
+
61
+ ## Waiting
62
+
63
+ `wait(id)` polls until the job ends. It waits 2 s between polls at first, growing to 10 s, and honours `Retry-After` when rate-limited. It returns the completed job. A job that fails raises `TranscriptionFailedError`, whose `code` is the job's `error.code`:
64
+
65
+ ```python
66
+ from scriptivox import TranscriptionFailedError
67
+
68
+ try:
69
+ done = client.wait(job["id"], timeout=3600)
70
+ except TranscriptionFailedError as e:
71
+ print(e.code, e.transcription["error"]["message"]) # e.g. URL_NOT_ACCESSIBLE
72
+ ```
73
+
74
+ Failed and cancelled jobs cost nothing. Prefer webhooks to polling for long files.
75
+
76
+ ## Listing, cancelling, deleting, balance
77
+
78
+ ```python
79
+ for t in client.list(status="completed"): # follows the cursor page by page
80
+ print(t["id"], t["audio_duration_seconds"])
81
+
82
+ client.cancel(job_id) # before transcription starts; not charged
83
+ client.delete(job_id) # a finished job and its transcript
84
+ b = client.balance()
85
+ print(b["available_cents"], b["auto_topup"]["enabled"])
86
+ ```
87
+
88
+ `list()` takes `status`, `from_`, `to` (datetime or ISO string), `limit` (page size) and `order`. Items leave out `result`; `get(id)` has it.
89
+
90
+ ## Webhooks
91
+
92
+ Pass `webhook_url` when you submit, and check every request with `verify_webhook`. It needs the **raw** body, your key's webhook signing secret (`whsec_…`, on the API Keys page) and the request headers. It refuses a bad signature and a timestamp more than 5 minutes old.
93
+
94
+ ```python
95
+ import os
96
+ from fastapi import FastAPI, Request, Response
97
+ from scriptivox import verify_webhook, WebhookVerificationError
98
+
99
+ app = FastAPI()
100
+
101
+ @app.post("/scriptivox")
102
+ async def scriptivox_webhook(request: Request):
103
+ try:
104
+ event = verify_webhook(await request.body(), request.headers, os.environ["SCRIPTIVOX_WEBHOOK_SECRET"])
105
+ except WebhookVerificationError:
106
+ return Response(status_code=400)
107
+ delivery_id = request.headers["x-scriptivox-delivery"] # the same on every retry: skip ones you have handled
108
+ if event["event"] == "transcription.completed":
109
+ print(event["transcription_id"], event["result"]["full_transcript"][:80])
110
+ elif event["event"] == "transcription.failed":
111
+ print(event["transcription_id"], event["error"]["code"])
112
+ return Response(status_code=200)
113
+ ```
114
+
115
+ Flask: `verify_webhook(request.get_data(), request.headers, secret)`. Django: `verify_webhook(request.body, request.headers, secret)`.
116
+
117
+ `client.test_webhook("https://your.server/scriptivox")` sends a signed `webhook.test` event and tells you what your server answered. `client.resend_webhook(job_id)` sends a finished job's final event again.
118
+
119
+ ## Errors
120
+
121
+ Every error extends `ScriptivoxError`. When the API answers with an error you get an `APIError` subclass named after its `error.code`, under a class for its HTTP status:
122
+
123
+ ```python
124
+ from scriptivox import APIError, PaymentRequiredError, RateLimitExceededError, ZeroBalanceError
125
+
126
+ try:
127
+ client.transcribe(url="https://example.com/a.mp3")
128
+ except ZeroBalanceError:
129
+ print("Add funds on the Billing page")
130
+ except RateLimitExceededError as e:
131
+ print("Too many jobs in progress:", e.error.get("in_flight"), "of", e.error.get("limit"))
132
+ except APIError as e:
133
+ print(e.status, e.code, e.message, e.request_id) # quote request_id to support
134
+ ```
135
+
136
+ | Class | When |
137
+ | --- | --- |
138
+ | `BadRequestError` (400): `InvalidRequestError`, `InvalidFilenameError`, `InvalidMediaFormatError`, … | The request is wrong; fix it, do not retry |
139
+ | `AuthenticationError` (401): `InvalidApiKeyError`, `ApiKeyRevokedError` | The key is missing, wrong or revoked |
140
+ | `PaymentRequiredError` (402): `InsufficientBalanceError`, `ZeroBalanceError` | Add balance |
141
+ | `NotFoundError` (404): `TranscriptionNotFoundError`, `UploadNotFoundError` | Wrong id |
142
+ | `ConflictError` (409), `IdempotencyKeyLockedError` | Not allowed in the job's current state |
143
+ | `RateLimitError` (429): `RateLimitExceededError` | Too many requests, or too many jobs in progress |
144
+ | `InternalServerError` (5xx), `ServiceUnavailableError` (503): `MaintenanceError` | Our side; safe to retry |
145
+ | `APIConnectionError`, `APITimeoutError` | No answer |
146
+ | `UploadFailedError` | The file upload itself failed |
147
+ | `TranscriptionFailedError` | `wait()`: the job ended failed |
148
+ | `WaitTimeoutError` | `wait()`: still running at the timeout |
149
+ | `WebhookVerificationError` | `verify_webhook()`: not a genuine, fresh webhook |
150
+
151
+ The full list of codes is in the [API reference](https://platform.scriptivox.com/docs/api-reference#error-codes).
152
+
153
+ ## Retries, timeouts and idempotency
154
+
155
+ - Requests that are safe to repeat (reads, deletes, cancels and submits with an `Idempotency-Key`) are retried up to 2 times after a dropped connection or a 5xx, waiting longer before each try (0.5 s, 1 s, 2 s, …).
156
+ - A `429` or `503` with `Retry-After` is retried after that many seconds, if it is 60 s or less. A `429` without `Retry-After` (the jobs-in-progress cap) is raised at once.
157
+ - `upload()` and `transcribe()` send a new random `Idempotency-Key` per call, reused on the SDK's own retries. Pass `idempotency_key=` (for example your own record id) to make a retry after a crash safe too.
158
+
159
+ ```python
160
+ client = Scriptivox(max_retries=4, timeout=30.0) # timeout per request, in seconds
161
+ ```
162
+
163
+ ## asyncio
164
+
165
+ ```python
166
+ import asyncio
167
+ from scriptivox import AsyncScriptivox
168
+
169
+ async def main():
170
+ async with AsyncScriptivox() as client:
171
+ job = await client.transcribe(file="meeting.mp3", language="en")
172
+ done = await client.wait(job["id"])
173
+ async for t in client.list(status="completed"):
174
+ print(t["id"])
175
+
176
+ asyncio.run(main())
177
+ ```
178
+
179
+ ## Configuration
180
+
181
+ | Setting | Argument | Environment variable | Default |
182
+ | --- | --- | --- | --- |
183
+ | API key | `api_key` | `SCRIPTIVOX_API_KEY` | none (required) |
184
+ | Base URL | `base_url` | `SCRIPTIVOX_BASE_URL` | `https://api.scriptivox.com` |
185
+ | Retries | `max_retries` | | 2 |
186
+ | Request timeout (s) | `timeout` | | 60 |
187
+ | Your own httpx client | `http_client` | | a new `httpx.Client` |
188
+
189
+ Responses are plain dicts, typed with `TypedDict`s generated from the [OpenAPI document](https://platform.scriptivox.com/openapi.json) (`scriptivox.Transcription`, `scriptivox.Balance`, …).
190
+
191
+ ## Development
192
+
193
+ ```bash
194
+ python scripts/generate.py # regenerate _types.py and _error_codes.py from openapi/openapi.json
195
+ python scripts/generate.py --fetch # refresh the snapshot from platform.scriptivox.com first
196
+ pip install -e '.[dev]' && pytest # unit tests, no network
197
+
198
+ # integration tests against a test deployment
199
+ SCRIPTIVOX_API_KEY=sk_live_... SCRIPTIVOX_BASE_URL=https://api-test.scriptivox.com pytest tests/test_integration.py
200
+ ```
201
+
202
+ ## License
203
+
204
+ MIT