Python client library for the Sus protocol
Project description
Suspycious
Suspycious is a Python implementation of the Sus protocol. It is a secure, asynchronous, and easy to use protocol for sending messages between two parties.
!!! warning "Pre-alpha software" Suspycious is currently in an early stage of development and should not be used in production.
Installation
Suspycious is available on PyPI and can be installed with pip:
pip install suspycious
Usage
The following example shows how to create a simple Sus network with a client and a server. The client sends a message to the server and the server responds with a message.
import asyncio
from sus import SusServer
from sus.common.util import Address
server = SusServer(('localhost', 5000), b"my secret key.".hex())
async def message_handler(addr: Address, p_id: int, message: bytes):
print(f"Received message from {addr}: {message.decode()}")
server.send(addr, b"Hello from the server!")
asyncio.run(server.start([message_handler]))
import asyncio
from sus import SusClient
client = SusClient(('localhost', 5000), b"server public key".hex(),
b"my protocol ID")
asyncio.run(client.start())
client.send(b"Hello from the client!")
Documentation
The documentation is available here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file suspycious-0.1.2a0.tar.gz.
File metadata
- Download URL: suspycious-0.1.2a0.tar.gz
- Upload date:
- Size: 24.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c37db48a057d89b24f3ebc0428d7fbb35d0071d9ecac9963d5c2c9ec34e4ed4
|
|
| MD5 |
d962f8f433cc3fdf72d96a855428d8d3
|
|
| BLAKE2b-256 |
0382469e39e58251df4613664011f3b8842273920686c9a545d5bee6fee98eaf
|
File details
Details for the file suspycious-0.1.2a0-py3-none-any.whl.
File metadata
- Download URL: suspycious-0.1.2a0-py3-none-any.whl
- Upload date:
- Size: 28.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44acdd3d6765a0ff75a48082287c5aad1b633128951cc0b2b489eb59655af029
|
|
| MD5 |
8b6e7aa49a2447a45dfbb085bbb1a909
|
|
| BLAKE2b-256 |
f4baeebb79752913ef97419f1888cb59ae378ba4f8e6150e3692a4dbc59abe3f
|