diff --git a/.gitmodules b/.gitmodules index b2e4ed5..19b4849 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "protos"] path = protos - url = https://github.com/jellyfish-dev/protos.git + url = https://github.com/fishjam-dev/protos.git diff --git a/README.md b/README.md index ddb6db1..8c70666 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Read the docs [here](https://fishjam-dev.github.io/python-server-sdk) ## Installation ``` -pip install jellyfish-server-sdk +pip install fishjam-server-sdk ``` ## Usage @@ -24,7 +24,7 @@ The SDK exports two main classes for interacting with Fishjam server: Create a `RoomApi` instance, providing the fishjam server address and api token ```python -from jellyfish import RoomApi +from fishjam import RoomApi room_api = RoomApi(server_address="localhost:5002", server_api_token="development") ``` @@ -33,23 +33,23 @@ You can use it to interact with Fishjam, manage rooms, peers and components ```python # Create a room -jellyfish_address, room = room_api.create_room(video_codec="h264", webhook_url="http://localhost:5000/webhook") +fishjam_address, room = room_api.create_room(video_codec="h264", webhook_url="http://localhost:5000/webhook") # '127.0.0.1:5002', Room(components=[], config=RoomConfig(max_peers=None, video_codec=, webhook_url='http://localhost:5000/webhook'), id='1d905478-ccfc-44d6-a6e7-8ccb1b38d955', peers=[]) # Add peer to the room -from jellyfish import PeerOptionsWebRTC +from fishjam import PeerOptionsWebRTC peer_token, peer_webrtc = room_api.add_peer(room.id, options=PeerOptionsWebRTC()) # 'M8TUGhj-L11KpyG-2zBPIo', Peer(id='b1232c7e-c969-4450-acdf-ea24f3cdd7f6', status=, type='webrtc') # Add component to the room -from jellyfish import ComponentOptionsHLS +from fishjam import ComponentOptionsHLS component_hls = room_api.add_component(room.id, options=ComponentOptionsHLS()) # ComponentHLS(id='5f062447-a9f7-45ed-8d1b-511f77dc78ae', properties=ComponentPropertiesHLS(low_latency=False, persistent=False, playable=False, subscribe_mode=, target_window_duration=None), type='hls') ``` -All methods in `RoomApi` may raise one of the exceptions deriving from `jellyfish.errors.HTTPError`. They are defined in `jellyfish.errors`. +All methods in `RoomApi` may raise one of the exceptions deriving from `fishjam.errors.HTTPError`. They are defined in `fishjam.errors`. #### Notifier @@ -59,7 +59,7 @@ You can read more about notifications in the [Fishjam Docs](https://fishjam-dev. Create `Notifier` instance ```python -from jellyfish import Notifier +from fishjam import Notifier notifier = Notifier(server_address='localhost:5002', server_api_token='development') ``` diff --git a/compile_proto.sh b/compile_proto.sh index 6fe4a0c..fdaf164 100755 --- a/compile_proto.sh +++ b/compile_proto.sh @@ -9,12 +9,12 @@ git submodule sync --recursive >> /dev/null git submodule update --recursive --remote --init >> /dev/null printf "DONE\n\n" -server_file="./protos/jellyfish/server_notifications.proto" +server_file="./protos/fishjam/server_notifications.proto" printf "Compiling: file $server_file\n" -protoc -I . --python_betterproto_out=./jellyfish/events/_protos $server_file +protoc -I . --python_betterproto_out=./fishjam/events/_protos $server_file printf "\tDONE\n" -peer_file="./protos/jellyfish/peer_notifications.proto" +peer_file="./protos/fishjam/peer_notifications.proto" printf "Compiling: file $peer_file\n" protoc -I . --python_betterproto_out=./tests/support/protos $peer_file printf "\tDONE\n" diff --git a/docker-compose-test.yaml b/docker-compose-test.yaml index 05dfdd1..ce9ccc6 100644 --- a/docker-compose-test.yaml +++ b/docker-compose-test.yaml @@ -1,34 +1,34 @@ version: "3" services: - jellyfish: - image: "ghcr.io/fishjam-dev/jellyfish:${TAG:-edge}" - container_name: jellyfish + fishjam: + image: "ghcr.io/fishjam-dev/fishjam:${TAG:-edge}" + container_name: fishjam restart: on-failure healthcheck: test: > - curl --fail -H "authorization: Bearer development" http://jellyfish:5002/room || exit 1 + curl --fail -H "authorization: Bearer development" http://fishjam:5002/room || exit 1 interval: 3s retries: 2 timeout: 2s start_period: 30s environment: - JF_HOST: "jellyfish:5002" - JF_INTEGRATED_TURN_IP: "${INTEGRATED_TURN_IP:-127.0.0.1}" - JF_INTEGRATED_TURN_LISTEN_IP: "0.0.0.0" - JF_INTEGRATED_TURN_PORT_RANGE: "50000-50050" - JF_INTEGRATED_TCP_TURN_PORT: "49999" - JF_SERVER_API_TOKEN: "development" - JF_PORT: 5002 - JF_SECRET_KEY_BASE: "super-secret-key" - JF_SIP_USED: "true" - JF_SIP_IP: "127.0.0.1" + FJ_HOST: "fishjam:5002" + FJ_INTEGRATED_TURN_IP: "${INTEGRATED_TURN_IP:-127.0.0.1}" + FJ_INTEGRATED_TURN_LISTEN_IP: "0.0.0.0" + FJ_INTEGRATED_TURN_PORT_RANGE: "50000-50050" + FJ_INTEGRATED_TCP_TURN_PORT: "49999" + FJ_SERVER_API_TOKEN: "development" + FJ_PORT: 5002 + FJ_SECRET_KEY_BASE: "super-secret-key" + FJ_SIP_IP: "127.0.0.1" + FJ_COMPONENTS_USED: rtsp file hls recording sip ports: - "5002:5002" - "49999:49999" - "50000-50050:50000-50050/udp" volumes: - - ./tests/fixtures:/app/jellyfish_resources/file_component_sources + - ./tests/fixtures:/app/fishjam_resources/file_component_sources test: container_name: test @@ -41,7 +41,7 @@ services: volumes: - .:/app depends_on: - jellyfish: + fishjam: condition: service_healthy examples: @@ -54,5 +54,5 @@ services: volumes: - .:/app depends_on: - jellyfish: + fishjam: condition: service_healthy diff --git a/docs/index.md b/docs/index.md index 4e3aee7..3402c0b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,9 +3,9 @@ - + - + \ No newline at end of file diff --git a/docs/server_notifications.md b/docs/server_notifications.md index 865edc6..2cdd675 100644 --- a/docs/server_notifications.md +++ b/docs/server_notifications.md @@ -1,6 +1,6 @@ # Server Notifications -Jellyfish sends server side notifications whenever some important event occurs, e.g.: +Fishjam sends server side notifications whenever some important event occurs, e.g.: * a room has been created * a peer has connected * component has crashed diff --git a/examples/mini_tutorial.py b/examples/mini_tutorial.py index 3eb262f..58bf8f1 100755 --- a/examples/mini_tutorial.py +++ b/examples/mini_tutorial.py @@ -1,20 +1,20 @@ import asyncio import os -from jellyfish import ( +from fishjam import ( ComponentOptionsFile, ComponentOptionsHLS, ComponentOptionsHLSSubscribeMode, Notifier, RoomApi, ) -from jellyfish.events import ( +from fishjam.events import ( ServerMessageHlsPlayable, ServerMessageTrackAdded, ServerMessageTrackType, ) -HOST = "jellyfish" if os.getenv("DOCKER_TEST") == "TRUE" else "localhost" +HOST = "fishjam" if os.getenv("DOCKER_TEST") == "TRUE" else "localhost" SERVER_ADDRESS = f"{HOST}:5002" @@ -55,9 +55,9 @@ async def test_notifier(): # that allow to use HLS. address, room = room_api.create_room(video_codec="h264") - # Create new room api with returned jellyfish address as a room could be - # created on a different jellyfish instance - # (if you communicate with a cluster of jellyfishes) + # Create new room api with returned fishjam address as a room could be + # created on a different fishjam instance + # (if you communicate with a cluster of fishjames) room_api = RoomApi(server_address=address) # Add HLS component with manual subscribe mode diff --git a/examples/room_api.py b/examples/room_api.py index a08d33e..02e4f4c 100644 --- a/examples/room_api.py +++ b/examples/room_api.py @@ -1,17 +1,17 @@ import os -from jellyfish import ComponentOptionsHLS, PeerOptionsWebRTC, RoomApi +from fishjam import ComponentOptionsHLS, PeerOptionsWebRTC, RoomApi -HOST = "jellyfish" if os.getenv("DOCKER_TEST") == "TRUE" else "localhost" +HOST = "fishjam" if os.getenv("DOCKER_TEST") == "TRUE" else "localhost" SERVER_ADDRESS = f"{HOST}:5002" # Create a room room_api = RoomApi(server_address=SERVER_ADDRESS, server_api_token="development") -jellyfish_address, room = room_api.create_room( +fishjam_address, room = room_api.create_room( video_codec="h264", webhook_url="http://localhost:5000/webhook" ) -print((jellyfish_address, room)) +print((fishjam_address, room)) # Add peer to the room result = room_api.add_peer(room.id, options=PeerOptionsWebRTC()) diff --git a/examples/server_notifications.py b/examples/server_notifications.py index 0c0fbc4..824e6fe 100644 --- a/examples/server_notifications.py +++ b/examples/server_notifications.py @@ -1,10 +1,10 @@ import asyncio import os -from jellyfish import Notifier, RoomApi -from jellyfish.events import ServerMessageTrackAdded, ServerMessageTrackType +from fishjam import Notifier, RoomApi +from fishjam.events import ServerMessageTrackAdded, ServerMessageTrackType -HOST = "jellyfish" if os.getenv("DOCKER_TEST") == "TRUE" else "localhost" +HOST = "fishjam" if os.getenv("DOCKER_TEST") == "TRUE" else "localhost" SERVER_ADDRESS = f"{HOST}:5002" notifier = Notifier(server_address=SERVER_ADDRESS, server_api_token="development") diff --git a/jellyfish/__init__.py b/fishjam/__init__.py similarity index 86% rename from jellyfish/__init__.py rename to fishjam/__init__.py index 9d2eddd..4290ef1 100644 --- a/jellyfish/__init__.py +++ b/fishjam/__init__.py @@ -5,10 +5,10 @@ # pylint: disable=locally-disabled, no-name-in-module, import-error # Exceptions and Server Messages -from jellyfish import errors, events +from fishjam import errors, events # Models -from jellyfish._openapi_client.models import ( +from fishjam._openapi_client.models import ( ComponentFile, ComponentHLS, ComponentOptionsFile, @@ -40,10 +40,10 @@ ) # API -from jellyfish._webhook_notifier import receive_binary -from jellyfish._ws_notifier import Notifier -from jellyfish.api._recording_api import RecordingApi -from jellyfish.api._room_api import RoomApi +from fishjam._webhook_notifier import receive_binary +from fishjam._ws_notifier import Notifier +from fishjam.api._recording_api import RecordingApi +from fishjam.api._room_api import RoomApi __all__ = [ "RoomApi", diff --git a/jellyfish/_openapi_client/__init__.py b/fishjam/_openapi_client/__init__.py similarity index 62% rename from jellyfish/_openapi_client/__init__.py rename to fishjam/_openapi_client/__init__.py index 559de5e..a38f42d 100644 --- a/jellyfish/_openapi_client/__init__.py +++ b/fishjam/_openapi_client/__init__.py @@ -1,4 +1,4 @@ -""" A client library for accessing Jellyfish Media Server """ +""" A client library for accessing Fishjam Media Server """ from .client import AuthenticatedClient, Client __all__ = ( diff --git a/jellyfish/_openapi_client/api/__init__.py b/fishjam/_openapi_client/api/__init__.py similarity index 100% rename from jellyfish/_openapi_client/api/__init__.py rename to fishjam/_openapi_client/api/__init__.py diff --git a/jellyfish/_openapi_client/api/health/__init__.py b/fishjam/_openapi_client/api/health/__init__.py similarity index 100% rename from jellyfish/_openapi_client/api/health/__init__.py rename to fishjam/_openapi_client/api/health/__init__.py diff --git a/jellyfish/_openapi_client/api/health/healthcheck.py b/fishjam/_openapi_client/api/health/healthcheck.py similarity index 95% rename from jellyfish/_openapi_client/api/health/healthcheck.py rename to fishjam/_openapi_client/api/health/healthcheck.py index d632277..8c789ad 100644 --- a/jellyfish/_openapi_client/api/health/healthcheck.py +++ b/fishjam/_openapi_client/api/health/healthcheck.py @@ -49,7 +49,7 @@ def sync_detailed( *, client: AuthenticatedClient, ) -> Response[Union[Error, HealthcheckResponse]]: - """Describes the health of Jellyfish + """Describes the health of Fishjam Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -72,7 +72,7 @@ def sync( *, client: AuthenticatedClient, ) -> Optional[Union[Error, HealthcheckResponse]]: - """Describes the health of Jellyfish + """Describes the health of Fishjam Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -91,7 +91,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, ) -> Response[Union[Error, HealthcheckResponse]]: - """Describes the health of Jellyfish + """Describes the health of Fishjam Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -112,7 +112,7 @@ async def asyncio( *, client: AuthenticatedClient, ) -> Optional[Union[Error, HealthcheckResponse]]: - """Describes the health of Jellyfish + """Describes the health of Fishjam Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/jellyfish/_openapi_client/api/hls/__init__.py b/fishjam/_openapi_client/api/hls/__init__.py similarity index 100% rename from jellyfish/_openapi_client/api/hls/__init__.py rename to fishjam/_openapi_client/api/hls/__init__.py diff --git a/jellyfish/_openapi_client/api/hls/get_hls_content.py b/fishjam/_openapi_client/api/hls/get_hls_content.py similarity index 100% rename from jellyfish/_openapi_client/api/hls/get_hls_content.py rename to fishjam/_openapi_client/api/hls/get_hls_content.py diff --git a/jellyfish/_openapi_client/api/recording/__init__.py b/fishjam/_openapi_client/api/recording/__init__.py similarity index 100% rename from jellyfish/_openapi_client/api/recording/__init__.py rename to fishjam/_openapi_client/api/recording/__init__.py diff --git a/jellyfish/_openapi_client/api/recording/delete_recording.py b/fishjam/_openapi_client/api/recording/delete_recording.py similarity index 100% rename from jellyfish/_openapi_client/api/recording/delete_recording.py rename to fishjam/_openapi_client/api/recording/delete_recording.py diff --git a/jellyfish/_openapi_client/api/recording/get_recording_content.py b/fishjam/_openapi_client/api/recording/get_recording_content.py similarity index 100% rename from jellyfish/_openapi_client/api/recording/get_recording_content.py rename to fishjam/_openapi_client/api/recording/get_recording_content.py diff --git a/jellyfish/_openapi_client/api/recording/get_recordings.py b/fishjam/_openapi_client/api/recording/get_recordings.py similarity index 100% rename from jellyfish/_openapi_client/api/recording/get_recordings.py rename to fishjam/_openapi_client/api/recording/get_recordings.py diff --git a/jellyfish/_openapi_client/api/room/__init__.py b/fishjam/_openapi_client/api/room/__init__.py similarity index 100% rename from jellyfish/_openapi_client/api/room/__init__.py rename to fishjam/_openapi_client/api/room/__init__.py diff --git a/jellyfish/_openapi_client/api/room/add_component.py b/fishjam/_openapi_client/api/room/add_component.py similarity index 100% rename from jellyfish/_openapi_client/api/room/add_component.py rename to fishjam/_openapi_client/api/room/add_component.py diff --git a/jellyfish/_openapi_client/api/room/add_peer.py b/fishjam/_openapi_client/api/room/add_peer.py similarity index 100% rename from jellyfish/_openapi_client/api/room/add_peer.py rename to fishjam/_openapi_client/api/room/add_peer.py diff --git a/jellyfish/_openapi_client/api/room/create_room.py b/fishjam/_openapi_client/api/room/create_room.py similarity index 100% rename from jellyfish/_openapi_client/api/room/create_room.py rename to fishjam/_openapi_client/api/room/create_room.py diff --git a/jellyfish/_openapi_client/api/room/delete_component.py b/fishjam/_openapi_client/api/room/delete_component.py similarity index 100% rename from jellyfish/_openapi_client/api/room/delete_component.py rename to fishjam/_openapi_client/api/room/delete_component.py diff --git a/jellyfish/_openapi_client/api/room/delete_peer.py b/fishjam/_openapi_client/api/room/delete_peer.py similarity index 100% rename from jellyfish/_openapi_client/api/room/delete_peer.py rename to fishjam/_openapi_client/api/room/delete_peer.py diff --git a/jellyfish/_openapi_client/api/room/delete_room.py b/fishjam/_openapi_client/api/room/delete_room.py similarity index 100% rename from jellyfish/_openapi_client/api/room/delete_room.py rename to fishjam/_openapi_client/api/room/delete_room.py diff --git a/jellyfish/_openapi_client/api/room/get_all_rooms.py b/fishjam/_openapi_client/api/room/get_all_rooms.py similarity index 100% rename from jellyfish/_openapi_client/api/room/get_all_rooms.py rename to fishjam/_openapi_client/api/room/get_all_rooms.py diff --git a/jellyfish/_openapi_client/api/room/get_room.py b/fishjam/_openapi_client/api/room/get_room.py similarity index 100% rename from jellyfish/_openapi_client/api/room/get_room.py rename to fishjam/_openapi_client/api/room/get_room.py diff --git a/jellyfish/_openapi_client/api/room/subscribe_to.py b/fishjam/_openapi_client/api/room/subscribe_to.py similarity index 100% rename from jellyfish/_openapi_client/api/room/subscribe_to.py rename to fishjam/_openapi_client/api/room/subscribe_to.py diff --git a/jellyfish/_openapi_client/api/sip/__init__.py b/fishjam/_openapi_client/api/sip/__init__.py similarity index 100% rename from jellyfish/_openapi_client/api/sip/__init__.py rename to fishjam/_openapi_client/api/sip/__init__.py diff --git a/jellyfish/_openapi_client/api/sip/dial.py b/fishjam/_openapi_client/api/sip/dial.py similarity index 100% rename from jellyfish/_openapi_client/api/sip/dial.py rename to fishjam/_openapi_client/api/sip/dial.py diff --git a/jellyfish/_openapi_client/api/sip/end_call.py b/fishjam/_openapi_client/api/sip/end_call.py similarity index 100% rename from jellyfish/_openapi_client/api/sip/end_call.py rename to fishjam/_openapi_client/api/sip/end_call.py diff --git a/jellyfish/_openapi_client/client.py b/fishjam/_openapi_client/client.py similarity index 100% rename from jellyfish/_openapi_client/client.py rename to fishjam/_openapi_client/client.py diff --git a/jellyfish/_openapi_client/errors.py b/fishjam/_openapi_client/errors.py similarity index 100% rename from jellyfish/_openapi_client/errors.py rename to fishjam/_openapi_client/errors.py diff --git a/jellyfish/_openapi_client/models/__init__.py b/fishjam/_openapi_client/models/__init__.py similarity index 100% rename from jellyfish/_openapi_client/models/__init__.py rename to fishjam/_openapi_client/models/__init__.py diff --git a/jellyfish/_openapi_client/models/add_component_json_body.py b/fishjam/_openapi_client/models/add_component_json_body.py similarity index 100% rename from jellyfish/_openapi_client/models/add_component_json_body.py rename to fishjam/_openapi_client/models/add_component_json_body.py diff --git a/jellyfish/_openapi_client/models/add_peer_json_body.py b/fishjam/_openapi_client/models/add_peer_json_body.py similarity index 100% rename from jellyfish/_openapi_client/models/add_peer_json_body.py rename to fishjam/_openapi_client/models/add_peer_json_body.py diff --git a/jellyfish/_openapi_client/models/component_details_response.py b/fishjam/_openapi_client/models/component_details_response.py similarity index 97% rename from jellyfish/_openapi_client/models/component_details_response.py rename to fishjam/_openapi_client/models/component_details_response.py index 1b91dfb..b2d91b6 100644 --- a/jellyfish/_openapi_client/models/component_details_response.py +++ b/fishjam/_openapi_client/models/component_details_response.py @@ -1,4 +1,12 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import ( + TYPE_CHECKING, + Any, + Dict, + List, + Type, + TypeVar, + Union, +) from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/jellyfish/_openapi_client/models/component_file.py b/fishjam/_openapi_client/models/component_file.py similarity index 100% rename from jellyfish/_openapi_client/models/component_file.py rename to fishjam/_openapi_client/models/component_file.py diff --git a/jellyfish/_openapi_client/models/component_hls.py b/fishjam/_openapi_client/models/component_hls.py similarity index 100% rename from jellyfish/_openapi_client/models/component_hls.py rename to fishjam/_openapi_client/models/component_hls.py diff --git a/jellyfish/_openapi_client/models/component_options_file.py b/fishjam/_openapi_client/models/component_options_file.py similarity index 100% rename from jellyfish/_openapi_client/models/component_options_file.py rename to fishjam/_openapi_client/models/component_options_file.py diff --git a/jellyfish/_openapi_client/models/component_options_hls.py b/fishjam/_openapi_client/models/component_options_hls.py similarity index 100% rename from jellyfish/_openapi_client/models/component_options_hls.py rename to fishjam/_openapi_client/models/component_options_hls.py diff --git a/jellyfish/_openapi_client/models/component_options_hls_subscribe_mode.py b/fishjam/_openapi_client/models/component_options_hls_subscribe_mode.py similarity index 100% rename from jellyfish/_openapi_client/models/component_options_hls_subscribe_mode.py rename to fishjam/_openapi_client/models/component_options_hls_subscribe_mode.py diff --git a/jellyfish/_openapi_client/models/component_options_recording.py b/fishjam/_openapi_client/models/component_options_recording.py similarity index 100% rename from jellyfish/_openapi_client/models/component_options_recording.py rename to fishjam/_openapi_client/models/component_options_recording.py diff --git a/jellyfish/_openapi_client/models/component_options_recording_subscribe_mode.py b/fishjam/_openapi_client/models/component_options_recording_subscribe_mode.py similarity index 100% rename from jellyfish/_openapi_client/models/component_options_recording_subscribe_mode.py rename to fishjam/_openapi_client/models/component_options_recording_subscribe_mode.py diff --git a/jellyfish/_openapi_client/models/component_options_rtsp.py b/fishjam/_openapi_client/models/component_options_rtsp.py similarity index 100% rename from jellyfish/_openapi_client/models/component_options_rtsp.py rename to fishjam/_openapi_client/models/component_options_rtsp.py diff --git a/jellyfish/_openapi_client/models/component_options_sip.py b/fishjam/_openapi_client/models/component_options_sip.py similarity index 100% rename from jellyfish/_openapi_client/models/component_options_sip.py rename to fishjam/_openapi_client/models/component_options_sip.py diff --git a/jellyfish/_openapi_client/models/component_options_sipsip_credentials.py b/fishjam/_openapi_client/models/component_options_sipsip_credentials.py similarity index 100% rename from jellyfish/_openapi_client/models/component_options_sipsip_credentials.py rename to fishjam/_openapi_client/models/component_options_sipsip_credentials.py diff --git a/jellyfish/_openapi_client/models/component_properties_file.py b/fishjam/_openapi_client/models/component_properties_file.py similarity index 100% rename from jellyfish/_openapi_client/models/component_properties_file.py rename to fishjam/_openapi_client/models/component_properties_file.py diff --git a/jellyfish/_openapi_client/models/component_properties_hls.py b/fishjam/_openapi_client/models/component_properties_hls.py similarity index 100% rename from jellyfish/_openapi_client/models/component_properties_hls.py rename to fishjam/_openapi_client/models/component_properties_hls.py diff --git a/jellyfish/_openapi_client/models/component_properties_hls_subscribe_mode.py b/fishjam/_openapi_client/models/component_properties_hls_subscribe_mode.py similarity index 100% rename from jellyfish/_openapi_client/models/component_properties_hls_subscribe_mode.py rename to fishjam/_openapi_client/models/component_properties_hls_subscribe_mode.py diff --git a/jellyfish/_openapi_client/models/component_properties_recording.py b/fishjam/_openapi_client/models/component_properties_recording.py similarity index 100% rename from jellyfish/_openapi_client/models/component_properties_recording.py rename to fishjam/_openapi_client/models/component_properties_recording.py diff --git a/jellyfish/_openapi_client/models/component_properties_recording_subscribe_mode.py b/fishjam/_openapi_client/models/component_properties_recording_subscribe_mode.py similarity index 100% rename from jellyfish/_openapi_client/models/component_properties_recording_subscribe_mode.py rename to fishjam/_openapi_client/models/component_properties_recording_subscribe_mode.py diff --git a/jellyfish/_openapi_client/models/component_properties_rtsp.py b/fishjam/_openapi_client/models/component_properties_rtsp.py similarity index 100% rename from jellyfish/_openapi_client/models/component_properties_rtsp.py rename to fishjam/_openapi_client/models/component_properties_rtsp.py diff --git a/jellyfish/_openapi_client/models/component_properties_sip.py b/fishjam/_openapi_client/models/component_properties_sip.py similarity index 100% rename from jellyfish/_openapi_client/models/component_properties_sip.py rename to fishjam/_openapi_client/models/component_properties_sip.py diff --git a/jellyfish/_openapi_client/models/component_properties_sipsip_credentials.py b/fishjam/_openapi_client/models/component_properties_sipsip_credentials.py similarity index 100% rename from jellyfish/_openapi_client/models/component_properties_sipsip_credentials.py rename to fishjam/_openapi_client/models/component_properties_sipsip_credentials.py diff --git a/jellyfish/_openapi_client/models/component_recording.py b/fishjam/_openapi_client/models/component_recording.py similarity index 100% rename from jellyfish/_openapi_client/models/component_recording.py rename to fishjam/_openapi_client/models/component_recording.py diff --git a/jellyfish/_openapi_client/models/component_rtsp.py b/fishjam/_openapi_client/models/component_rtsp.py similarity index 100% rename from jellyfish/_openapi_client/models/component_rtsp.py rename to fishjam/_openapi_client/models/component_rtsp.py diff --git a/jellyfish/_openapi_client/models/component_sip.py b/fishjam/_openapi_client/models/component_sip.py similarity index 100% rename from jellyfish/_openapi_client/models/component_sip.py rename to fishjam/_openapi_client/models/component_sip.py diff --git a/jellyfish/_openapi_client/models/dial_config.py b/fishjam/_openapi_client/models/dial_config.py similarity index 100% rename from jellyfish/_openapi_client/models/dial_config.py rename to fishjam/_openapi_client/models/dial_config.py diff --git a/jellyfish/_openapi_client/models/error.py b/fishjam/_openapi_client/models/error.py similarity index 100% rename from jellyfish/_openapi_client/models/error.py rename to fishjam/_openapi_client/models/error.py diff --git a/jellyfish/_openapi_client/models/health_report.py b/fishjam/_openapi_client/models/health_report.py similarity index 91% rename from jellyfish/_openapi_client/models/health_report.py rename to fishjam/_openapi_client/models/health_report.py index 75869f9..5405f77 100644 --- a/jellyfish/_openapi_client/models/health_report.py +++ b/fishjam/_openapi_client/models/health_report.py @@ -14,18 +14,18 @@ @_attrs_define class HealthReport: - """Describes overall Jellyfish health""" + """Describes overall Fishjam health""" distribution: "HealthReportDistribution" - """Informs about the status of Jellyfish distribution""" + """Informs about the status of Fishjam distribution""" git_commit: str """Commit hash of the build""" status: HealthReportStatus - """Informs about the status of Jellyfish or a specific service""" + """Informs about the status of Fishjam or a specific service""" uptime: int - """Uptime of Jellyfish (in seconds)""" + """Uptime of Fishjam (in seconds)""" version: str - """Version of Jellyfish""" + """Version of Fishjam""" additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) """@private""" diff --git a/jellyfish/_openapi_client/models/health_report_distribution.py b/fishjam/_openapi_client/models/health_report_distribution.py similarity index 88% rename from jellyfish/_openapi_client/models/health_report_distribution.py rename to fishjam/_openapi_client/models/health_report_distribution.py index 57dc07f..ed030ef 100644 --- a/jellyfish/_openapi_client/models/health_report_distribution.py +++ b/fishjam/_openapi_client/models/health_report_distribution.py @@ -11,14 +11,14 @@ @_attrs_define class HealthReportDistribution: - """Informs about the status of Jellyfish distribution""" + """Informs about the status of Fishjam distribution""" node_status: HealthReportStatus - """Informs about the status of Jellyfish or a specific service""" + """Informs about the status of Fishjam or a specific service""" nodes_in_cluster: int - """Amount of nodes (including this Jellyfish's node) in the distribution cluster""" + """Amount of nodes (including this Fishjam's node) in the distribution cluster""" enabled: Union[Unset, bool] = UNSET - """Whether distribution is enabled on this Jellyfish""" + """Whether distribution is enabled on this Fishjam""" additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) """@private""" diff --git a/jellyfish/_openapi_client/models/health_report_status.py b/fishjam/_openapi_client/models/health_report_status.py similarity index 69% rename from jellyfish/_openapi_client/models/health_report_status.py rename to fishjam/_openapi_client/models/health_report_status.py index f34deb0..459b20f 100644 --- a/jellyfish/_openapi_client/models/health_report_status.py +++ b/fishjam/_openapi_client/models/health_report_status.py @@ -2,7 +2,7 @@ class HealthReportStatus(str, Enum): - """Informs about the status of Jellyfish or a specific service""" + """Informs about the status of Fishjam or a specific service""" DOWN = "DOWN" UP = "UP" diff --git a/jellyfish/_openapi_client/models/healthcheck_response.py b/fishjam/_openapi_client/models/healthcheck_response.py similarity index 94% rename from jellyfish/_openapi_client/models/healthcheck_response.py rename to fishjam/_openapi_client/models/healthcheck_response.py index 5e2fc32..0eb71ae 100644 --- a/jellyfish/_openapi_client/models/healthcheck_response.py +++ b/fishjam/_openapi_client/models/healthcheck_response.py @@ -12,10 +12,10 @@ @_attrs_define class HealthcheckResponse: - """Response containing health report of Jellyfish""" + """Response containing health report of Fishjam""" data: "HealthReport" - """Describes overall Jellyfish health""" + """Describes overall Fishjam health""" additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) """@private""" diff --git a/jellyfish/_openapi_client/models/peer.py b/fishjam/_openapi_client/models/peer.py similarity index 100% rename from jellyfish/_openapi_client/models/peer.py rename to fishjam/_openapi_client/models/peer.py diff --git a/jellyfish/_openapi_client/models/peer_details_response.py b/fishjam/_openapi_client/models/peer_details_response.py similarity index 100% rename from jellyfish/_openapi_client/models/peer_details_response.py rename to fishjam/_openapi_client/models/peer_details_response.py diff --git a/jellyfish/_openapi_client/models/peer_details_response_data.py b/fishjam/_openapi_client/models/peer_details_response_data.py similarity index 100% rename from jellyfish/_openapi_client/models/peer_details_response_data.py rename to fishjam/_openapi_client/models/peer_details_response_data.py diff --git a/jellyfish/_openapi_client/models/peer_options_web_rtc.py b/fishjam/_openapi_client/models/peer_options_web_rtc.py similarity index 100% rename from jellyfish/_openapi_client/models/peer_options_web_rtc.py rename to fishjam/_openapi_client/models/peer_options_web_rtc.py diff --git a/jellyfish/_openapi_client/models/peer_status.py b/fishjam/_openapi_client/models/peer_status.py similarity index 100% rename from jellyfish/_openapi_client/models/peer_status.py rename to fishjam/_openapi_client/models/peer_status.py diff --git a/jellyfish/_openapi_client/models/recording_list_response.py b/fishjam/_openapi_client/models/recording_list_response.py similarity index 100% rename from jellyfish/_openapi_client/models/recording_list_response.py rename to fishjam/_openapi_client/models/recording_list_response.py diff --git a/jellyfish/_openapi_client/models/room.py b/fishjam/_openapi_client/models/room.py similarity index 100% rename from jellyfish/_openapi_client/models/room.py rename to fishjam/_openapi_client/models/room.py diff --git a/jellyfish/_openapi_client/models/room_config.py b/fishjam/_openapi_client/models/room_config.py similarity index 95% rename from jellyfish/_openapi_client/models/room_config.py rename to fishjam/_openapi_client/models/room_config.py index 58eee29..2b8869f 100644 --- a/jellyfish/_openapi_client/models/room_config.py +++ b/fishjam/_openapi_client/models/room_config.py @@ -20,11 +20,11 @@ class RoomConfig: peerless_purge_timeout: Union[Unset, None, int] = UNSET """Duration (in seconds) after which the room will be removed if no peers are connected. If not provided, this feature is disabled.""" room_id: Union[Unset, None, str] = UNSET - """Custom id used for identifying room within Jellyfish. Must be unique across all rooms. If not provided, random UUID is generated.""" + """Custom id used for identifying room within Fishjam. Must be unique across all rooms. If not provided, random UUID is generated.""" video_codec: Union[Unset, None, RoomConfigVideoCodec] = UNSET """Enforces video codec for each peer in the room""" webhook_url: Union[Unset, None, str] = UNSET - """URL where Jellyfish notifications will be sent""" + """URL where Fishjam notifications will be sent""" additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) """@private""" diff --git a/jellyfish/_openapi_client/models/room_config_video_codec.py b/fishjam/_openapi_client/models/room_config_video_codec.py similarity index 100% rename from jellyfish/_openapi_client/models/room_config_video_codec.py rename to fishjam/_openapi_client/models/room_config_video_codec.py diff --git a/jellyfish/_openapi_client/models/room_create_details_response.py b/fishjam/_openapi_client/models/room_create_details_response.py similarity index 100% rename from jellyfish/_openapi_client/models/room_create_details_response.py rename to fishjam/_openapi_client/models/room_create_details_response.py diff --git a/jellyfish/_openapi_client/models/room_create_details_response_data.py b/fishjam/_openapi_client/models/room_create_details_response_data.py similarity index 80% rename from jellyfish/_openapi_client/models/room_create_details_response_data.py rename to fishjam/_openapi_client/models/room_create_details_response_data.py index 09bab6e..5496839 100644 --- a/jellyfish/_openapi_client/models/room_create_details_response_data.py +++ b/fishjam/_openapi_client/models/room_create_details_response_data.py @@ -14,8 +14,8 @@ class RoomCreateDetailsResponseData: """ """ - jellyfish_address: str - """Jellyfish instance address where the room was created. This might be different than the address of Jellyfish where the request was sent only when running a cluster of Jellyfishes.""" + fishjam_address: str + """Fishjam instance address where the room was created. This might be different than the address of Fishjam where the request was sent only when running a cluster of Fishjams.""" room: "Room" """Description of the room state""" additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -23,14 +23,14 @@ class RoomCreateDetailsResponseData: def to_dict(self) -> Dict[str, Any]: """@private""" - jellyfish_address = self.jellyfish_address + fishjam_address = self.fishjam_address room = self.room.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { - "jellyfish_address": jellyfish_address, + "fishjam_address": fishjam_address, "room": room, } ) @@ -43,12 +43,12 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.room import Room d = src_dict.copy() - jellyfish_address = d.pop("jellyfish_address") + fishjam_address = d.pop("fishjam_address") room = Room.from_dict(d.pop("room")) room_create_details_response_data = cls( - jellyfish_address=jellyfish_address, + fishjam_address=fishjam_address, room=room, ) diff --git a/jellyfish/_openapi_client/models/room_details_response.py b/fishjam/_openapi_client/models/room_details_response.py similarity index 100% rename from jellyfish/_openapi_client/models/room_details_response.py rename to fishjam/_openapi_client/models/room_details_response.py diff --git a/jellyfish/_openapi_client/models/rooms_listing_response.py b/fishjam/_openapi_client/models/rooms_listing_response.py similarity index 100% rename from jellyfish/_openapi_client/models/rooms_listing_response.py rename to fishjam/_openapi_client/models/rooms_listing_response.py diff --git a/jellyfish/_openapi_client/models/s3_credentials.py b/fishjam/_openapi_client/models/s3_credentials.py similarity index 100% rename from jellyfish/_openapi_client/models/s3_credentials.py rename to fishjam/_openapi_client/models/s3_credentials.py diff --git a/jellyfish/_openapi_client/models/sip_credentials.py b/fishjam/_openapi_client/models/sip_credentials.py similarity index 100% rename from jellyfish/_openapi_client/models/sip_credentials.py rename to fishjam/_openapi_client/models/sip_credentials.py diff --git a/jellyfish/_openapi_client/models/subscription_config.py b/fishjam/_openapi_client/models/subscription_config.py similarity index 100% rename from jellyfish/_openapi_client/models/subscription_config.py rename to fishjam/_openapi_client/models/subscription_config.py diff --git a/jellyfish/_openapi_client/models/track.py b/fishjam/_openapi_client/models/track.py similarity index 100% rename from jellyfish/_openapi_client/models/track.py rename to fishjam/_openapi_client/models/track.py diff --git a/jellyfish/_openapi_client/models/track_type.py b/fishjam/_openapi_client/models/track_type.py similarity index 100% rename from jellyfish/_openapi_client/models/track_type.py rename to fishjam/_openapi_client/models/track_type.py diff --git a/jellyfish/_openapi_client/py.typed b/fishjam/_openapi_client/py.typed similarity index 100% rename from jellyfish/_openapi_client/py.typed rename to fishjam/_openapi_client/py.typed diff --git a/jellyfish/_openapi_client/types.py b/fishjam/_openapi_client/types.py similarity index 100% rename from jellyfish/_openapi_client/types.py rename to fishjam/_openapi_client/types.py diff --git a/jellyfish/_webhook_notifier.py b/fishjam/_webhook_notifier.py similarity index 66% rename from jellyfish/_webhook_notifier.py rename to fishjam/_webhook_notifier.py index 904a1d7..3bd2489 100644 --- a/jellyfish/_webhook_notifier.py +++ b/fishjam/_webhook_notifier.py @@ -1,18 +1,18 @@ """ Module defining a function allowing decoding received webhook -notification from jellyfish to notification structs. +notification from fishjam to notification structs. """ import betterproto -from jellyfish.events._protos.jellyfish import ServerMessage +from fishjam.events._protos.fishjam import ServerMessage def receive_binary(binary: bytes) -> betterproto.Message: """ Transform received protobuf notification to adequate notification instance. - The available notifications are listed in `jellyfish.events` module. + The available notifications are listed in `fishjam.events` module. """ message = ServerMessage().parse(binary) _which, message = betterproto.which_one_of(message, "content") diff --git a/jellyfish/_ws_notifier.py b/fishjam/_ws_notifier.py similarity index 92% rename from jellyfish/_ws_notifier.py rename to fishjam/_ws_notifier.py index 941c730..bafe08b 100644 --- a/jellyfish/_ws_notifier.py +++ b/fishjam/_ws_notifier.py @@ -9,8 +9,8 @@ from websockets import client from websockets.exceptions import ConnectionClosed -from jellyfish.events import ServerMessageMetricsReport -from jellyfish.events._protos.jellyfish import ( +from fishjam.events import ServerMessageMetricsReport +from fishjam.events._protos.fishjam import ( ServerMessage, ServerMessageAuthenticated, ServerMessageAuthRequest, @@ -22,7 +22,7 @@ class Notifier: """ - Allows for receiving WebSocket messages from Jellyfish. + Allows for receiving WebSocket messages from Fishjam. """ def __init__( @@ -32,7 +32,7 @@ def __init__( secure: bool = False, ): """ - Create Notifier instance, providing the jellyfish address and api token. + Create Notifier instance, providing the fishjam address and api token. Set secure to `True` for `wss` and `False` for `ws` connection (default). """ @@ -64,8 +64,8 @@ def on_metrics(self, handler: Callable[[ServerMessageMetricsReport], None]): async def connect(self): """ - A coroutine which connects Notifier to Jellyfish and listens for all incoming - messages from the Jellyfish. + A coroutine which connects Notifier to Fishjam and listens for all incoming + messages from the Fishjam. It runs until the connection isn't closed. @@ -100,7 +100,7 @@ async def connect(self): async def wait_ready(self) -> True: """ - Waits until the notifier is connected and authenticated to Jellyfish. + Waits until the notifier is connected and authenticated to Fishjam. If already connected, returns `True` immediately. """ diff --git a/jellyfish/api/__init__.py b/fishjam/api/__init__.py similarity index 100% rename from jellyfish/api/__init__.py rename to fishjam/api/__init__.py diff --git a/jellyfish/api/_base_api.py b/fishjam/api/_base_api.py similarity index 74% rename from jellyfish/api/_base_api.py rename to fishjam/api/_base_api.py index 9c0369b..0fea83a 100644 --- a/jellyfish/api/_base_api.py +++ b/fishjam/api/_base_api.py @@ -1,7 +1,7 @@ -from jellyfish._openapi_client.client import AuthenticatedClient -from jellyfish._openapi_client.models import Error -from jellyfish._openapi_client.types import Response -from jellyfish.errors import HTTPError +from fishjam._openapi_client.client import AuthenticatedClient +from fishjam._openapi_client.models import Error +from fishjam._openapi_client.types import Response +from fishjam.errors import HTTPError class BaseApi: diff --git a/jellyfish/api/_recording_api.py b/fishjam/api/_recording_api.py similarity index 79% rename from jellyfish/api/_recording_api.py rename to fishjam/api/_recording_api.py index e765a0b..1bec10a 100644 --- a/jellyfish/api/_recording_api.py +++ b/fishjam/api/_recording_api.py @@ -2,8 +2,8 @@ RecordingApi used to manage rooms """ -from jellyfish._openapi_client.api.recording import delete_recording, get_recordings -from jellyfish.api._base_api import BaseApi +from fishjam._openapi_client.api.recording import delete_recording, get_recordings +from fishjam.api._base_api import BaseApi class RecordingApi(BaseApi): @@ -16,7 +16,7 @@ def __init__( secure: bool = False, ): """ - Create RecordingApi instance, providing the jellyfish address and api token. + Create RecordingApi instance, providing the fishjam address and api token. Set secure to `True` for `https` and `False` for `http` connection (default). """ diff --git a/jellyfish/api/_room_api.py b/fishjam/api/_room_api.py similarity index 85% rename from jellyfish/api/_room_api.py rename to fishjam/api/_room_api.py index 1da2edc..e05b901 100644 --- a/jellyfish/api/_room_api.py +++ b/fishjam/api/_room_api.py @@ -4,18 +4,18 @@ from typing import List, Literal, Tuple, Union -from jellyfish._openapi_client.api.room import add_component as room_add_component -from jellyfish._openapi_client.api.room import add_peer as room_add_peer -from jellyfish._openapi_client.api.room import create_room as room_create_room -from jellyfish._openapi_client.api.room import delete_component as room_delete_component -from jellyfish._openapi_client.api.room import delete_peer as room_delete_peer -from jellyfish._openapi_client.api.room import delete_room as room_delete_room -from jellyfish._openapi_client.api.room import get_all_rooms as room_get_all_rooms -from jellyfish._openapi_client.api.room import get_room as room_get_room -from jellyfish._openapi_client.api.room import subscribe_to -from jellyfish._openapi_client.api.sip import dial as sip_dial -from jellyfish._openapi_client.api.sip import end_call as sip_end_call -from jellyfish._openapi_client.models import ( +from fishjam._openapi_client.api.room import add_component as room_add_component +from fishjam._openapi_client.api.room import add_peer as room_add_peer +from fishjam._openapi_client.api.room import create_room as room_create_room +from fishjam._openapi_client.api.room import delete_component as room_delete_component +from fishjam._openapi_client.api.room import delete_peer as room_delete_peer +from fishjam._openapi_client.api.room import delete_room as room_delete_room +from fishjam._openapi_client.api.room import get_all_rooms as room_get_all_rooms +from fishjam._openapi_client.api.room import get_room as room_get_room +from fishjam._openapi_client.api.room import subscribe_to +from fishjam._openapi_client.api.sip import dial as sip_dial +from fishjam._openapi_client.api.sip import end_call as sip_end_call +from fishjam._openapi_client.models import ( AddComponentJsonBody, AddPeerJsonBody, ComponentFile, @@ -36,7 +36,7 @@ RoomConfigVideoCodec, SubscriptionConfig, ) -from jellyfish.api._base_api import BaseApi +from fishjam.api._base_api import BaseApi class RoomApi(BaseApi): @@ -49,7 +49,7 @@ def __init__( secure: bool = False, ): """ - Create RoomApi instance, providing the jellyfish address and api token. + Create RoomApi instance, providing the fishjam address and api token. Set secure to `True` for `https` and `False` for `http` connection (default). """ super().__init__( @@ -70,7 +70,7 @@ def create_room( """ Creates a new room - Returns a tuple (`jellyfish_address`, `Room`) - the address of the Jellyfish + Returns a tuple (`fishjam_address`, `Room`) - the address of the Fishjam in which the room has been created and the created `Room` The returned address may be different from the current `RoomApi` instance. @@ -93,7 +93,7 @@ def create_room( ) resp = self._request(room_create_room, json_body=room_config) - return (resp.data.jellyfish_address, resp.data.room) + return (resp.data.fishjam_address, resp.data.room) def delete_room(self, room_id: str) -> None: """Deletes a room""" @@ -119,7 +119,7 @@ def add_peer( Currently only `webrtc` peer is supported Returns a tuple (`peer_token`, `Peer`) - the token needed by Peer - to authenticate to Jellyfish and the new `Peer`. + to authenticate to Fishjam and the new `Peer`. The possible options to pass for peer are `PeerOptionsWebRTC`. """ diff --git a/jellyfish/errors.py b/fishjam/errors.py similarity index 95% rename from jellyfish/errors.py rename to fishjam/errors.py index 14c83cf..453eaa4 100644 --- a/jellyfish/errors.py +++ b/fishjam/errors.py @@ -1,6 +1,6 @@ from http import HTTPStatus -from jellyfish._openapi_client.types import Response +from fishjam._openapi_client.types import Response class HTTPError(Exception): diff --git a/jellyfish/events/__init__.py b/fishjam/events/__init__.py similarity index 95% rename from jellyfish/events/__init__.py rename to fishjam/events/__init__.py index 0498ff5..2dee8ef 100644 --- a/jellyfish/events/__init__.py +++ b/fishjam/events/__init__.py @@ -3,7 +3,7 @@ """ # Exported messages -from jellyfish.events._protos.jellyfish import ( +from fishjam.events._protos.fishjam import ( ServerMessageComponentCrashed, ServerMessageHlsPlayable, ServerMessageMetricsReport, diff --git a/jellyfish/events/_protos/__init__.py b/fishjam/events/_protos/__init__.py similarity index 100% rename from jellyfish/events/_protos/__init__.py rename to fishjam/events/_protos/__init__.py diff --git a/jellyfish/events/_protos/jellyfish/__init__.py b/fishjam/events/_protos/fishjam/__init__.py similarity index 95% rename from jellyfish/events/_protos/jellyfish/__init__.py rename to fishjam/events/_protos/fishjam/__init__.py index 59947ea..cf42826 100644 --- a/jellyfish/events/_protos/jellyfish/__init__.py +++ b/fishjam/events/_protos/fishjam/__init__.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# sources: protos/jellyfish/server_notifications.proto +# sources: protos/fishjam/server_notifications.proto # plugin: python-betterproto # This file has been @generated @@ -26,7 +26,7 @@ class ServerMessageTrackType(betterproto.Enum): @dataclass(eq=False, repr=False) class ServerMessage(betterproto.Message): - """Defines any type of message passed between JF and server client""" + """Defines any type of message passed between FJ and server client""" room_crashed: "ServerMessageRoomCrashed" = betterproto.message_field( 1, group="content" @@ -126,7 +126,7 @@ class ServerMessagePeerConnected(betterproto.Message): @dataclass(eq=False, repr=False) class ServerMessagePeerDisconnected(betterproto.Message): - """Notification sent when a peer disconnects from JF""" + """Notification sent when a peer disconnects from FJ""" room_id: str = betterproto.string_field(1) peer_id: str = betterproto.string_field(2) @@ -151,14 +151,14 @@ class ServerMessageComponentCrashed(betterproto.Message): @dataclass(eq=False, repr=False) class ServerMessageAuthenticated(betterproto.Message): - """Response sent by JF, confirming successfull authentication""" + """Response sent by FJ, confirming successfull authentication""" pass @dataclass(eq=False, repr=False) class ServerMessageAuthRequest(betterproto.Message): - """Request sent by client, to authenticate to JF server""" + """Request sent by client, to authenticate to FJ server""" token: str = betterproto.string_field(1) @@ -172,7 +172,7 @@ class ServerMessageSubscribeRequest(betterproto.Message): @dataclass(eq=False, repr=False) class ServerMessageSubscribeResponse(betterproto.Message): - """Response sent by JF, confirming subscription for message type""" + """Response sent by FJ, confirming subscription for message type""" event_type: "ServerMessageEventType" = betterproto.enum_field(1) @@ -193,7 +193,7 @@ class ServerMessageRoomDeleted(betterproto.Message): @dataclass(eq=False, repr=False) class ServerMessageMetricsReport(betterproto.Message): - """Message containing WebRTC metrics from JF""" + """Message containing WebRTC metrics from FJ""" metrics: str = betterproto.string_field(1) diff --git a/mkdocs.yml b/mkdocs.yml index 5784daa..da7bd68 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Jellyfish Python Server SDK +site_name: Fishjam Python Server SDK use_directory_urls: false # theme: simple-blog diff --git a/openapi-python-client-config.yaml b/openapi-python-client-config.yaml index 04b91da..1bfe57c 100644 --- a/openapi-python-client-config.yaml +++ b/openapi-python-client-config.yaml @@ -1,2 +1,2 @@ -project_name_override: jellyfish +project_name_override: fishjam package_name_override: _openapi_client diff --git a/poetry_scripts.py b/poetry_scripts.py index 7e9dcc5..fe519b9 100644 --- a/poetry_scripts.py +++ b/poetry_scripts.py @@ -22,7 +22,7 @@ def check_exit_code(command): def run_tests(): - check_exit_code("docker rm -f jellyfish") + check_exit_code("docker rm -f fishjam") check_exit_code("docker compose -f docker-compose-test.yaml pull") check_exit_code( "docker compose -f docker-compose-test.yaml up --remove-orphans test \ @@ -70,7 +70,7 @@ def generate_docs(): --logo https://logo.swmansion.com/membrane/\?width\=70\&variant\=signetDark\ -t templates/doc \ -o doc \ - jellyfish" + fishjam" ) here = Path(__file__).parent input = here / "doc" @@ -89,8 +89,8 @@ def generate_docs(): def update_client(): check_exit_code( "openapi-python-client update\ - --url https://raw.githubusercontent.com/jellyfish-dev/" - "jellyfish/main/openapi.yaml \ + --url https://raw.githubusercontent.com/fishjam-dev/" + "fishjam/main/openapi.yaml \ --config openapi-python-client-config.yaml \ --custom-template-path=templates/openapi" ) diff --git a/protos b/protos index 7da5da1..83aa151 160000 --- a/protos +++ b/protos @@ -1 +1 @@ -Subproject commit 7da5da127c8e018ee0c845c921f598b10209271c +Subproject commit 83aa151401f9cd03fe91029d4ef2f8175fcf58f2 diff --git a/pyproject.toml b/pyproject.toml index 91349a4..f353023 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,13 @@ [tool.poetry] -name = "jellyfish-server-sdk" +name = "fishjam-server-sdk" version = "0.4.0" -description = "Python server SDK for the Jellyfish media server" -authors = ["Jellyfish Team"] -homepage = "https://github.com/jellyfish-dev/python-server-sdk" -documentation = "https://jellyfish-dev.github.io/python-server-sdk/jellyfish" +description = "Python server SDK for the Fishjam media server" +authors = ["Fishjam Team"] +homepage = "https://github.com/fishjam-dev/python-server-sdk" +documentation = "https://fishjam-dev.github.io/python-server-sdk/fishjam" license = "Apache-2.0" readme = "README.md" -packages = [{ include = "jellyfish" }] +packages = [{ include = "fishjam" }] [tool.poetry.dependencies] python = "^3.8" @@ -56,7 +56,7 @@ select = ["F", "I", "E"] ignore = [] [tool.ruff.extend-per-file-ignores] -"jellyfish/_openapi_client/**" = ["E501"] +"fishjam/_openapi_client/**" = ["E501"] [tool.pytest.ini_options] markers = [ diff --git a/templates/doc/module.html.jinja2 b/templates/doc/module.html.jinja2 index fbe9e10..87213f5 100644 --- a/templates/doc/module.html.jinja2 +++ b/templates/doc/module.html.jinja2 @@ -1,5 +1,5 @@ {% extends "frame.html.jinja2" %} -{% block title %}Jellyfish Python Server SDK{% endblock %} +{% block title %}Fishjam Python Server SDK{% endblock %} {% block nav %} {% block module_list_link %} {% set parentmodule = ".".join(module.modulename.split(".")[:-1]) %} diff --git a/tests/support/asyncio_utils.py b/tests/support/asyncio_utils.py index fbdfa06..34540d3 100644 --- a/tests/support/asyncio_utils.py +++ b/tests/support/asyncio_utils.py @@ -2,7 +2,7 @@ import asyncio -from jellyfish import Notifier +from fishjam import Notifier ASSERTION_TIMEOUT = 5.0 diff --git a/tests/support/peer_socket.py b/tests/support/peer_socket.py index 198debb..1651b4c 100644 --- a/tests/support/peer_socket.py +++ b/tests/support/peer_socket.py @@ -6,7 +6,7 @@ from websockets import client from websockets.exceptions import ConnectionClosedOK -from tests.support.protos.jellyfish import ( +from tests.support.protos.fishjam import ( PeerMessage, PeerMessageAuthenticated, PeerMessageAuthRequest, diff --git a/tests/support/protos/jellyfish/__init__.py b/tests/support/protos/fishjam/__init__.py similarity index 75% rename from tests/support/protos/jellyfish/__init__.py rename to tests/support/protos/fishjam/__init__.py index 76a88f4..4dfae38 100644 --- a/tests/support/protos/jellyfish/__init__.py +++ b/tests/support/protos/fishjam/__init__.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# sources: protos/jellyfish/peer_notifications.proto +# sources: protos/fishjam/peer_notifications.proto # plugin: python-betterproto # This file has been @generated @@ -10,7 +10,7 @@ @dataclass(eq=False, repr=False) class PeerMessage(betterproto.Message): - """Defines any type of message sent between JF and a peer""" + """Defines any type of message sent between FJ and a peer""" authenticated: "PeerMessageAuthenticated" = betterproto.message_field( 1, group="content" @@ -23,20 +23,20 @@ class PeerMessage(betterproto.Message): @dataclass(eq=False, repr=False) class PeerMessageAuthenticated(betterproto.Message): - """Response sent by JF, confirming successfull authentication""" + """Response sent by FJ, confirming successfull authentication""" pass @dataclass(eq=False, repr=False) class PeerMessageAuthRequest(betterproto.Message): - """Request sent by peer, to authenticate to JF server""" + """Request sent by peer, to authenticate to FJ server""" token: str = betterproto.string_field(1) @dataclass(eq=False, repr=False) class PeerMessageMediaEvent(betterproto.Message): - """Any type of WebRTC messages passed betweend JF and peer""" + """Any type of WebRTC messages passed betweend FJ and peer""" data: str = betterproto.string_field(1) diff --git a/tests/support/webhook_notifier.py b/tests/support/webhook_notifier.py index 8da0766..4f0419c 100644 --- a/tests/support/webhook_notifier.py +++ b/tests/support/webhook_notifier.py @@ -2,7 +2,7 @@ from flask import Flask, Response, request -from jellyfish import receive_binary +from fishjam import receive_binary app = Flask(__name__) DATA_QUEUE = None diff --git a/tests/test_notifier.py b/tests/test_notifier.py index 64a87a7..b84ee7a 100644 --- a/tests/test_notifier.py +++ b/tests/test_notifier.py @@ -9,8 +9,8 @@ import pytest import requests -from jellyfish import ComponentOptionsFile, Notifier, PeerOptionsWebRTC, RoomApi -from jellyfish.events import ( +from fishjam import ComponentOptionsFile, Notifier, PeerOptionsWebRTC, RoomApi +from fishjam.events import ( ServerMessageMetricsReport, ServerMessagePeerAdded, ServerMessagePeerConnected, @@ -25,7 +25,7 @@ from tests.support.peer_socket import PeerSocket from tests.support.webhook_notifier import run_server -HOST = "jellyfish" if os.getenv("DOCKER_TEST") == "TRUE" else "localhost" +HOST = "fishjam" if os.getenv("DOCKER_TEST") == "TRUE" else "localhost" SERVER_ADDRESS = f"{HOST}:5002" SERVER_API_TOKEN = "development" WEBHOOK_ADDRESS = "test" if os.getenv("DOCKER_TEST") == "TRUE" else "localhost" diff --git a/tests/test_recording_api.py b/tests/test_recording_api.py index 6993b6f..ee358de 100644 --- a/tests/test_recording_api.py +++ b/tests/test_recording_api.py @@ -4,10 +4,10 @@ import pytest -from jellyfish import RecordingApi -from jellyfish.errors import NotFoundError +from fishjam import RecordingApi +from fishjam.errors import NotFoundError -HOST = "jellyfish" if os.getenv("DOCKER_TEST") == "TRUE" else "localhost" +HOST = "fishjam" if os.getenv("DOCKER_TEST") == "TRUE" else "localhost" SERVER_ADDRESS = f"{HOST}:5002" SERVER_API_TOKEN = "development" diff --git a/tests/test_room_api.py b/tests/test_room_api.py index 05d5c49..12d9aca 100644 --- a/tests/test_room_api.py +++ b/tests/test_room_api.py @@ -7,7 +7,7 @@ import pytest -from jellyfish import ( +from fishjam import ( ComponentFile, ComponentHLS, ComponentOptionsFile, @@ -38,14 +38,14 @@ S3Credentials, SIPCredentials, ) -from jellyfish.errors import ( +from fishjam.errors import ( BadRequestError, NotFoundError, ServiceUnavailableError, UnauthorizedError, ) -HOST = "jellyfish" if os.getenv("DOCKER_TEST") == "TRUE" else "localhost" +HOST = "fishjam" if os.getenv("DOCKER_TEST") == "TRUE" else "localhost" SERVER_ADDRESS = f"{HOST}:5002" SERVER_API_TOKEN = "development"