Skip to main content

Easy to use implementation of the built in 'socket' library

Project description

SuperSockets

Easy to use implementation of python3's built in 'socket' library



Example Use

Server Configuration

''' file: example_server.py '''

from supersockets import server

#Create connection
s = server(ip="0.0.0.0", port=11000, RSA=True)

s.send("Can you here me?")
print(s.recv())


''' Output '''
~$ python3 example_server.py
Loud and clear!

Client Configuration

'''file: example_client.py '''

from supersockets import client

#Connect to server
c = client(ip="0.0.0.0", port=11000)

print(c.recv())
c.send("Loud and clear!")


''' Output '''
~$ python3 example_client.py
Can you here me?

Required Dependences From PyPi

pycryptodome >= 3.15.0

listcrypt >= 1.0.0

rapidrsa >= 1.0.0


Documentation

'''
Module to simplify the process of creating servers and clients, with seamless built in encryption options

Classes:
    server()
        Used to create a server connection that the client class can interact
        with using the send() and recv() methods.
    
        __init__(self, ip:str, port:int, key=None, RSA=False, socket_timeout=.5)

        Methods:
            create_secure_connection(self, rsa_enabled: bool) -> bool
                Uses RSA cryptography to automatically share a key between the server and client,
                for use in symmetric encryption for any future messages
            send(self, data: any) -> bool
                Sends the data
            recv() -> any
                Ensures successful receival of data sent from the 'send' method            
            
            __del__(self) -> bool
                Automatically closes the connection between the 
                client and server upon the programs end.

    client(server)
        Used to connect to an active server created by the server class,
        interactions can be made using the send() and recv() methods.
    
        __init__(self, ip:str, port:int, key=None, socket_timeout=.5)
    
        Methods:
            create_secure_connection(self) -> bool:
                Uses RSA cryptography to share a symmetric key between the server and client,
                for use in symmetric encryption for future messages

            Inherits:
                send, recv, __del__

'''

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

supersockets-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

supersockets-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file supersockets-0.1.0.tar.gz.

File metadata

  • Download URL: supersockets-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for supersockets-0.1.0.tar.gz
Algorithm Hash digest
SHA256 07edb68f3a4eef590e1739f8526676dc58340354c34526f21c7d8fc99989f100
MD5 d760bdc867e71efaa1e0445a7f002658
BLAKE2b-256 7bafde9b3cca348fd571ac92620a949fd0cd7924e99e2047ad8a696cdd3eacad

See more details on using hashes here.

File details

Details for the file supersockets-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for supersockets-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 132801ae0106982cf548edb0d6b9eeba9dc43c19cef1e9661ae321df85fbac65
MD5 56bbc40329df40afda70ef45aa7925df
BLAKE2b-256 0ffe0b3890ec8745b405e2c42046fb4647cfd2a91db722762d1b4baefdb8bbce

See more details on using hashes here.

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