tribler.tribler_config

Note: after making changes to this file, run it to generate the pyi types!

Attributes

logger

IPv8BootstrapperConfig

An IPv8 bootstrapper configuration.

IPv8OverlayConfig

An IPv8 overlay launch config.

DEFAULT_CONFIG

VERSION_SUBDIR

Classes

IPv8InterfaceConfig

An IPv8 network interface.

IPv8KeysConfig

An IPv8 key configuration.

IPv8LoggerConfig

The IPv8 logger configuration.

IPv8WalkerConfig

An IPv8 walker configuration.

IPv8Config

The main IPv8 configuration dictionary.

ApiConfig

Settings for the API key component.

ContentDiscoveryCommunityConfig

Settings for the content discovery component.

DHTDiscoveryCommunityConfig

Settings for the DHT discovery component.

DatabaseConfig

Settings for the database component.

VersioningConfig

Settings for the versioning component.

DownloadDefaultsConfig

Settings for default downloads, used by libtorrent.

LibtorrentConfig

Settings for the libtorrent component.

RecommenderConfig

Settings for the user recommender component.

RendezvousConfig

Settings for the rendezvous component.

RSSConfig

Settings for the rss component.

TorrentCheckerConfig

Settings for the torrent checker component.

TunnelCommunityConfig

Settings for the tunnel community component.

WatchFolderConfig

Settings for the watch folder component.

TriblerConfig

The main Tribler settings and all of its components' sub-settings.

TriblerConfigManager

A class that interacts with a JSON configuration file.

Functions

_produce_set_overload(→ str)

Module Contents

tribler.tribler_config.logger
class tribler.tribler_config.IPv8InterfaceConfig

Bases: TypedDict

An IPv8 network interface.

interface: str
ip: str
port: int
worker_threads: NotRequired[int]
class tribler.tribler_config.IPv8KeysConfig

Bases: TypedDict

An IPv8 key configuration.

alias: str
generation: str
file: str
class tribler.tribler_config.IPv8LoggerConfig

Bases: TypedDict

The IPv8 logger configuration.

level: str
class tribler.tribler_config.IPv8WalkerConfig

Bases: TypedDict

An IPv8 walker configuration.

strategy: str
peers: int
init: dict
tribler.tribler_config.IPv8BootstrapperConfig

An IPv8 bootstrapper configuration.

tribler.tribler_config.IPv8OverlayConfig

An IPv8 overlay launch config.

class tribler.tribler_config.IPv8Config

Bases: TypedDict

The main IPv8 configuration dictionary.

interfaces: list[IPv8InterfaceConfig]
keys: list[IPv8KeysConfig]

D.keys() -> a set-like object providing a view on D’s keys

logger: IPv8LoggerConfig
working_directory: str
walker_interval: float
overlays: list[IPv8OverlayConfig]
class tribler.tribler_config.ApiConfig

Bases: TypedDict

Settings for the API key component.

key: str
http_enabled: bool
http_port: int
http_host: str
https_enabled: bool
https_host: str
https_port: int
https_certfile: str
http_port_running: int
https_port_running: int
class tribler.tribler_config.ContentDiscoveryCommunityConfig

Bases: TypedDict

Settings for the content discovery component.

enabled: bool
class tribler.tribler_config.DHTDiscoveryCommunityConfig

Bases: TypedDict

Settings for the DHT discovery component.

enabled: bool
class tribler.tribler_config.DatabaseConfig

Bases: TypedDict

Settings for the database component.

enabled: bool
class tribler.tribler_config.VersioningConfig

Bases: TypedDict

Settings for the versioning component.

enabled: bool
allow_pre: bool
class tribler.tribler_config.DownloadDefaultsConfig

Bases: TypedDict

Settings for default downloads, used by libtorrent.

anonymity_enabled: bool
number_hops: int
safeseeding_enabled: bool
saveas: str
seeding_mode: str
seeding_ratio: float
seeding_time: float
channel_download: bool
add_download_to_channel: bool
trackers_file: str
torrent_folder: str
auto_managed: bool
completed_dir: str
class tribler.tribler_config.LibtorrentConfig

Bases: TypedDict

Settings for the libtorrent component.

socks_listen_ports: list[int]
listen_interface: str
port: int
proxy_type: int
proxy_server: str
proxy_auth: str
max_connections_download: int
max_download_rate: int
max_upload_rate: int
use_advanced_rate_limits: bool
advanced_rate_limits: dict[str, str]
utp: bool
dht: bool
dht_readiness_timeout: int
upnp: bool
natpmp: bool
lsd: bool
announce_to_all_tiers: bool
announce_to_all_trackers: bool
max_concurrent_http_announces: int
check_after_complete: bool
download_defaults: DownloadDefaultsConfig
active_downloads: int
active_seeds: int
active_checking: int
active_dht_limit: int
active_tracker_limit: int
active_lsd_limit: int
active_limit: int
ask_download_settings: bool
clear_orphaned_parts: bool
allow_mmap: bool
class tribler.tribler_config.RecommenderConfig

Bases: TypedDict

Settings for the user recommender component.

enabled: bool
class tribler.tribler_config.RendezvousConfig

Bases: TypedDict

Settings for the rendezvous component.

enabled: bool
class tribler.tribler_config.RSSConfig

Bases: TypedDict

Settings for the rss component.

enabled: bool
urls: list[str]
class tribler.tribler_config.TorrentCheckerConfig

Bases: TypedDict

Settings for the torrent checker component.

enabled: bool
class tribler.tribler_config.TunnelCommunityConfig

Bases: TypedDict

Settings for the tunnel community component.

enabled: bool
min_circuits: int
max_circuits: int
class tribler.tribler_config.WatchFolderConfig

Bases: TypedDict

Settings for the watch folder component.

enabled: bool
directory: str
check_interval: float
class tribler.tribler_config.TriblerConfig

Bases: TypedDict

The main Tribler settings and all of its components’ sub-settings.

api: ApiConfig
headless: bool
start_minimized: bool
ipv8: IPv8Config
statistics: bool
content_discovery_community: ContentDiscoveryCommunityConfig
database: DatabaseConfig
libtorrent: LibtorrentConfig
recommender: RecommenderConfig
rendezvous: RendezvousConfig
rss: RSSConfig
torrent_checker: TorrentCheckerConfig
tunnel_community: TunnelCommunityConfig
versioning: VersioningConfig
watch_folder: WatchFolderConfig
state_dir: str
memory_db: bool
tray_icon_color: str
ui: dict
tribler.tribler_config.DEFAULT_CONFIG
tribler.tribler_config.VERSION_SUBDIR
class tribler.tribler_config.TriblerConfigManager(config_file: pathlib.Path = Path('configuration.json'))

A class that interacts with a JSON configuration file.

config_file
configuration
write() None

Write the configuration to disk.

get(option: str) dict | list | str | float | bool | None

Get a config option based on the path-like descriptor.

get_version_state_dir() str

Get the state dir for our current version.

set(option: str, value: dict | list | str | float | bool | None) None

Set a config option value based on the path-like descriptor.

tribler.tribler_config._produce_set_overload(key: str, value_type: str) str