Skip to main content

A small package built for my cs50p course. It includes a Peer module which provides straight forward methods to exchange messages and create/join networks

Project description

CS50P peer to peer network

A simple system to handle networking through python sockets, in a p2p style

Installation

Download PyPI library

  pip install decentralized-p2p

Import the peer class in your main file

  from peer import Peer

Usage/Examples

Declare a peer object with:

my_peer = Peer()

To create a new network, use the Peer.create_network method. You will need to specify your username, password, ip and eventual signature and encryption keys

my_peer.create_network("Username", "Password", "192.168.1.2", "None", "None")

In another file, call the sign up method to connect to the newly created network:

my_peer_2.signup("SecondUsername", "SecondPassword", "192.168.1.2")

Now you can send and receive messages respectivly with the .send() and .read() methods.

Features

  • Asyncronous message send and receive
  • Totally decentralized system, allows for wide horizontal expansion
  • Asymmetrix signature implemented through ecdsa
  • Asymmetric encryption implemented using fernet

Running Tests

To run tests, run the following command

  pytest test_project.py

Authors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

decentralized_p2p-0.0.2.tar.gz (6.8 kB view hashes)

Uploaded Source

Built Distribution

decentralized_p2p-0.0.2-py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page