tribler.core.session ==================== .. py:module:: tribler.core.session Attributes ---------- .. autoapisummary:: tribler.core.session.logger Classes ------- .. autoapisummary:: tribler.core.session.IPv8Endpoint tribler.core.session.Session Functions --------- .. autoapisummary:: tribler.core.session._is_url_available tribler.core.session.rescue_keys Module Contents --------------- .. py:data:: logger .. py:function:: _is_url_available(url: str, timeout: int = 1) -> tuple[bool, bytes | None] :async: .. py:function:: rescue_keys(config: tribler.tribler_config.TriblerConfigManager) -> None Check and rescue private keys if necessary. .. py:class:: IPv8Endpoint Bases: :py:obj:`ipv8.messaging.interfaces.dispatcher.endpoint.DispatcherEndpoint` An DispatcherEndpoint that allows its preferred interface to be updated. .. py:method:: update_preferred_interface() -> None Update the preferred interface. .. py:class:: Session(config: tribler.tribler_config.TriblerConfigManager) A session manager that manages all components. .. py:attribute:: config .. py:attribute:: shutdown_event .. py:attribute:: restart_requested :value: False .. py:attribute:: notifier .. py:attribute:: download_manager .. py:attribute:: rust_endpoint :type: ipv8_rust_tunnels.Endpoint | None :value: None .. py:attribute:: ipv8 .. py:attribute:: loader .. py:attribute:: rest_manager .. py:attribute:: mds :type: tribler.core.database.store.MetadataStore | None :value: None .. py:attribute:: torrent_checker :type: tribler.core.torrent_checker.torrent_checker.TorrentChecker | None :value: None .. py:method:: register_launchers() -> None Register all IPv8 launchers that allow communities to be loaded. .. py:method:: register_rest_endpoints() -> None Register all core REST endpoints without initializing them. .. py:method:: _except_hook(typ: type[BaseException], value: BaseException, traceback: types.TracebackType | None) -> None Handle an uncaught exception. Note: at this point the REST interface is available. Note2: ignored BaseExceptions are BaseExceptionGroup, GeneratorExit, KeyboardInterrupt and SystemExit .. py:method:: _asyncio_except_hook(loop: asyncio.AbstractEventLoop, context: dict[str, Any]) -> None Handle an uncaught asyncio exception. Note: at this point the REST interface is available. Note2: ignored BaseExceptions are BaseExceptionGroup, GeneratorExit, KeyboardInterrupt and SystemExit .. py:method:: attach_exception_handler() -> None Hook ourselves in as the general exception handler. .. py:method:: start() -> None :async: Initialize and launch all components and REST endpoints. .. py:method:: find_api_server() -> tuple[str | None, bytes | None] :async: Find the API server, if available. .. py:method:: shutdown() -> None :async: Shut down all connections and components.