Library for UPSS
Project description
UPSS — Secure Communication Protocol Library for Python
UPSS is a lightweight, security-first Python library implementing the UPSS protocol — a custom communication protocol designed with end-to-end encryption, secure session handling, and structured message exchange over TCP sockets.
Built for developers who prioritize data confidentiality and integrity, UPSS abstracts low-level socket programming while enforcing cryptographic best practices out of the box.
🔐 Key Features
- Mandatory encryption: All payloads are encrypted using symmetric cryptography (
cryptography). - Route-based request handling: Decorator-style endpoint registration.
- Structured data model: Messages are encapsulated in typed
Packageobjects with status, type, and payload. - Client & server utilities: Full-stack support with minimal boilerplate.
🚀 Quick Start
Installation
pip install upss
Server Example
from upss import UPSS
from upss.security import cryptographer
app = UPSS(
addr="localhost",
port=1234,
encoding="utf-8",
crypto=cryptographer.generate_crypto()
)
# Example handle "/"
@app.url("/")
def auth_handler(client_sock, encoding, key, data):
print(cryptographer.decrypt_data(data["msg"], encoding, key)) # Hello Server!!!
pass
if __name__ == "__main__":
app.run()
Client Example
from upss import client
from upss.security import cryptographer
from cryptography.fernet import Fernet
key = Fernet.generate_key()
data = {
"msg": cryptographer.encrypt_data("Hello Server!!!", "utf-8", key)
}
# Connect to "/"
client.connect("upss://localhost:1234", encoding="utf-8", send_data=data, key=key)
🔒 Security Model
Symmetric encryption only: keys are automatically transmitted via a handshake. The protocol requires constant updating of encryption keys. Plaintext is not allowed: the protocol assumes that all data fields are encrypted;
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 Distributions
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 upss_py-0.0.1-py3-none-any.whl.
File metadata
- Download URL: upss_py-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7fde4caf02057825161268024408167917eeb86e4a8ddc6e2701fe3a95553da
|
|
| MD5 |
95c87bc22a8f7fb82c75717c41f88165
|
|
| BLAKE2b-256 |
680a55eb4ee8413e9eb877c5564c3b87ec3f504bd5af330e0c4be8966a8a0cbe
|