unpod 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.
Files changed (125) hide show
  1. unpod-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +22 -0
  2. unpod-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +10 -0
  3. unpod-0.1.0/.github/workflows/ci.yml +37 -0
  4. unpod-0.1.0/.gitignore +27 -0
  5. unpod-0.1.0/CONTRIBUTING.md +40 -0
  6. unpod-0.1.0/LICENSE +202 -0
  7. unpod-0.1.0/PKG-INFO +133 -0
  8. unpod-0.1.0/README.md +94 -0
  9. unpod-0.1.0/SECURITY.md +28 -0
  10. unpod-0.1.0/Taskfile.yml +253 -0
  11. unpod-0.1.0/docs/00-overview.md +140 -0
  12. unpod-0.1.0/docs/01-architecture.md +244 -0
  13. unpod-0.1.0/docs/02-management-sdk.md +476 -0
  14. unpod-0.1.0/docs/03-connectivity-sdk.md +392 -0
  15. unpod-0.1.0/docs/04-adapters.md +283 -0
  16. unpod-0.1.0/docs/05-quickstart.md +198 -0
  17. unpod-0.1.0/docs/06-browser-quickstart.md +119 -0
  18. unpod-0.1.0/examples/browser_agent.py +156 -0
  19. unpod-0.1.0/examples/browser_playground/.env.example +20 -0
  20. unpod-0.1.0/examples/browser_playground/.gitignore +5 -0
  21. unpod-0.1.0/examples/browser_playground/README.md +71 -0
  22. unpod-0.1.0/examples/browser_playground/_urls.py +23 -0
  23. unpod-0.1.0/examples/browser_playground/agent.py +125 -0
  24. unpod-0.1.0/examples/browser_playground/pipe-ui/.gitignore +8 -0
  25. unpod-0.1.0/examples/browser_playground/pipe-ui/index.html +32 -0
  26. unpod-0.1.0/examples/browser_playground/pipe-ui/package-lock.json +1617 -0
  27. unpod-0.1.0/examples/browser_playground/pipe-ui/package.json +20 -0
  28. unpod-0.1.0/examples/browser_playground/pipe-ui/src/app.ts +246 -0
  29. unpod-0.1.0/examples/browser_playground/pipe-ui/src/style.css +182 -0
  30. unpod-0.1.0/examples/browser_playground/pipe-ui/tsconfig.json +16 -0
  31. unpod-0.1.0/examples/browser_playground/pipe-ui/vite.config.ts +13 -0
  32. unpod-0.1.0/examples/browser_playground/run.py +120 -0
  33. unpod-0.1.0/examples/full_agent_setup.py +218 -0
  34. unpod-0.1.0/playground/README.md +93 -0
  35. unpod-0.1.0/playground/__init__.py +1 -0
  36. unpod-0.1.0/playground/agents/__init__.py +5 -0
  37. unpod-0.1.0/playground/agents/catalog.py +39 -0
  38. unpod-0.1.0/playground/agents/faq_bot.py +21 -0
  39. unpod-0.1.0/playground/harness/__init__.py +5 -0
  40. unpod-0.1.0/playground/harness/api.py +166 -0
  41. unpod-0.1.0/playground/harness/control.py +71 -0
  42. unpod-0.1.0/playground/harness/events.py +42 -0
  43. unpod-0.1.0/playground/harness/provisioning.py +17 -0
  44. unpod-0.1.0/playground/harness/runner.py +97 -0
  45. unpod-0.1.0/playground/run.py +38 -0
  46. unpod-0.1.0/playground/web/.gitignore +2 -0
  47. unpod-0.1.0/playground/web/index.html +12 -0
  48. unpod-0.1.0/playground/web/src/client/SupervoiceClient.ts +91 -0
  49. unpod-0.1.0/playground/web/src/components/ConnectButton.tsx +28 -0
  50. unpod-0.1.0/playground/web/src/components/TranscriptView.tsx +25 -0
  51. unpod-0.1.0/playground/web/src/main.tsx +11 -0
  52. unpod-0.1.0/playground/web/src/pages/AgentView.tsx +88 -0
  53. unpod-0.1.0/playground/web/src/style.css +120 -0
  54. unpod-0.1.0/playground/web/src/transport/SupervoiceWSTransport.ts +82 -0
  55. unpod-0.1.0/playground/web/src/transport/Transport.ts +27 -0
  56. unpod-0.1.0/playground/web/src/transport/audio.ts +111 -0
  57. unpod-0.1.0/playground/web/src/transport/protobuf.ts +190 -0
  58. unpod-0.1.0/playground/web/vite.config.ts +18 -0
  59. unpod-0.1.0/pyproject.toml +58 -0
  60. unpod-0.1.0/src/unpod/__init__.py +14 -0
  61. unpod-0.1.0/src/unpod/_base_url.py +61 -0
  62. unpod-0.1.0/src/unpod/_protocol.py +310 -0
  63. unpod-0.1.0/src/unpod/adapters/__init__.py +19 -0
  64. unpod-0.1.0/src/unpod/adapters/anthropic.py +76 -0
  65. unpod-0.1.0/src/unpod/adapters/base.py +33 -0
  66. unpod-0.1.0/src/unpod/adapters/http.py +48 -0
  67. unpod-0.1.0/src/unpod/adapters/langchain.py +52 -0
  68. unpod-0.1.0/src/unpod/adapters/mcp.py +60 -0
  69. unpod-0.1.0/src/unpod/adapters/openai.py +64 -0
  70. unpod-0.1.0/src/unpod/adapters/superdialog.py +50 -0
  71. unpod-0.1.0/src/unpod/client.py +159 -0
  72. unpod-0.1.0/src/unpod/connectivity/__init__.py +16 -0
  73. unpod-0.1.0/src/unpod/connectivity/bridge.py +159 -0
  74. unpod-0.1.0/src/unpod/connectivity/bridge_auth.py +156 -0
  75. unpod-0.1.0/src/unpod/connectivity/bridge_server.py +206 -0
  76. unpod-0.1.0/src/unpod/connectivity/call_context.py +25 -0
  77. unpod-0.1.0/src/unpod/connectivity/hooks.py +52 -0
  78. unpod-0.1.0/src/unpod/connectivity/metrics.py +92 -0
  79. unpod-0.1.0/src/unpod/connectivity/runner.py +272 -0
  80. unpod-0.1.0/src/unpod/connectivity/session.py +187 -0
  81. unpod-0.1.0/src/unpod/management/__init__.py +1 -0
  82. unpod-0.1.0/src/unpod/management/_http.py +93 -0
  83. unpod-0.1.0/src/unpod/management/api_keys.py +44 -0
  84. unpod-0.1.0/src/unpod/management/calls.py +70 -0
  85. unpod-0.1.0/src/unpod/management/numbers.py +75 -0
  86. unpod-0.1.0/src/unpod/management/pipes.py +58 -0
  87. unpod-0.1.0/src/unpod/management/recordings.py +19 -0
  88. unpod-0.1.0/src/unpod/management/sessions.py +104 -0
  89. unpod-0.1.0/src/unpod/management/transcripts.py +25 -0
  90. unpod-0.1.0/src/unpod/management/trunks.py +31 -0
  91. unpod-0.1.0/src/unpod/management/voice_profiles.py +24 -0
  92. unpod-0.1.0/src/unpod/models/__init__.py +59 -0
  93. unpod-0.1.0/src/unpod/models/api_key.py +25 -0
  94. unpod-0.1.0/src/unpod/models/call.py +63 -0
  95. unpod-0.1.0/src/unpod/models/number.py +42 -0
  96. unpod-0.1.0/src/unpod/models/orchestrator_session.py +63 -0
  97. unpod-0.1.0/src/unpod/models/pipe.py +58 -0
  98. unpod-0.1.0/src/unpod/models/recording.py +22 -0
  99. unpod-0.1.0/src/unpod/models/session.py +93 -0
  100. unpod-0.1.0/src/unpod/models/transcript.py +37 -0
  101. unpod-0.1.0/src/unpod/models/trunk.py +43 -0
  102. unpod-0.1.0/src/unpod/models/voice_profile.py +59 -0
  103. unpod-0.1.0/src/unpod/py.typed +0 -0
  104. unpod-0.1.0/tests/__init__.py +0 -0
  105. unpod-0.1.0/tests/examples/__init__.py +0 -0
  106. unpod-0.1.0/tests/examples/test_browser_playground.py +116 -0
  107. unpod-0.1.0/tests/test_adapters.py +88 -0
  108. unpod-0.1.0/tests/test_adapters_http.py +79 -0
  109. unpod-0.1.0/tests/test_adapters_langchain.py +106 -0
  110. unpod-0.1.0/tests/test_adapters_mcp.py +56 -0
  111. unpod-0.1.0/tests/test_base_url.py +123 -0
  112. unpod-0.1.0/tests/test_bridge.py +127 -0
  113. unpod-0.1.0/tests/test_bridge_auth.py +224 -0
  114. unpod-0.1.0/tests/test_bridge_server.py +241 -0
  115. unpod-0.1.0/tests/test_contracts.py +75 -0
  116. unpod-0.1.0/tests/test_hooks.py +127 -0
  117. unpod-0.1.0/tests/test_http.py +59 -0
  118. unpod-0.1.0/tests/test_integration.py +135 -0
  119. unpod-0.1.0/tests/test_management.py +413 -0
  120. unpod-0.1.0/tests/test_models.py +202 -0
  121. unpod-0.1.0/tests/test_playground_harness.py +142 -0
  122. unpod-0.1.0/tests/test_protocol.py +173 -0
  123. unpod-0.1.0/tests/test_runner.py +568 -0
  124. unpod-0.1.0/tests/test_session.py +243 -0
  125. unpod-0.1.0/uv.lock +3191 -0
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: Bug report
3
+ about: Report a problem with the Unpod Python SDK
4
+ labels: bug
5
+ ---
6
+
7
+ **Describe the bug**
8
+ A clear description of what went wrong.
9
+
10
+ **To reproduce**
11
+ A minimal code sample or steps that trigger the issue.
12
+
13
+ **Expected behavior**
14
+ What you expected to happen.
15
+
16
+ **Environment**
17
+ - `unpod` version:
18
+ - Python version:
19
+ - OS:
20
+
21
+ **Additional context**
22
+ Logs, tracebacks, or anything else relevant. Do not include API keys or secrets.
@@ -0,0 +1,10 @@
1
+ ## What & why
2
+
3
+ <!-- What does this change do, and why? Link any related issue. -->
4
+
5
+ ## Checklist
6
+
7
+ - [ ] Tests added/updated for the change
8
+ - [ ] `uv run ruff check .` passes
9
+ - [ ] `uv run ruff format --check .` passes
10
+ - [ ] `uv run pytest -q` passes
@@ -0,0 +1,37 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ test:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Install uv
20
+ uses: astral-sh/setup-uv@v5
21
+ with:
22
+ enable-cache: true
23
+
24
+ - name: Set up Python
25
+ run: uv python install 3.12
26
+
27
+ - name: Install dependencies
28
+ run: uv sync --extra dev
29
+
30
+ - name: Lint (ruff)
31
+ run: uv run ruff check .
32
+
33
+ - name: Format check (ruff)
34
+ run: uv run ruff format --check .
35
+
36
+ - name: Test (pytest)
37
+ run: uv run pytest -q
unpod-0.1.0/.gitignore ADDED
@@ -0,0 +1,27 @@
1
+ # Environments
2
+ .env
3
+ .env.*
4
+ !.env.example
5
+ .venv/
6
+ venv/
7
+
8
+ # Python
9
+ __pycache__/
10
+ *.py[cod]
11
+ *.egg-info/
12
+ build/
13
+ dist/
14
+
15
+ # Tooling caches
16
+ .pytest_cache/
17
+ .ruff_cache/
18
+ .mypy_cache/
19
+ .pyrefly/
20
+
21
+ # Editors / OS
22
+ .DS_Store
23
+ .idea/
24
+ .vscode/
25
+
26
+ # Node (browser examples / playground web UI)
27
+ node_modules/
@@ -0,0 +1,40 @@
1
+ # Contributing to the Unpod Python SDK
2
+
3
+ Thanks for your interest in improving the Unpod Python SDK. This guide covers
4
+ the basics for getting set up and submitting changes.
5
+
6
+ ## Development setup
7
+
8
+ The project uses [uv](https://docs.astral.sh/uv/) for dependency management.
9
+
10
+ ```bash
11
+ git clone https://github.com/unpod-ai/unpod-python-sdk
12
+ cd unpod-python-sdk
13
+ uv sync --extra dev
14
+ ```
15
+
16
+ ## Before you open a pull request
17
+
18
+ Run the same checks CI runs:
19
+
20
+ ```bash
21
+ uv run ruff check . # lint
22
+ uv run ruff format --check . # formatting
23
+ uv run pytest -q # tests
24
+ ```
25
+
26
+ - Add tests for new behavior and bug fixes.
27
+ - Keep changes focused; one logical change per pull request.
28
+ - Follow the existing code style (PEP 8, type hints, 88-char lines).
29
+ - Public APIs need docstrings.
30
+
31
+ ## Reporting bugs and requesting features
32
+
33
+ Open an issue with a clear description and, for bugs, a minimal reproduction.
34
+ For anything security-related, see [SECURITY.md](SECURITY.md) instead of
35
+ opening a public issue.
36
+
37
+ ## License
38
+
39
+ By contributing, you agree that your contributions are licensed under the
40
+ project's [Apache-2.0](LICENSE) license.
unpod-0.1.0/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
unpod-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,133 @@
1
+ Metadata-Version: 2.4
2
+ Name: unpod
3
+ Version: 0.1.0
4
+ Summary: Developer SDK for Unpod voice infrastructure — management + connectivity + adapters.
5
+ Project-URL: Homepage, https://github.com/unpod-ai/unpod-python-sdk
6
+ Project-URL: Repository, https://github.com/unpod-ai/unpod-python-sdk
7
+ Author-email: Unpod <parvinder@unpod.ai>
8
+ License: Apache-2.0
9
+ License-File: LICENSE
10
+ Requires-Python: >=3.12
11
+ Requires-Dist: httpx>=0.27
12
+ Requires-Dist: pydantic>=2.5
13
+ Requires-Dist: python-dotenv>=1.2.2
14
+ Requires-Dist: typing-extensions>=4.10
15
+ Requires-Dist: websockets>=13
16
+ Provides-Extra: dev
17
+ Requires-Dist: anyio>=4; extra == 'dev'
18
+ Requires-Dist: fastapi>=0.115; extra == 'dev'
19
+ Requires-Dist: loguru>=0.7; extra == 'dev'
20
+ Requires-Dist: pyrefly>=0.1; extra == 'dev'
21
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
22
+ Requires-Dist: pytest>=8; extra == 'dev'
23
+ Requires-Dist: ruff>=0.4; extra == 'dev'
24
+ Requires-Dist: superdialog>=0.1.0a1; extra == 'dev'
25
+ Requires-Dist: uvicorn[standard]>=0.32; extra == 'dev'
26
+ Provides-Extra: dialog
27
+ Requires-Dist: superdialog>=0.1.0a1; extra == 'dialog'
28
+ Provides-Extra: langchain
29
+ Requires-Dist: langchain-core>=0.3; extra == 'langchain'
30
+ Provides-Extra: mcp
31
+ Requires-Dist: mcp>=0.9; extra == 'mcp'
32
+ Provides-Extra: playground
33
+ Requires-Dist: fastapi>=0.115; extra == 'playground'
34
+ Requires-Dist: livekit-agents<2,>=1.0; extra == 'playground'
35
+ Requires-Dist: loguru>=0.7; extra == 'playground'
36
+ Requires-Dist: superdialog>=0.1.0a1; extra == 'playground'
37
+ Requires-Dist: uvicorn[standard]>=0.32; extra == 'playground'
38
+ Description-Content-Type: text/markdown
39
+
40
+ # Unpod Python SDK
41
+
42
+ Developer SDK for [Unpod](https://unpod.ai) voice infrastructure — management, connectivity, and adapters for building voice agents that talk over real phone calls, browsers, and WebRTC.
43
+
44
+ **Single architectural commitment:** the wire between Unpod infrastructure and your code carries **text, not audio**. You bring the brain; Unpod brings the voice.
45
+
46
+ ## Installation
47
+
48
+ ```bash
49
+ pip install unpod
50
+
51
+ # With superdialog integration (recommended)
52
+ pip install "unpod[dialog]"
53
+
54
+ # With LangChain adapter
55
+ pip install "unpod[langchain]"
56
+
57
+ # With MCP adapter
58
+ pip install "unpod[mcp]"
59
+ ```
60
+
61
+ Or with [uv](https://docs.astral.sh/uv/): `uv add unpod` (extras: `uv add "unpod[dialog]"`).
62
+
63
+ To install the latest unreleased code from source:
64
+
65
+ ```bash
66
+ pip install "unpod @ git+https://github.com/unpod-ai/unpod-python-sdk"
67
+ ```
68
+
69
+ ## What's Inside
70
+
71
+ ```
72
+ unpod
73
+ ├── Management SDK (REST) numbers, voice profiles, speech pipes, calls,
74
+ │ sessions, trunks, recordings, transcripts, api keys
75
+ ├── Connectivity SDK (WSS) AgentRunner, Session, CallContext, hooks
76
+ └── Adapters superdialog, LangChain, OpenAI, Anthropic, HTTP, MCP
77
+ ```
78
+
79
+ - **Management SDK** — CRUD against the Unpod Control Plane: purchase numbers, browse voice profiles, bind Speech Pipes, trigger and inspect calls.
80
+ - **Connectivity SDK** — runtime for live calls: a long-lived `AgentRunner` receives plain-text turns over WSS and dispatches them to your agent, regardless of transport (phone, browser, WebRTC).
81
+ - **Adapters** — plug any brain into a call: `superdialog` dialog machines, LangChain runnables, your own HTTP endpoint, or an MCP server.
82
+
83
+ ## Quick Example
84
+
85
+ ```python
86
+ from unpod import AsyncClient, AgentRunner, CallContext
87
+
88
+ client = AsyncClient() # reads UNPOD_API_KEY from env
89
+
90
+ # Management: pick a voice, bind a Speech Pipe to your agent
91
+ profiles = await client.voice_profiles.list(language="en")
92
+ pipe = await client.pipes.create(
93
+ name="support-line",
94
+ voice_profile=profiles[0].id,
95
+ agent_id="my-voice-agent",
96
+ )
97
+
98
+
99
+ # Connectivity: handle every live call with your own logic
100
+ async def entrypoint(ctx: CallContext) -> None:
101
+ await ctx.session.say("Hi! How can I help you today?")
102
+ await ctx.session.run()
103
+
104
+
105
+ AgentRunner(entrypoint=entrypoint, agent_id="my-voice-agent").start()
106
+ ```
107
+
108
+ ## Documentation
109
+
110
+ | Guide | What it covers |
111
+ |---|---|
112
+ | [Overview](docs/00-overview.md) | What Unpod owns vs what you own, the three layers |
113
+ | [Architecture](docs/01-architecture.md) | Package structure, data flow, protocol details |
114
+ | [Management SDK](docs/02-management-sdk.md) | REST client API reference |
115
+ | [Connectivity SDK](docs/03-connectivity-sdk.md) | AgentRunner, Session, hooks, controls |
116
+ | [Adapters](docs/04-adapters.md) | DialogAdapter protocol and bundled adapters |
117
+ | [Quickstart](docs/05-quickstart.md) | 10 steps to your first phone call |
118
+ | [Browser Quickstart](docs/06-browser-quickstart.md) | Test in Chrome, no phone number needed |
119
+
120
+ Full platform documentation: [docs.unpod.ai](https://docs.unpod.ai)
121
+
122
+ ## Development
123
+
124
+ ```bash
125
+ git clone https://github.com/unpod-ai/unpod-python-sdk
126
+ cd unpod-python-sdk
127
+ uv sync --extra dev
128
+ uv run pytest
129
+ ```
130
+
131
+ ## License
132
+
133
+ [Apache-2.0](LICENSE)
unpod-0.1.0/README.md ADDED
@@ -0,0 +1,94 @@
1
+ # Unpod Python SDK
2
+
3
+ Developer SDK for [Unpod](https://unpod.ai) voice infrastructure — management, connectivity, and adapters for building voice agents that talk over real phone calls, browsers, and WebRTC.
4
+
5
+ **Single architectural commitment:** the wire between Unpod infrastructure and your code carries **text, not audio**. You bring the brain; Unpod brings the voice.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ pip install unpod
11
+
12
+ # With superdialog integration (recommended)
13
+ pip install "unpod[dialog]"
14
+
15
+ # With LangChain adapter
16
+ pip install "unpod[langchain]"
17
+
18
+ # With MCP adapter
19
+ pip install "unpod[mcp]"
20
+ ```
21
+
22
+ Or with [uv](https://docs.astral.sh/uv/): `uv add unpod` (extras: `uv add "unpod[dialog]"`).
23
+
24
+ To install the latest unreleased code from source:
25
+
26
+ ```bash
27
+ pip install "unpod @ git+https://github.com/unpod-ai/unpod-python-sdk"
28
+ ```
29
+
30
+ ## What's Inside
31
+
32
+ ```
33
+ unpod
34
+ ├── Management SDK (REST) numbers, voice profiles, speech pipes, calls,
35
+ │ sessions, trunks, recordings, transcripts, api keys
36
+ ├── Connectivity SDK (WSS) AgentRunner, Session, CallContext, hooks
37
+ └── Adapters superdialog, LangChain, OpenAI, Anthropic, HTTP, MCP
38
+ ```
39
+
40
+ - **Management SDK** — CRUD against the Unpod Control Plane: purchase numbers, browse voice profiles, bind Speech Pipes, trigger and inspect calls.
41
+ - **Connectivity SDK** — runtime for live calls: a long-lived `AgentRunner` receives plain-text turns over WSS and dispatches them to your agent, regardless of transport (phone, browser, WebRTC).
42
+ - **Adapters** — plug any brain into a call: `superdialog` dialog machines, LangChain runnables, your own HTTP endpoint, or an MCP server.
43
+
44
+ ## Quick Example
45
+
46
+ ```python
47
+ from unpod import AsyncClient, AgentRunner, CallContext
48
+
49
+ client = AsyncClient() # reads UNPOD_API_KEY from env
50
+
51
+ # Management: pick a voice, bind a Speech Pipe to your agent
52
+ profiles = await client.voice_profiles.list(language="en")
53
+ pipe = await client.pipes.create(
54
+ name="support-line",
55
+ voice_profile=profiles[0].id,
56
+ agent_id="my-voice-agent",
57
+ )
58
+
59
+
60
+ # Connectivity: handle every live call with your own logic
61
+ async def entrypoint(ctx: CallContext) -> None:
62
+ await ctx.session.say("Hi! How can I help you today?")
63
+ await ctx.session.run()
64
+
65
+
66
+ AgentRunner(entrypoint=entrypoint, agent_id="my-voice-agent").start()
67
+ ```
68
+
69
+ ## Documentation
70
+
71
+ | Guide | What it covers |
72
+ |---|---|
73
+ | [Overview](docs/00-overview.md) | What Unpod owns vs what you own, the three layers |
74
+ | [Architecture](docs/01-architecture.md) | Package structure, data flow, protocol details |
75
+ | [Management SDK](docs/02-management-sdk.md) | REST client API reference |
76
+ | [Connectivity SDK](docs/03-connectivity-sdk.md) | AgentRunner, Session, hooks, controls |
77
+ | [Adapters](docs/04-adapters.md) | DialogAdapter protocol and bundled adapters |
78
+ | [Quickstart](docs/05-quickstart.md) | 10 steps to your first phone call |
79
+ | [Browser Quickstart](docs/06-browser-quickstart.md) | Test in Chrome, no phone number needed |
80
+
81
+ Full platform documentation: [docs.unpod.ai](https://docs.unpod.ai)
82
+
83
+ ## Development
84
+
85
+ ```bash
86
+ git clone https://github.com/unpod-ai/unpod-python-sdk
87
+ cd unpod-python-sdk
88
+ uv sync --extra dev
89
+ uv run pytest
90
+ ```
91
+
92
+ ## License
93
+
94
+ [Apache-2.0](LICENSE)
@@ -0,0 +1,28 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a vulnerability
4
+
5
+ If you discover a security vulnerability in the Unpod Python SDK, please report
6
+ it privately rather than opening a public issue.
7
+
8
+ Email **security@unpod.ai** (or **parvinder@unpod.ai**) with:
9
+
10
+ - A description of the issue and its potential impact.
11
+ - Steps to reproduce, or a proof of concept.
12
+ - Any suggested remediation.
13
+
14
+ We aim to acknowledge reports within a few business days and will keep you
15
+ informed as we work on a fix. Please give us a reasonable window to address the
16
+ issue before any public disclosure.
17
+
18
+ ## Supported versions
19
+
20
+ The SDK is in early development (pre-1.0). Security fixes are applied to the
21
+ latest released version on [PyPI](https://pypi.org/project/unpod/).
22
+
23
+ ## Handling credentials
24
+
25
+ - Never commit API keys or `.env` files. The repository's `.gitignore` excludes
26
+ `.env` by default.
27
+ - `UNPOD_API_KEY` and provider keys should be supplied via environment
28
+ variables, not hard-coded in source.