tribler.core.restapi.statistics_endpoint
Classes
Socks5 statistics entry. |
|
Statistics for a single libtorrent session. |
|
Statistics for the entirety of libtorrent. |
|
Tribler statistics. |
|
This endpoint is responsible for handing requests regarding statistics in Tribler. |
Module Contents
- class tribler.core.restapi.statistics_endpoint.Socks5StatsDict
Bases:
TypedDictSocks5 statistics entry.
- class tribler.core.restapi.statistics_endpoint.LibtorrentSessionStatsDict
Bases:
TypedDictStatistics for a single libtorrent session.
- class tribler.core.restapi.statistics_endpoint.LibtorrentStatsDict
Bases:
TypedDictStatistics for the entirety of libtorrent.
- sessions: list[LibtorrentSessionStatsDict]
- class tribler.core.restapi.statistics_endpoint.TriblerStatsDict
Bases:
TypedDictTribler statistics.
- socks5_sessions: NotRequired[list[Socks5StatsDict]]
- libtorrent: NotRequired[LibtorrentStatsDict]
- class tribler.core.restapi.statistics_endpoint.StatisticsEndpoint(middlewares: tuple = (), client_max_size: int = MAX_REQUEST_SIZE)
Bases:
tribler.core.restapi.rest_endpoint.RESTEndpointThis endpoint is responsible for handing requests regarding statistics in Tribler.
- path = '/api/statistics'
- session: tribler.core.session.Session | None = None
- content_discovery_community: tribler.core.content_discovery.community.ContentDiscoveryCommunity | None = None
- get_tribler_stats(_: aiohttp.web.Request) tribler.core.restapi.rest_endpoint.RESTResponse
Return general statistics of Tribler.
- get_ipv8_stats(_: aiohttp.web.Request) tribler.core.restapi.rest_endpoint.RESTResponse
Return general statistics of IPv8.
- async get_dirspace_stats(request: aiohttp.web.Request) tribler.core.restapi.rest_endpoint.RESTResponse
Return disk space statistics for a given directory.
This method fits the download logic: if the given directory does not exist, the folder is created. So, to account for future folders, this method returns the stats for the first parent folder of the given folder if it does not exist (yet).