https://github.com/pj8912/python_p2p
Peer-to-Peer network in python
https://github.com/pj8912/python_p2p
decentralized-applications hybrid-approach p2p p2p-networks p2p-node peer-to-peer python python-socket
Last synced: 10 days ago
JSON representation
Peer-to-Peer network in python
- Host: GitHub
- URL: https://github.com/pj8912/python_p2p
- Owner: pj8912
- License: apache-2.0
- Created: 2022-08-18T12:34:04.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-08T03:12:01.000Z (about 3 years ago)
- Last Synced: 2025-02-28T22:11:54.525Z (over 1 year ago)
- Topics: decentralized-applications, hybrid-approach, p2p, p2p-networks, p2p-node, peer-to-peer, python, python-socket
- Language: Python
- Homepage: https://github.com/pj8912/python_p2p
- Size: 43.9 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# python_p2p
Peer-to-Peer network in python
This is a peer-to-peer network built using Python programming language. The network enables direct communication between nodes (peers) in the network without the need for a central server.
> UPDATE : Rewrote the p2p network with `asyncio`
## Requirements
- Python 3.x
- Required packages:
- `asyncio`
## Get Started
### Clone repo
```
git clone https://github.com/pj8912/python_p2p.git
```
```
cd python_p2p
```
### Start
```
python peer.py
```
## Working
- The network uses asyncion to create the server client connection
- To run this in a single machine clone/copy the repo folder somewhere else and change the server and client ports
- Example
- `Node 1` : `server:6000`, `client:4000`
- `Node 2` : `server:4000`, `client:6000`
- So `Node 1` server connects to `Node 2` client via `port:6000`
- On a real p2p network, only one node runs per machine, so you wouldn't have these problems.
## Limitations
- The network does not support secure communication and is vulnerable to hacking and eavesdropping.
- **Not for production**
## Contribution
- If you are interested in contributing to the development of the P2P network, you can create a pull request with your changes. All contributions are welcome and appreciated.