Diagnostic

Diagnostic

class Diagnostic(**kwargs)

Implements the diagnostic api endpoints.

get_connectedpeers_info(**kwargs) → pystratis.api.diagnostic.responsemodels.getconnectedpeersinfomodel.GetConnectedPeersInfoModel

Get connected peers info.

Parameters:**kwargs – Extra keyword arguments.
Returns:Information on connected peers.
Return type:GetConnectedPeersInfoModel
Raises:APIError – Error thrown by node API. See message for details.
get_peer_statistics(connected_only: bool, **kwargs) → List[pystratis.api.diagnostic.responsemodels.peerstatisticsmodel.PeerStatisticsModel]

Gets statistics for connected peers.

Parameters:
  • connected_only (bool) – To show data for only connected nodes.
  • **kwargs – Extra keyword arguments.
Returns:

A list of statistics on the connected peers.

Return type:

List[PeerStatisticsModel]

Raises:

APIError – Error thrown by node API. See message for details.

get_status(**kwargs) → pystratis.api.diagnostic.responsemodels.getstatusmodel.GetStatusModel

Get the diagnostic feature status.

Parameters:**kwargs – Extra keyword arguments.
Returns:The feature status.
Return type:GetStatusModel
Raises:APIError – Error thrown by node API. See message for details.
start_collecting_peerstatistics(**kwargs) → str

Start collecting peer statistics.

Parameters:**kwargs – Extra keyword arguments.
Returns:The status of the feature.
Return type:str
Raises:APIError – Error thrown by node API. See message for details.
stop_collecting_peerstatistics(**kwargs) → str

Stop collecting peer statistics.

Parameters:**kwargs – Extra keyword arguments.
Returns:The status of the feature.
Return type:str
Raises:APIError – Error thrown by node API. See message for details.

ConnectedPeerInfoModel

class ConnectedPeerInfoModel

A pydantic model representing connected peer information.

GetConnectedPeersInfoModel

class GetConnectedPeersInfoModel

A pydantic model for connected peer information.

GetStatusModel

class GetStatusModel

A pydantic model for status of diagnostics collection service.

PeerStatisticsModel

class PeerStatisticsModel

A pydantic model for peer statistics.