A simple data handling and encryption package.
Project description
Data Handles Package
A simple Python package for data encryption, decryption, hashing, and MySQL database handling via sockets.
Features
- Encryption & Decryption: AES, DES, 3DES, Blowfish, RC4
- Hashing: SHA-256, SHA-512, MD5
- Socket-based MySQL handling: CRUD operations without external MySQL connectors
Installation
pip install data_handles
Usage
Encryption & Hashing
from data_handles import crypto
# Hashing example
hashed_value = crypto("hash", "mydata", b"mykey", "SHA-256")
# Encryption example
encrypted_value = crypto("encrypt", "mydata", b"mykey", "AES")
# Decryption example
decrypted_value = crypto("decrypt", encrypted_value, b"mykey", "AES")
MySQL Socket Handler
from data_handles import MySQLSocketHandler
# Initialize handler
mysql_handler = MySQLSocketHandler("127.0.0.1", 3306)
# Create table
mysql_handler.create_table("users", ["id INT PRIMARY KEY", "name VARCHAR(100)"])
# Insert data
mysql_handler.insert("users", {"id": 1, "name": "John Doe"})
# Read data
print(mysql_handler.read_one("users", {"id": 1}))
# Update data
mysql_handler.update("users", {"name": "Jane Doe"}, {"id": 1})
# Delete data
mysql_handler.delete("users", {"id": 1})
# Close connection
mysql_handler.close()
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
data_handles-0.1.2.tar.gz
(5.1 kB
view details)
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 data_handles-0.1.2.tar.gz.
File metadata
- Download URL: data_handles-0.1.2.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c872841730c2ec11b141c22ea3fde81086403f14a7bd9e713017d6f0c6081e1
|
|
| MD5 |
acc5f02e22a01b2f8b66414ad95c59b7
|
|
| BLAKE2b-256 |
3587c3b7e0ea2800d91270dc94b343f2c42d8ca938cfe44db426176c7a8ca129
|
File details
Details for the file data_handles-0.1.2-py3-none-any.whl.
File metadata
- Download URL: data_handles-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
203d77aaa28323a61f584d46fa0437dbe3af9375ca359620f9837230c90bf77b
|
|
| MD5 |
5d6babb0121bfa7a198c1950dc18bbe0
|
|
| BLAKE2b-256 |
3282172fa1f426820d02e63048a2d05c434c1336e514e9739efce57561e40663
|