multiaddr package¶
Submodules¶
multiaddr.codec module¶
multiaddr.multiaddr module¶
-
class
multiaddr.multiaddr.
Multiaddr
(string_addr=None, bytes_addr=None)[source]¶ Bases:
object
Multiaddr is a representation of multiple nested internet addresses.
Multiaddr is a cross-protocol, cross-platform format for representing internet addresses. It emphasizes explicitness and self-description.
Learn more here: https://github.com/jbenet/multiaddr
Multiaddrs have both a binary and string representation.
>>> from multiaddr import Multiaddr >>> addr = Multiaddr("/ip4/1.2.3.4/tcp/80")
Multiaddr objects are immutable, so encapsulate and decapsulate return new objects rather than modify internal state.
-
decapsulate
(other)[source]¶ Remove a Multiaddr wrapping.
- For example:
- /ip4/1.2.3.4/tcp/80 decapsulate /ip4/1.2.3.4 = /tcp/80
-
multiaddr.protocols module¶
-
class
multiaddr.protocols.
Protocol
(code, size, name, vcode)[source]¶ Bases:
object
-
code
¶
-
name
¶
-
size
¶
-
vcode
¶
-