An open API service indexing awesome lists of open source software.

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

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.