libp2p
The Python implementation of the libp2p networking stack π [under development]
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
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
Metadata Files
README.md
py-libp2p
The Python implementation of the libp2p networking stack.
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:
- Host: a node in the libp2p network.
- Connection: the layer 3 connection between two nodes in a libp2p network.
- Transport: the component that creates a Connection, e.g. TCP, UDP, QUIC, etc.
- 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.
- 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.
- Secure channel: optionally establishes a secure, encrypted, and authenticated channel over the Connection.
- 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
- Website: https://libp2p.io
- Repositories: 254
- Profile: https://github.com/libp2p
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
Top Committers
| Name | 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... | ||
Committer Domains (Top 20 + Academic)
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
Pull Request Labels
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
- Homepage: https://github.com/libp2p/py-libp2p
- Documentation: https://libp2p.readthedocs.io/
- License: MIT AND Apache-2.0
-
Latest release: 0.2.9
published 8 months ago
Rankings
Dependencies
- 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
- actions/stale v3 composite
- 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
- 1111 dependencies
