livekit-api 0.4.3__tar.gz → 0.5.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.
- {livekit-api-0.4.3 → livekit_api-0.5.0}/PKG-INFO +3 -3
- {livekit-api-0.4.3 → livekit_api-0.5.0}/livekit/api/__init__.py +1 -0
- {livekit-api-0.4.3 → livekit_api-0.5.0}/livekit/api/livekit_api.py +6 -0
- livekit_api-0.5.0/livekit/api/sip_service.py +90 -0
- livekit_api-0.5.0/livekit/api/version.py +1 -0
- {livekit-api-0.4.3 → livekit_api-0.5.0}/livekit_api.egg-info/PKG-INFO +3 -3
- {livekit-api-0.4.3 → livekit_api-0.5.0}/livekit_api.egg-info/SOURCES.txt +1 -0
- {livekit-api-0.4.3 → livekit_api-0.5.0}/livekit_api.egg-info/requires.txt +1 -1
- {livekit-api-0.4.3 → livekit_api-0.5.0}/setup.py +2 -2
- livekit-api-0.4.3/livekit/api/version.py +0 -1
- {livekit-api-0.4.3 → livekit_api-0.5.0}/README.md +0 -0
- {livekit-api-0.4.3 → livekit_api-0.5.0}/livekit/api/_service.py +0 -0
- {livekit-api-0.4.3 → livekit_api-0.5.0}/livekit/api/access_token.py +0 -0
- {livekit-api-0.4.3 → livekit_api-0.5.0}/livekit/api/egress_service.py +0 -0
- {livekit-api-0.4.3 → livekit_api-0.5.0}/livekit/api/ingress_service.py +0 -0
- {livekit-api-0.4.3 → livekit_api-0.5.0}/livekit/api/py.typed +0 -0
- {livekit-api-0.4.3 → livekit_api-0.5.0}/livekit/api/room_service.py +0 -0
- {livekit-api-0.4.3 → livekit_api-0.5.0}/livekit/api/twirp_client.py +0 -0
- {livekit-api-0.4.3 → livekit_api-0.5.0}/livekit/api/webhook.py +0 -0
- {livekit-api-0.4.3 → livekit_api-0.5.0}/livekit_api.egg-info/dependency_links.txt +0 -0
- {livekit-api-0.4.3 → livekit_api-0.5.0}/livekit_api.egg-info/top_level.txt +0 -0
- {livekit-api-0.4.3 → livekit_api-0.5.0}/pyproject.toml +0 -0
- {livekit-api-0.4.3 → livekit_api-0.5.0}/setup.cfg +0 -0
- {livekit-api-0.4.3 → livekit_api-0.5.0}/tests/test_access_token.py +0 -0
- {livekit-api-0.4.3 → livekit_api-0.5.0}/tests/test_webhook.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: livekit-api
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Python Server API for LiveKit
|
|
5
5
|
Home-page: https://github.com/livekit/python-sdks
|
|
6
6
|
License: Apache-2.0
|
|
@@ -19,13 +19,13 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.9
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
21
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
22
|
-
Requires-Python: >=3.
|
|
22
|
+
Requires-Python: >=3.9.0
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
Requires-Dist: pyjwt>=2.0.0
|
|
25
25
|
Requires-Dist: aiohttp>=3.9.0
|
|
26
26
|
Requires-Dist: protobuf>=3
|
|
27
27
|
Requires-Dist: types-protobuf<5,>=4
|
|
28
|
-
Requires-Dist: livekit-protocol
|
|
28
|
+
Requires-Dist: livekit-protocol<1,>=0.5.0
|
|
29
29
|
|
|
30
30
|
# LiveKit Server APIs
|
|
31
31
|
|
|
@@ -21,6 +21,7 @@ from livekit.protocol.ingress import *
|
|
|
21
21
|
from livekit.protocol.models import *
|
|
22
22
|
from livekit.protocol.room import *
|
|
23
23
|
from livekit.protocol.webhook import *
|
|
24
|
+
from livekit.protocol.sip import *
|
|
24
25
|
|
|
25
26
|
from .twirp_client import TwirpError, TwirpErrorCode
|
|
26
27
|
from .livekit_api import LiveKitAPI
|
|
@@ -3,6 +3,7 @@ import os
|
|
|
3
3
|
from .room_service import RoomService
|
|
4
4
|
from .egress_service import EgressService
|
|
5
5
|
from .ingress_service import IngressService
|
|
6
|
+
from .sip_service import SipService
|
|
6
7
|
from typing import Optional
|
|
7
8
|
|
|
8
9
|
|
|
@@ -29,6 +30,7 @@ class LiveKitAPI:
|
|
|
29
30
|
self._room = RoomService(self._session, url, api_key, api_secret)
|
|
30
31
|
self._ingress = IngressService(self._session, url, api_key, api_secret)
|
|
31
32
|
self._egress = EgressService(self._session, url, api_key, api_secret)
|
|
33
|
+
self._sip = SipService(self._session, url, api_key, api_secret)
|
|
32
34
|
|
|
33
35
|
@property
|
|
34
36
|
def room(self):
|
|
@@ -42,5 +44,9 @@ class LiveKitAPI:
|
|
|
42
44
|
def egress(self):
|
|
43
45
|
return self._egress
|
|
44
46
|
|
|
47
|
+
@property
|
|
48
|
+
def sip(self):
|
|
49
|
+
return self._sip
|
|
50
|
+
|
|
45
51
|
async def aclose(self):
|
|
46
52
|
await self._session.close()
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import aiohttp
|
|
2
|
+
from livekit.protocol import sip as proto_sip
|
|
3
|
+
from ._service import Service
|
|
4
|
+
from .access_token import VideoGrants
|
|
5
|
+
|
|
6
|
+
SVC = "SIP"
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class SipService(Service):
|
|
10
|
+
def __init__(
|
|
11
|
+
self, session: aiohttp.ClientSession, url: str, api_key: str, api_secret: str
|
|
12
|
+
):
|
|
13
|
+
super().__init__(session, url, api_key, api_secret)
|
|
14
|
+
|
|
15
|
+
async def create_sip_trunk(
|
|
16
|
+
self, create: proto_sip.CreateSIPTrunkRequest
|
|
17
|
+
) -> proto_sip.SIPTrunkInfo:
|
|
18
|
+
return await self._client.request(
|
|
19
|
+
SVC,
|
|
20
|
+
"CreateSIPTrunk",
|
|
21
|
+
create,
|
|
22
|
+
self._auth_header(VideoGrants()),
|
|
23
|
+
proto_sip.SIPTrunkInfo,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
async def list_sip_trunk(
|
|
27
|
+
self, list: proto_sip.ListSIPTrunkRequest
|
|
28
|
+
) -> proto_sip.ListSIPTrunkResponse:
|
|
29
|
+
return await self._client.request(
|
|
30
|
+
SVC,
|
|
31
|
+
"ListSIPTrunk",
|
|
32
|
+
list,
|
|
33
|
+
self._auth_header(VideoGrants()),
|
|
34
|
+
proto_sip.ListSIPTrunkResponse,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
async def delete_sip_trunk(
|
|
38
|
+
self, delete: proto_sip.DeleteSIPTrunkRequest
|
|
39
|
+
) -> proto_sip.SIPTrunkInfo:
|
|
40
|
+
return await self._client.request(
|
|
41
|
+
SVC,
|
|
42
|
+
"DeleteSIPTrunk",
|
|
43
|
+
delete,
|
|
44
|
+
self._auth_header(VideoGrants()),
|
|
45
|
+
proto_sip.SIPTrunkInfo,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
async def create_sip_dispatch_rule(
|
|
49
|
+
self, create: proto_sip.CreateSIPDispatchRuleRequest
|
|
50
|
+
) -> proto_sip.SIPDispatchRuleInfo:
|
|
51
|
+
return await self._client.request(
|
|
52
|
+
SVC,
|
|
53
|
+
"CreateSIPDispatchRule",
|
|
54
|
+
create,
|
|
55
|
+
self._auth_header(VideoGrants()),
|
|
56
|
+
proto_sip.SIPDispatchRuleInfo,
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
async def list_sip_dispatch_rule(
|
|
60
|
+
self, list: proto_sip.ListSIPDispatchRuleRequest
|
|
61
|
+
) -> proto_sip.ListSIPDispatchRuleResponse:
|
|
62
|
+
return await self._client.request(
|
|
63
|
+
SVC,
|
|
64
|
+
"ListSIPDispatchRule",
|
|
65
|
+
list,
|
|
66
|
+
self._auth_header(VideoGrants()),
|
|
67
|
+
proto_sip.ListSIPDispatchRuleResponse,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
async def delete_sip_dispatch_rule(
|
|
71
|
+
self, delete: proto_sip.DeleteSIPDispatchRuleRequest
|
|
72
|
+
) -> proto_sip.SIPDispatchRuleInfo:
|
|
73
|
+
return await self._client.request(
|
|
74
|
+
SVC,
|
|
75
|
+
"DeleteSIPDispatchRule",
|
|
76
|
+
delete,
|
|
77
|
+
self._auth_header(VideoGrants()),
|
|
78
|
+
proto_sip.SIPDispatchRuleInfo,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
async def create_sip_participant(
|
|
82
|
+
self, create: proto_sip.CreateSIPParticipantRequest
|
|
83
|
+
) -> proto_sip.SIPParticipantInfo:
|
|
84
|
+
return await self._client.request(
|
|
85
|
+
SVC,
|
|
86
|
+
"CreateSIPParticipant",
|
|
87
|
+
create,
|
|
88
|
+
self._auth_header(VideoGrants()),
|
|
89
|
+
proto_sip.SIPParticipantInfo,
|
|
90
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.5.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: livekit-api
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Python Server API for LiveKit
|
|
5
5
|
Home-page: https://github.com/livekit/python-sdks
|
|
6
6
|
License: Apache-2.0
|
|
@@ -19,13 +19,13 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.9
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
21
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
22
|
-
Requires-Python: >=3.
|
|
22
|
+
Requires-Python: >=3.9.0
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
Requires-Dist: pyjwt>=2.0.0
|
|
25
25
|
Requires-Dist: aiohttp>=3.9.0
|
|
26
26
|
Requires-Dist: protobuf>=3
|
|
27
27
|
Requires-Dist: types-protobuf<5,>=4
|
|
28
|
-
Requires-Dist: livekit-protocol
|
|
28
|
+
Requires-Dist: livekit-protocol<1,>=0.5.0
|
|
29
29
|
|
|
30
30
|
# LiveKit Server APIs
|
|
31
31
|
|
|
@@ -47,13 +47,13 @@ setuptools.setup(
|
|
|
47
47
|
keywords=["webrtc", "realtime", "audio", "video", "livekit"],
|
|
48
48
|
license="Apache-2.0",
|
|
49
49
|
packages=setuptools.find_namespace_packages(include=["livekit.*"]),
|
|
50
|
-
python_requires=">=3.
|
|
50
|
+
python_requires=">=3.9.0",
|
|
51
51
|
install_requires=[
|
|
52
52
|
"pyjwt>=2.0.0",
|
|
53
53
|
"aiohttp>=3.9.0",
|
|
54
54
|
"protobuf>=3",
|
|
55
55
|
"types-protobuf>=4,<5",
|
|
56
|
-
"livekit-protocol
|
|
56
|
+
"livekit-protocol>=0.5.0,<1",
|
|
57
57
|
],
|
|
58
58
|
package_data={
|
|
59
59
|
"livekit.api": ["py.typed", "*.pyi", "**/*.pyi"],
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.4.3"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|