Skip to content

Commit 1db26f0

Browse files
authored
bump protocol & API version (#335)
1 parent f86afdf commit 1db26f0

File tree

5 files changed

+36
-10
lines changed

5 files changed

+36
-10
lines changed

README.md

+30-7
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
# 📹🎙️🐍 Python SDK for LiveKit
1414

1515
<!--BEGIN_DESCRIPTION-->
16+
1617
Use this SDK to add realtime video, audio and data features to your Python app. By connecting to <a href="https://livekit.io/">LiveKit</a> Cloud or a self-hosted server, you can quickly build applications such as multi-modal AI, live streaming, or video calls with just a few lines of code.
18+
1719
<!--END_DESCRIPTION-->
1820

1921
This repo contains two packages
@@ -52,9 +54,7 @@ from livekit import api
5254
import asyncio
5355

5456
async def main():
55-
lkapi = api.LiveKitAPI(
56-
'http://localhost:7880',
57-
)
57+
lkapi = api.LiveKitAPI("https://my-project.livekit.cloud")
5858
room_info = await lkapi.room.create_room(
5959
api.CreateRoomRequest(name="my-room"),
6060
)
@@ -66,6 +66,29 @@ async def main():
6666
asyncio.run(main())
6767
```
6868

69+
### Using other APIs
70+
71+
Services can be accessed via the LiveKitAPI object.
72+
73+
```python
74+
lkapi = api.LiveKitAPI("https://my-project.livekit.cloud")
75+
76+
# Room Service
77+
room_svc = lkapi.room
78+
79+
# Egress Service
80+
egress_svc = lkapi.egress
81+
82+
# Ingress Service
83+
ingress_svc = lkapi.ingress
84+
85+
# Sip Service
86+
sip_svc = lkapi.sip
87+
88+
# Agent Dispatch
89+
dispatch_svc = lkapi.agent_dispatch
90+
```
91+
6992
## Using Real-time SDK
7093

7194
```shell
@@ -132,10 +155,9 @@ def on_message_received(msg: rtc.ChatMessage):
132155
await chat.send_message("hello world")
133156
```
134157

135-
136158
### RPC
137159

138-
Perform your own predefined method calls from one participant to another.
160+
Perform your own predefined method calls from one participant to another.
139161

140162
This feature is especially powerful when used with [Agents](https://docs.livekit.io/agents), for instance to forward LLM function calls to your client application.
141163

@@ -172,11 +194,10 @@ You may find it useful to adjust the `response_timeout` parameter, which indicat
172194

173195
#### Errors
174196

175-
LiveKit is a dynamic realtime environment and calls can fail for various reasons.
197+
LiveKit is a dynamic realtime environment and calls can fail for various reasons.
176198

177199
You may throw errors of the type `RpcError` with a string `message` in an RPC method handler and they will be received on the caller's side with the message intact. Other errors will not be transmitted and will instead arrive to the caller as `1500` ("Application Error"). Other built-in errors are detailed in `RpcError`.
178200

179-
180201
## Examples
181202

182203
- [Facelandmark](https://github.com/livekit/python-sdks/tree/main/examples/face_landmark): Use mediapipe to detect face landmarks (eyes, nose ...)
@@ -189,7 +210,9 @@ You may throw errors of the type `RpcError` with a string `message` in an RPC me
189210
Please join us on [Slack](https://livekit.io/join-slack) to get help from our devs / community members. We welcome your contributions(PRs) and details can be discussed there.
190211

191212
<!--BEGIN_REPO_NAV-->
213+
192214
<br/><table>
215+
193216
<thead><tr><th colspan="2">LiveKit Ecosystem</th></tr></thead>
194217
<tbody>
195218
<tr><td>Realtime SDKs</td><td><a href="https://github.com/livekit/components-js">React Components</a> · <a href="https://github.com/livekit/client-sdk-js">Browser</a> · <a href="https://github.com/livekit/components-swift">Swift Components</a> · <a href="https://github.com/livekit/client-sdk-swift">iOS/macOS/visionOS</a> · <a href="https://github.com/livekit/client-sdk-android">Android</a> · <a href="https://github.com/livekit/client-sdk-flutter">Flutter</a> · <a href="https://github.com/livekit/client-sdk-react-native">React Native</a> · <a href="https://github.com/livekit/rust-sdks">Rust</a> · <a href="https://github.com/livekit/node-sdks">Node.js</a> · <b>Python</b> · <a href="https://github.com/livekit/client-sdk-unity-web">Unity (web)</a> · <a href="https://github.com/livekit/client-sdk-unity">Unity (beta)</a></td></tr><tr></tr>

livekit-api/livekit/api/sip_service.py

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ def __init__(
4747
super().__init__(session, url, api_key, api_secret)
4848

4949
async def create_sip_trunk(self, create: CreateSIPTrunkRequest) -> SIPTrunkInfo:
50+
"""
51+
@deprecated Use create_sip_inbound_trunk or create_sip_outbound_trunk instead
52+
"""
5053
return await self._client.request(
5154
SVC,
5255
"CreateSIPTrunk",

livekit-api/livekit/api/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.8.0"
1+
__version__ = "0.8.1"

livekit-api/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"aiohttp>=3.9.0",
5454
"protobuf>=3",
5555
"types-protobuf>=4,<5",
56-
"livekit-protocol>=0.7.0,<2",
56+
"livekit-protocol>=0.8.0,<2",
5757
],
5858
package_data={
5959
"livekit.api": ["py.typed", "*.pyi", "**/*.pyi"],

livekit-protocol/livekit/protocol/version.py

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)