mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
refactored and moved all interfaces to abc.py (#504)
* refactored : host_interface Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com> * refactored : network_interface Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com> * refactored : notifee_interface Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com> * refactored : net_connection_interface Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com> * refactored: raw_connection_interface, secure_conn_interface and stream_muxer abc.py * refactored: addrbook_interface * refactored :peerdata_interface Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com> * refactored :peermetadata_interface Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com> * refactored :multiselect_client_interface Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com> * refactored :multiselect_communicator_interface Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com> * refactored :multiselect_muxer_interface Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com> * refactored :interfaces Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com> * refactored :security_transport_interface Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com> * refactored :listener_interface Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com> * moved all interfaces and typing files Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com> * fixed documentation and moved pubsub abc.py Co-authored-by: Khwahish Patel <khwahish.p1@ahduni.edu.in> * added exclude-members in custom_types docs * added : newsfragment for moving all interfaces to libp2p.abc --------- Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com> Co-authored-by: Mystical <125946525+mystical-prog@users.noreply.github.com>
This commit is contained in:
@ -22,6 +22,15 @@ from libp2p import (
|
||||
generate_new_rsa_identity,
|
||||
generate_peer_id_from,
|
||||
)
|
||||
from libp2p.abc import (
|
||||
IHost,
|
||||
INetStream,
|
||||
IPeerRouting,
|
||||
IPubsubRouter,
|
||||
IRawConnection,
|
||||
ISecureConn,
|
||||
ISecureTransport,
|
||||
)
|
||||
from libp2p.crypto.ed25519 import create_new_key_pair as create_ed25519_key_pair
|
||||
from libp2p.crypto.keys import (
|
||||
KeyPair,
|
||||
@ -29,14 +38,13 @@ from libp2p.crypto.keys import (
|
||||
)
|
||||
from libp2p.crypto.secp256k1 import create_new_key_pair as create_secp256k1_key_pair
|
||||
from libp2p.custom_types import (
|
||||
TMuxerOptions,
|
||||
TProtocol,
|
||||
TSecurityOptions,
|
||||
)
|
||||
from libp2p.host.basic_host import (
|
||||
BasicHost,
|
||||
)
|
||||
from libp2p.host.host_interface import (
|
||||
IHost,
|
||||
)
|
||||
from libp2p.host.routed_host import (
|
||||
RoutedHost,
|
||||
)
|
||||
@ -46,15 +54,9 @@ from libp2p.io.abc import (
|
||||
from libp2p.network.connection.raw_connection import (
|
||||
RawConnection,
|
||||
)
|
||||
from libp2p.network.connection.raw_connection_interface import (
|
||||
IRawConnection,
|
||||
)
|
||||
from libp2p.network.connection.swarm_connection import (
|
||||
SwarmConn,
|
||||
)
|
||||
from libp2p.network.stream.net_stream_interface import (
|
||||
INetStream,
|
||||
)
|
||||
from libp2p.network.swarm import (
|
||||
Swarm,
|
||||
)
|
||||
@ -67,9 +69,6 @@ from libp2p.peer.peerinfo import (
|
||||
from libp2p.peer.peerstore import (
|
||||
PeerStore,
|
||||
)
|
||||
from libp2p.pubsub.abc import (
|
||||
IPubsubRouter,
|
||||
)
|
||||
from libp2p.pubsub.floodsub import (
|
||||
FloodSub,
|
||||
)
|
||||
@ -81,9 +80,6 @@ from libp2p.pubsub.pubsub import (
|
||||
Pubsub,
|
||||
get_peer_and_seqno_msg_id,
|
||||
)
|
||||
from libp2p.routing.interfaces import (
|
||||
IPeerRouting,
|
||||
)
|
||||
from libp2p.security.insecure.transport import (
|
||||
PLAINTEXT_PROTOCOL_ID,
|
||||
InsecureTransport,
|
||||
@ -95,12 +91,6 @@ from libp2p.security.noise.messages import (
|
||||
from libp2p.security.noise.transport import PROTOCOL_ID as NOISE_PROTOCOL_ID
|
||||
from libp2p.security.noise.transport import Transport as NoiseTransport
|
||||
import libp2p.security.secio.transport as secio
|
||||
from libp2p.security.secure_conn_interface import (
|
||||
ISecureConn,
|
||||
)
|
||||
from libp2p.security.secure_transport_interface import (
|
||||
ISecureTransport,
|
||||
)
|
||||
from libp2p.stream_muxer.mplex.mplex import (
|
||||
MPLEX_PROTOCOL_ID,
|
||||
Mplex,
|
||||
@ -117,10 +107,6 @@ from libp2p.tools.constants import (
|
||||
from libp2p.transport.tcp.tcp import (
|
||||
TCP,
|
||||
)
|
||||
from libp2p.transport.typing import (
|
||||
TMuxerOptions,
|
||||
TSecurityOptions,
|
||||
)
|
||||
from libp2p.transport.upgrader import (
|
||||
TransportUpgrader,
|
||||
)
|
||||
|
||||
@ -6,7 +6,7 @@ from contextlib import (
|
||||
asynccontextmanager,
|
||||
)
|
||||
|
||||
from libp2p.host.host_interface import (
|
||||
from libp2p.abc import (
|
||||
IHost,
|
||||
)
|
||||
from libp2p.pubsub.pubsub import (
|
||||
|
||||
@ -2,7 +2,7 @@ from collections.abc import (
|
||||
Sequence,
|
||||
)
|
||||
|
||||
from libp2p.host.host_interface import (
|
||||
from libp2p.abc import (
|
||||
IHost,
|
||||
)
|
||||
from libp2p.peer.id import (
|
||||
|
||||
@ -5,15 +5,13 @@ from typing import (
|
||||
Callable,
|
||||
)
|
||||
|
||||
from libp2p.host.host_interface import (
|
||||
from libp2p.abc import (
|
||||
IHost,
|
||||
INetStream,
|
||||
)
|
||||
from libp2p.network.stream.exceptions import (
|
||||
StreamError,
|
||||
)
|
||||
from libp2p.network.stream.net_stream_interface import (
|
||||
INetStream,
|
||||
)
|
||||
from libp2p.network.swarm import (
|
||||
Swarm,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user