Skip to content

P2P

Bases: Base

ORM model for the local P2P endpoint.

Attributes:

Name Type Description
uid int

Primary key.

time datetime

Timestamp of the record.

full_json dict

Full JSON data.

connections int

Number of connections.

incoming_connections int

Number of incoming connections.

peer_list_size int

Size of the peer list.

peers dict

List of peers.

uptime int

Uptime of the P2P connection.

Source code in p2pool/models.py
class P2P(Base):
    """
    ORM model for the local P2P endpoint.

    Attributes:
        uid (int): Primary key.
        time (datetime): Timestamp of the record.
        full_json (dict): Full JSON data.
        connections (int): Number of connections.
        incoming_connections (int): Number of incoming connections.
        peer_list_size (int): Size of the peer list.
        peers (dict): List of peers.
        uptime (int): Uptime of the P2P connection.
    """
    __tablename__ = 'p2p'
    uid = Column(Integer, primary_key=True)
    time = Column(DateTime, default=datetime.now)
    full_json = Column(JSON)
    connections = Column(Integer)
    incoming_connections = Column(Integer)
    peer_list_size = Column(Integer)
    peers = Column(JSON)
    uptime = Column(Integer)