libp2p

The Python implementation of the libp2p networking stack 🐍 [under development]

https://github.com/libp2p/py-libp2p

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • β—‹
    CITATION.cff file
  • βœ“
    codemeta.json file
    Found codemeta.json file
  • βœ“
    .zenodo.json file
    Found .zenodo.json file
  • β—‹
    DOI references
  • β—‹
    Academic publication links
  • βœ“
    Committers with academic emails
    6 of 58 committers (10.3%) from academic institutions
  • β—‹
    Institutional organization owner
  • β—‹
    JOSS paper metadata
  • β—‹
    Scientific vocabulary similarity
    Low similarity (14.0%) to scientific vocabulary

Keywords from Contributors

ssz versions packaging optim interactive projection sequences distribution autograd python2
Last synced: 6 months ago · JSON representation

Repository

The Python implementation of the libp2p networking stack 🐍 [under development]

Basic Info
  • Host: GitHub
  • Owner: libp2p
  • License: other
  • Language: Python
  • Default Branch: main
  • Homepage: https://libp2p.io
  • Size: 4.68 MB
Statistics
  • Stars: 552
  • Watchers: 25
  • Forks: 179
  • Open Issues: 132
  • Releases: 4
Created over 7 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Copyright

README.md

py-libp2p

py-libp2p hex logo

The Python implementation of the libp2p networking stack.

Discord PyPI version Python versions Build Status Docs build

py-libp2p has moved beyond its experimental roots and is steadily progressing toward production readiness. The core features are stable, and we’re focused on refining performance, expanding protocol support, and ensuring smooth interop with other libp2p implementations. We welcome contributions and real-world usage feedback to help us reach full production maturity.

Read more in the documentation on ReadTheDocs. View the release notes.

Maintainers

Currently maintained by @pacrob, @seetadev and @dhuseby. Please reach out to us for collaboration or active feedback. If you have questions, feel free to open a new discussion. We are also available on the libp2p Discord β€” join us at #py-libp2p sub-channel.

Feature Breakdown

py-libp2p aims for conformity with the standard libp2p modules. Below is a breakdown of the modules we have developed, are developing, and may develop in the future.

Legend: βœ…: Done Β πŸ› οΈ: In Progress/UsableΒ  🌱 Prototype/Unstable  ❌: Missing


Transports

| Transport | Status | Source | | -------------------------------------- | :--------: | :---------------------------------------------------------------------------------: | | libp2p-tcp | βœ… | source | | libp2p-quic | 🌱 | | | libp2p-websocket | 🌱 | | | libp2p-webrtc-browser-to-server | 🌱 | | | libp2p-webrtc-private-to-private | 🌱 | |


NAT Traversal

| NAT Traversal | Status | Source | | ----------------------------- | :--------: | :-----------------------------------------------------------------------------: | | libp2p-circuit-relay-v2 | βœ… | source | | libp2p-autonat | βœ… | source | | libp2p-hole-punching | βœ… | source |


Secure Communication

| Secure Communication | Status | Source | | ------------------------ | :--------: | :---------------------------------------------------------------------------: | | libp2p-noise | βœ… | source | | libp2p-tls | 🌱 | |


Discovery

| Discovery | Status | Source | | -------------------- | :--------: | :----------------------------------------------------------------------------------: | | bootstrap | βœ… | source | | random-walk | βœ… | source | | mdns-discovery | βœ… | source | | rendezvous | 🌱 | |


Peer Routing

| Peer Routing | Status | Source | | -------------------- | :--------: | :--------------------------------------------------------------------: | | libp2p-kad-dht | βœ… | source |


Publish/Subscribe

| Publish/Subscribe | Status | Source | | ---------------------- | :--------: | :--------------------------------------------------------------------------------: | | libp2p-floodsub | βœ… | source | | libp2p-gossipsub | βœ… | source |


Stream Muxers

| Stream Muxers | Status | Source | | ------------------ | :--------: | :-------------------------------------------------------------------------------: | | libp2p-yamux | βœ… | source | | libp2p-mplex | βœ… | source |


Storage

| Storage | Status | | ------------------- | :--------: | | libp2p-record | 🌱 |


General Purpose Utilities & Datatypes

| Utility/Datatype | Status | Source | | --------------------- | :--------: | :------------------------------------------------------------------------------------------: | | libp2p-ping | βœ… | source | | libp2p-peer | βœ… | source | | libp2p-identify | βœ… | source |


Explanation of Basic Two Node Communication

Core Concepts

(non-normative, useful for team notes, not a reference)

Several components of the libp2p stack take part when establishing a connection between two nodes:

  1. Host: a node in the libp2p network.
  2. Connection: the layer 3 connection between two nodes in a libp2p network.
  3. Transport: the component that creates a Connection, e.g. TCP, UDP, QUIC, etc.
  4. Streams: an abstraction on top of a Connection representing parallel conversations about different matters, each of which is identified by a protocol ID. Multiple streams are layered on top of a Connection via the Multiplexer.
  5. Multiplexer: a component that is responsible for wrapping messages sent on a stream with an envelope that identifies the stream they pertain to, normally via an ID. The multiplexer on the other unwraps the message and routes it internally based on the stream identification.
  6. Secure channel: optionally establishes a secure, encrypted, and authenticated channel over the Connection.
  7. Upgrader: a component that takes a raw layer 3 connection returned by the Transport, and performs the security and multiplexing negotiation to set up a secure, multiplexed channel on top of which Streams can be opened.

Communication between two hosts X and Y

(non-normative, useful for team notes, not a reference)

Initiate the connection: A host is simply a node in the libp2p network that is able to communicate with other nodes in the network. In order for X and Y to communicate with one another, one of the hosts must initiate the connection. Let's say that X is going to initiate the connection. X will first open a connection to Y. This connection is where all of the actual communication will take place.

Communication over one connection with multiple protocols: X and Y can communicate over the same connection using different protocols and the multiplexer will appropriately route messages for a given protocol to a particular handler function for that protocol, which allows for each host to handle different protocols with separate functions. Furthermore, we can use multiple streams for a given protocol that allow for the same protocol and same underlying connection to be used for communication about separate topics between nodes X and Y.

Why use multiple streams?: The purpose of using the same connection for multiple streams to communicate over is to avoid the overhead of having multiple connections between X and Y. In order for X and Y to differentiate between messages on different streams and different protocols, a multiplexer is used to encode the messages when a message will be sent and decode a message when a message is received. The multiplexer encodes the message by adding a header to the beginning of any message to be sent that contains the stream id (along with some other info). Then, the message is sent across the raw connection and the receiving host will use its multiplexer to decode the message, i.e. determine which stream id the message should be routed to.

Owner

  • Name: libp2p
  • Login: libp2p
  • Kind: organization
  • Email: contact@libp2p.io
  • Location: Earth

Modular peer-to-peer networking stack (used by IPFS and others)

GitHub Events

Total
  • Fork event: 48
  • Create event: 10
  • Commit comment event: 2
  • Issues event: 153
  • Watch event: 74
  • Delete event: 17
  • Member event: 2
  • Issue comment event: 1,041
  • Push event: 111
  • Gollum event: 3
  • Pull request review comment event: 263
  • Pull request review event: 309
  • Pull request event: 304
Last Year
  • Fork event: 48
  • Create event: 10
  • Commit comment event: 2
  • Issues event: 153
  • Watch event: 74
  • Delete event: 17
  • Member event: 2
  • Issue comment event: 1,041
  • Push event: 111
  • Gollum event: 3
  • Pull request review comment event: 263
  • Pull request review event: 309
  • Pull request event: 304

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 1,588
  • Total Committers: 58
  • Avg Commits per committer: 27.379
  • Development Distribution Score (DDS): 0.798
Past Year
  • Commits: 167
  • Committers: 17
  • Avg Commits per committer: 9.824
  • Development Distribution Score (DDS): 0.701
Top Committers
Name Email Commits
mhchia k****a@g****m 320
NIC619 t****k@g****m 200
Alex Stokes r****s@g****m 188
pacrob 5****b 129
Stuckinaboot a****n@s****u 123
zixuanzh z****h@s****u 115
Jason Carver u****s@s****m 106
Alex Haynes a****s@s****u 56
Robert Zajac r****c@s****u 49
Chih Cheng Liang c****g@g****m 35
acul71 l****i@b****t 31
mystical-prog j****5@g****m 29
Dominik Muhs d****s@p****h 21
David Sanders d****e@g****m 17
Jonathan de Jong j****2@g****m 16
Christophe de Carvalho Pereira Martins c****m@g****m 15
kclowes k****s 14
Winter-Soren s****r@s****u 13
Khwahish Patel k****1@a****n 12
paschal533 o****l@g****m 11
fselmo f****2@g****m 7
Aratz M. Lasa a****l@o****s 7
Alexander Koshkin a****n@p****m 7
Stuart Reed s****d@e****g 6
Reza Ameli r****i@r****v 5
sumanjeet0012@gmail.com s****2@g****m 5
GitHub n****y@g****m 4
Taneli Hukkinen h****1 4
Dave Huseby d****y 4
swedneck 4****k 3
and 28 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 182
  • Total pull requests: 382
  • Average time to close issues: over 1 year
  • Average time to close pull requests: 2 months
  • Total issue authors: 49
  • Total pull request authors: 60
  • Average comments per issue: 1.66
  • Average comments per pull request: 3.29
  • Merged pull requests: 224
  • Bot issues: 0
  • Bot pull requests: 7
Past Year
  • Issues: 111
  • Pull requests: 279
  • Average time to close issues: 13 days
  • Average time to close pull requests: 12 days
  • Issue authors: 25
  • Pull request authors: 40
  • Average comments per issue: 1.05
  • Average comments per pull request: 3.97
  • Merged pull requests: 156
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
  • seetadev (25)
  • acul71 (21)
  • ralexstokes (19)
  • dhuseby (9)
  • ShadowJonathan (8)
  • sukhman-sukh (8)
  • paschal533 (7)
  • mhchia (7)
  • bomanaps (5)
  • pacrob (4)
  • varun-r-mallya (4)
  • guha-rahul (4)
  • ChihChengLiang (3)
  • sumanjeet0012 (3)
  • stuckinaboot (3)
Pull Request Authors
  • pacrob (68)
  • acul71 (37)
  • paschal533 (28)
  • Khwahish29 (25)
  • mystical-prog (24)
  • lla-dane (21)
  • sumanjeet0012 (12)
  • mhchia (11)
  • varun-r-mallya (10)
  • Winter-Soren (9)
  • ShadowJonathan (9)
  • guha-rahul (9)
  • sukhman-sukh (9)
  • dependabot[bot] (7)
  • NIC619 (6)
Top Labels
Issue Labels
help wanted (20) enhancement (6) Interoperability (3) good first issue (3) feature (2) discussion (1) cleanup (1) education (1)
Pull Request Labels
dependencies (7) python (2) feature (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 653 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 16
  • Total maintainers: 2
  • Total advisories: 1
pypi.org: libp2p

libp2p: The Python implementation of the libp2p networking stack

  • Versions: 16
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 653 Last month
Rankings
Stargazers count: 3.2%
Forks count: 4.6%
Downloads: 6.9%
Average: 9.3%
Dependent packages count: 10.0%
Dependent repos count: 21.7%
Maintainers (2)
Last synced: 6 months ago

Dependencies

setup.py pypi
  • async-exit-stack ==1.0.1
  • async-service >=0.1.0a6
  • async_generator ==1.10
  • base58 >=1.0.3,<2.0.0
  • coincurve >=10.0.0,<11.0.0
  • dataclasses >=0.7,
  • lru-dict >=1.1.6
  • multiaddr >=0.0.9,<0.1.0
  • noiseprotocol >=0.3.0,<0.4.0
  • protobuf >=3.10.0,<4.0.0
  • pycryptodome >=3.9.2,<4.0.0
  • pymultihash >=0.8.2
  • pynacl ==1.3.0
  • rpcudp >=3.0.0,<4.0.0
  • trio >=0.15.0
.github/workflows/stale.yml actions
  • actions/stale v3 composite
pyproject.toml pypi
tests/interop/go_pkgs/examples/go.mod go
  • github.com/ipfs/go-log v1.0.5
  • github.com/libp2p/go-libp2p v0.27.8
  • github.com/libp2p/go-libp2p-core v0.19.0
  • github.com/libp2p/go-libp2p-noise v0.3.0
  • github.com/libp2p/go-libp2p-secio v0.2.2
  • github.com/multiformats/go-multiaddr v0.9.0
tests/interop/go_pkgs/examples/go.sum go
  • 1111 dependencies