tribler.core.components

Attributes

CommunityT

Classes

CommunityLauncherWEndpoints

A CommunityLauncher that can supply endpoints.

BaseLauncher

The base class for all Tribler Community launchers.

Component

A glorified TaskManager. This should also really be a TaskManager.

ComponentLauncher

A launcher for components that simply need a TaskManager, not a full Community.

ContentDiscoveryComponent

Launch instructions for the content discovery community.

DatabaseComponent

Launch instructions for the database.

TorrentCheckerComponent

Launch instructions for the torrent checker.

DHTDiscoveryComponent

Launch instructions for the DHT discovery community.

RSSComponent

Launch instructions for the RSS component.

TunnelComponent

Launch instructions for the tunnel community.

VersioningComponent

Launch instructions for the versioning of Tribler.

WatchFolderComponent

Launch instructions for the watch folder.

Module Contents

tribler.core.components.CommunityT
class tribler.core.components.CommunityLauncherWEndpoints

Bases: ipv8.loader.CommunityLauncher[tribler.core.session.Session, CommunityT]

A CommunityLauncher that can supply endpoints.

get_endpoints() list[tribler.core.restapi.rest_endpoint.RESTEndpoint]

Get a list of endpoints that should be loaded.

class tribler.core.components.BaseLauncher

Bases: CommunityLauncherWEndpoints[CommunityT]

The base class for all Tribler Community launchers.

get_bootstrappers(session: tribler.core.session.Session) list[tuple[type[ipv8.bootstrapping.bootstrapper_interface.Bootstrapper], dict]]

Simply use the old Dispersy bootstrapper format.

get_walk_strategies() list[tuple[type[ipv8.peerdiscovery.discovery.DiscoveryStrategy], dict, int]]

Adhere to the default walking behavior.

get_my_peer(ipv8: ipv8_service.IPv8, session: tribler.core.session.Session) ipv8.peer.Peer

Get the default key.

class tribler.core.components.Component(settings: ipv8.overlay.SettingsClass)

Bases: ipv8.community.Community

A glorified TaskManager. This should also really be a TaskManager.

I did not make this a TaskManager because I am lazy - Quinten (2024)

bootstrappers: list[ipv8.bootstrapping.bootstrapper_interface.Bootstrapper] = []
max_peers = 0
_prefix
settings
class tribler.core.components.ComponentLauncher

Bases: CommunityLauncherWEndpoints[Component]

A launcher for components that simply need a TaskManager, not a full Community.

get_overlay_class() type[Component]

Create a fake Community.

get_my_peer(ipv8: ipv8_service.IPv8, session: tribler.core.session.Session) ipv8.peer.Peer

Our peer still uses the Tribler default key.

class tribler.core.components.ContentDiscoveryComponent

Bases: BaseLauncher[tribler.core.content_discovery.community.ContentDiscoveryCommunity]

Launch instructions for the content discovery community.

finalize(ipv8: ipv8_service.IPv8, session: tribler.core.session.Session, community: tribler.core.content_discovery.community.ContentDiscoveryCommunity) None

When we are done launching, register our REST API.

get_endpoints() list[tribler.core.restapi.rest_endpoint.RESTEndpoint]

Add the search endpoint.

class tribler.core.components.DatabaseComponent

Bases: ComponentLauncher

Launch instructions for the database.

prepare(ipv8: ipv8_service.IPv8, session: tribler.core.session.Session) None

Create the database instances we need for Tribler.

finalize(ipv8: ipv8_service.IPv8, session: tribler.core.session.Session, community: Component) None

When we are done launching, register our REST API.

get_endpoints() list[tribler.core.restapi.rest_endpoint.RESTEndpoint]

Add the database endpoint.

class tribler.core.components.TorrentCheckerComponent

Bases: ComponentLauncher

Launch instructions for the torrent checker.

prepare(overlay_provider: ipv8_service.IPv8, session: tribler.core.session.Session) None

Initialize the torrecht checker and the torrent manager.

finalize(ipv8: ipv8_service.IPv8, session: tribler.core.session.Session, community: Component) None

When we are done launching, register our REST API.

class tribler.core.components.DHTDiscoveryComponent

Bases: BaseLauncher[ipv8.dht.discovery.DHTDiscoveryCommunity]

Launch instructions for the DHT discovery community.

finalize(ipv8: ipv8_service.IPv8, session: tribler.core.session.Session, community: ipv8.dht.discovery.DHTDiscoveryCommunity) None

When we are done launching, register our REST API.

class tribler.core.components.RSSComponent

Bases: ComponentLauncher

Launch instructions for the RSS component.

finalize(ipv8: ipv8_service.IPv8, session: tribler.core.session.Session, community: Component) None

When we are done launching, register our REST API.

get_endpoints() list[tribler.core.restapi.rest_endpoint.RESTEndpoint]

Add the RSS endpoint.

class tribler.core.components.TunnelComponent

Bases: BaseLauncher[tribler.core.tunnel.community.TriblerTunnelCommunity]

Launch instructions for the tunnel community.

get_kwargs(session: tribler.core.session.Session) dict

Extend our community arguments with all necessary config settings and objects.

finalize(ipv8: ipv8_service.IPv8, session: tribler.core.session.Session, community: tribler.core.tunnel.community.TriblerTunnelCommunity) None

When we are done launching, register our REST API.

class tribler.core.components.VersioningComponent

Bases: ComponentLauncher

Launch instructions for the versioning of Tribler.

finalize(ipv8: ipv8_service.IPv8, session: tribler.core.session.Session, community: Component) None

When we are done launching, register our REST API.

get_endpoints() list[tribler.core.restapi.rest_endpoint.RESTEndpoint]

Add the database endpoint.

class tribler.core.components.WatchFolderComponent

Bases: ComponentLauncher

Launch instructions for the watch folder.

finalize(ipv8: ipv8_service.IPv8, session: tribler.core.session.Session, community: Component) None

When we are done launching, register our REST API.