deapi-sdk 0.6.1__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.
- deapi_sdk-0.6.1/.gitignore +83 -0
- deapi_sdk-0.6.1/CHANGELOG.md +39 -0
- deapi_sdk-0.6.1/LICENSE +21 -0
- deapi_sdk-0.6.1/PKG-INFO +644 -0
- deapi_sdk-0.6.1/README.md +609 -0
- deapi_sdk-0.6.1/docs/api-reference.md +853 -0
- deapi_sdk-0.6.1/examples/async_batch.py +54 -0
- deapi_sdk-0.6.1/examples/basic_image.py +79 -0
- deapi_sdk-0.6.1/examples/error_handling.py +171 -0
- deapi_sdk-0.6.1/examples/realtime_status.py +56 -0
- deapi_sdk-0.6.1/examples/transcription.py +79 -0
- deapi_sdk-0.6.1/examples/tts_and_audio.py +91 -0
- deapi_sdk-0.6.1/examples/video_generation.py +123 -0
- deapi_sdk-0.6.1/examples/webhook_server.py +101 -0
- deapi_sdk-0.6.1/pyproject.toml +77 -0
- deapi_sdk-0.6.1/src/deapi_sdk/__init__.py +409 -0
- deapi_sdk-0.6.1/src/deapi_sdk/_cards.py +313 -0
- deapi_sdk-0.6.1/src/deapi_sdk/_client.py +411 -0
- deapi_sdk-0.6.1/src/deapi_sdk/_config.py +77 -0
- deapi_sdk-0.6.1/src/deapi_sdk/_constants.py +61 -0
- deapi_sdk-0.6.1/src/deapi_sdk/_download.py +37 -0
- deapi_sdk-0.6.1/src/deapi_sdk/_exceptions.py +184 -0
- deapi_sdk-0.6.1/src/deapi_sdk/_files.py +59 -0
- deapi_sdk-0.6.1/src/deapi_sdk/_payload.py +50 -0
- deapi_sdk-0.6.1/src/deapi_sdk/_polling.py +157 -0
- deapi_sdk-0.6.1/src/deapi_sdk/_realtime/__init__.py +7 -0
- deapi_sdk-0.6.1/src/deapi_sdk/_realtime/_discovery.py +43 -0
- deapi_sdk-0.6.1/src/deapi_sdk/_realtime/_engine.py +419 -0
- deapi_sdk-0.6.1/src/deapi_sdk/_realtime/_protocol.py +152 -0
- deapi_sdk-0.6.1/src/deapi_sdk/_realtime/_session.py +529 -0
- deapi_sdk-0.6.1/src/deapi_sdk/_types.py +31 -0
- deapi_sdk-0.6.1/src/deapi_sdk/_version.py +3 -0
- deapi_sdk-0.6.1/src/deapi_sdk/py.typed +0 -0
- deapi_sdk-0.6.1/src/deapi_sdk/resources/__init__.py +35 -0
- deapi_sdk-0.6.1/src/deapi_sdk/resources/account.py +149 -0
- deapi_sdk-0.6.1/src/deapi_sdk/resources/audio.py +386 -0
- deapi_sdk-0.6.1/src/deapi_sdk/resources/embeddings.py +116 -0
- deapi_sdk-0.6.1/src/deapi_sdk/resources/images.py +616 -0
- deapi_sdk-0.6.1/src/deapi_sdk/resources/keys.py +277 -0
- deapi_sdk-0.6.1/src/deapi_sdk/resources/models.py +161 -0
- deapi_sdk-0.6.1/src/deapi_sdk/resources/ocr.py +152 -0
- deapi_sdk-0.6.1/src/deapi_sdk/resources/prompts.py +137 -0
- deapi_sdk-0.6.1/src/deapi_sdk/resources/transcription.py +308 -0
- deapi_sdk-0.6.1/src/deapi_sdk/resources/video.py +985 -0
- deapi_sdk-0.6.1/src/deapi_sdk/transcript.py +142 -0
- deapi_sdk-0.6.1/src/deapi_sdk/types/__init__.py +68 -0
- deapi_sdk-0.6.1/src/deapi_sdk/types/account.py +115 -0
- deapi_sdk-0.6.1/src/deapi_sdk/types/audio.py +35 -0
- deapi_sdk-0.6.1/src/deapi_sdk/types/common.py +174 -0
- deapi_sdk-0.6.1/src/deapi_sdk/types/embeddings.py +11 -0
- deapi_sdk-0.6.1/src/deapi_sdk/types/images.py +40 -0
- deapi_sdk-0.6.1/src/deapi_sdk/types/keys.py +53 -0
- deapi_sdk-0.6.1/src/deapi_sdk/types/ocr.py +14 -0
- deapi_sdk-0.6.1/src/deapi_sdk/types/prompts.py +26 -0
- deapi_sdk-0.6.1/src/deapi_sdk/types/transcription.py +14 -0
- deapi_sdk-0.6.1/src/deapi_sdk/types/video.py +84 -0
- deapi_sdk-0.6.1/src/deapi_sdk/types/websocket.py +36 -0
- deapi_sdk-0.6.1/src/deapi_sdk/webhook.py +159 -0
- deapi_sdk-0.6.1/tests/__init__.py +0 -0
- deapi_sdk-0.6.1/tests/conftest.py +22 -0
- deapi_sdk-0.6.1/tests/fake_pusher.py +241 -0
- deapi_sdk-0.6.1/tests/test_account_keys.py +210 -0
- deapi_sdk-0.6.1/tests/test_audio.py +190 -0
- deapi_sdk-0.6.1/tests/test_card_defaults.py +484 -0
- deapi_sdk-0.6.1/tests/test_client.py +362 -0
- deapi_sdk-0.6.1/tests/test_embeddings.py +114 -0
- deapi_sdk-0.6.1/tests/test_errors.py +379 -0
- deapi_sdk-0.6.1/tests/test_exceptions.py +92 -0
- deapi_sdk-0.6.1/tests/test_fake_pusher.py +149 -0
- deapi_sdk-0.6.1/tests/test_files.py +53 -0
- deapi_sdk-0.6.1/tests/test_images.py +303 -0
- deapi_sdk-0.6.1/tests/test_integration.py +326 -0
- deapi_sdk-0.6.1/tests/test_media_v2.py +402 -0
- deapi_sdk-0.6.1/tests/test_models.py +185 -0
- deapi_sdk-0.6.1/tests/test_ocr.py +123 -0
- deapi_sdk-0.6.1/tests/test_polling.py +206 -0
- deapi_sdk-0.6.1/tests/test_realtime.py +1394 -0
- deapi_sdk-0.6.1/tests/test_realtime_protocol.py +242 -0
- deapi_sdk-0.6.1/tests/test_request_files.py +61 -0
- deapi_sdk-0.6.1/tests/test_transcript.py +320 -0
- deapi_sdk-0.6.1/tests/test_transcription.py +105 -0
- deapi_sdk-0.6.1/tests/test_v2.py +360 -0
- deapi_sdk-0.6.1/tests/test_video.py +409 -0
- deapi_sdk-0.6.1/tests/test_video_v2.py +381 -0
- deapi_sdk-0.6.1/tests/test_webhook.py +275 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
|
|
8
|
+
# Virtual environments
|
|
9
|
+
env/
|
|
10
|
+
venv/
|
|
11
|
+
ENV/
|
|
12
|
+
env.bak/
|
|
13
|
+
venv.bak/
|
|
14
|
+
.venv
|
|
15
|
+
|
|
16
|
+
# Distribution / packaging
|
|
17
|
+
dist/
|
|
18
|
+
build/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
.eggs/
|
|
21
|
+
*.egg
|
|
22
|
+
|
|
23
|
+
# PyInstaller
|
|
24
|
+
*.manifest
|
|
25
|
+
*.spec
|
|
26
|
+
|
|
27
|
+
# Testing
|
|
28
|
+
.pytest_cache/
|
|
29
|
+
.coverage
|
|
30
|
+
.coverage.*
|
|
31
|
+
htmlcov/
|
|
32
|
+
.tox/
|
|
33
|
+
.nox/
|
|
34
|
+
coverage.xml
|
|
35
|
+
*.cover
|
|
36
|
+
.hypothesis/
|
|
37
|
+
|
|
38
|
+
# IDE
|
|
39
|
+
.vscode/
|
|
40
|
+
.idea/
|
|
41
|
+
*.swp
|
|
42
|
+
*.swo
|
|
43
|
+
*~
|
|
44
|
+
.DS_Store
|
|
45
|
+
Thumbs.db
|
|
46
|
+
|
|
47
|
+
# Environment variables
|
|
48
|
+
.env
|
|
49
|
+
.env.*
|
|
50
|
+
!.env.example
|
|
51
|
+
|
|
52
|
+
# Logs
|
|
53
|
+
*.log
|
|
54
|
+
logs/
|
|
55
|
+
|
|
56
|
+
# Database
|
|
57
|
+
*.db
|
|
58
|
+
*.sqlite
|
|
59
|
+
*.sqlite3
|
|
60
|
+
|
|
61
|
+
# Jupyter Notebook
|
|
62
|
+
.ipynb_checkpoints
|
|
63
|
+
|
|
64
|
+
# mypy
|
|
65
|
+
.mypy_cache/
|
|
66
|
+
.dmypy.json
|
|
67
|
+
dmypy.json
|
|
68
|
+
|
|
69
|
+
# Pyre type checker
|
|
70
|
+
.pyre/
|
|
71
|
+
|
|
72
|
+
# pytype static type analyzer
|
|
73
|
+
.pytype/
|
|
74
|
+
|
|
75
|
+
# Rope project settings
|
|
76
|
+
.ropeproject
|
|
77
|
+
|
|
78
|
+
# Ruff
|
|
79
|
+
.ruff_cache/
|
|
80
|
+
|
|
81
|
+
# Claude Code local settings
|
|
82
|
+
.claude/
|
|
83
|
+
CLAUDE.md
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
Versions follow [Semantic Versioning](https://semver.org/) (pre-1.0: minor versions may contain breaking changes).
|
|
5
|
+
|
|
6
|
+
## [0.6.1] - 2026-11-19
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- Published on PyPI: `pip install deapi-sdk` (`pip install "deapi-sdk[ws]"` for real-time status).
|
|
11
|
+
Releases are uploaded by GitHub Actions when a GitHub Release is published.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- README links are absolute, so they also work on the PyPI project page.
|
|
16
|
+
- The product name is spelled deAPI throughout the docs and docstrings.
|
|
17
|
+
|
|
18
|
+
## [0.6.0] - 2026-11-19
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- `client.websocket_config()` (sync and async) returns the account's realtime connection settings
|
|
23
|
+
(`GET /websocket`) as the new `WebSocketConfig` / `WebSocketConnection` models. Works with any API key.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- `client.realtime()` no longer needs any settings. `client_id`, `ws_url` and `app_key` are each taken
|
|
28
|
+
from the argument, then `DEAPI_CLIENT_ID` / `DEAPI_WS_URL` / `DEAPI_WS_APP_KEY`, then `GET /websocket`.
|
|
29
|
+
The discovery call is made once at connect time and only when something is still missing; with all
|
|
30
|
+
three set, no extra request is made.
|
|
31
|
+
- Setting only `DEAPI_CLIENT_ID` now triggers one `GET /websocket` call at connect time instead of
|
|
32
|
+
falling back to built-in WebSocket defaults. The hard-coded WebSocket URL and app key were removed.
|
|
33
|
+
- `Realtime.client_id` / `AsyncRealtime.client_id` is now `str | None`: `None` until connect when it was
|
|
34
|
+
neither passed nor set in the environment.
|
|
35
|
+
- An unusable discovery response raises `RealtimeError`; HTTP errors from it raise the usual API exceptions.
|
|
36
|
+
|
|
37
|
+
## Earlier releases
|
|
38
|
+
|
|
39
|
+
See the [tags](https://github.com/deapi-ai/deapi-python-sdk/tags) for 0.5.2 and older.
|
deapi_sdk-0.6.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 deAPI Team
|
|
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.
|