Skip to content

Commit

Permalink
fix export
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom committed Oct 23, 2023
1 parent 6b6cd25 commit 0f043eb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions livekit-api/livekit/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"""

# flake8: noqa
from ._proto import livekit_room_pb2 as proto_room
from .version import __version__
from .access_token import VideoGrants, AccessToken
from .room_service import RoomService

8 changes: 5 additions & 3 deletions livekit-api/livekit/api/_service.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@

from typing import Dict

from abc import ABC
from ._twirp_client import TwirpClient
from .access_token import AccessToken, VideoGrants

AUTHORIZATION = "authorization"


class Service:
class Service(ABC):
def __init__(self, host: str, api_key: str, api_secret: str):
self._client = TwirpClient(host, "livekit")
self.api_key = api_key
Expand All @@ -20,3 +19,6 @@ def _auth_header(self, grants: VideoGrants) -> Dict[str, str]:
headers = {}
headers[AUTHORIZATION] = "Bearer {}".format(token)
return headers

async def aclose(self):
await self._client.aclose()
1 change: 0 additions & 1 deletion livekit-api/livekit/api/room_service.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from ._proto import livekit_models_pb2 as proto_models
from ._proto import livekit_room_pb2 as proto_room
from ._service import Service
Expand Down

0 comments on commit 0f043eb

Please sign in to comment.