No project description provided
Project description
๐ฆ InfinityStoreLib โ Discord File Storage Library
A simple Python library that lets you upload and download files or Python objects using Discord webhooks as cloud storage. Data is securely encrypted with AES, chunked, and distributed across multiple Discord channels.
๐ Features
- โ Upload and download files using Discord webhooks
- โ
Store and retrieve Python objects (via
json.dumps) - โ Automatic AES encryption/decryption
- โ Generates a unique SHA-512 hash as a file identifier
- โ Multi-channel uploads for larger data
- โ Simple, easy-to-use interface
Installation
pip install .\infinitystorelib-0.0.1-py3-none-any.whl
Dependencies
requestspyAesCryptyamlfakerjsonhashlib
๐ Usage Guide
๐น 1. Import and Setup
from InfinityStoreLib.Discord.Uploader import *
channels = ["https://discord.com/api/webhooks/1382..."]
๐น 2. Upload a File
Uploads a local file to Discord and returns a unique hash (used to download it later).
hash = upload_location("test.py", channels)
print("Uploaded file hash:", hash)
๐น 3. Download a File
Downloads the file using its hash and saves it to your specified location.
download_location(hash, "C:/Users/PC/Desktop/test_downloaded.py")
๐น 4. Upload a Python Object
Stores a Python object (e.g., list, dict, etc.) as encrypted JSON.
data = ["test1", "test2", "test3"]
hash = upload_data(data, channels)
print("Data hash:", hash)
๐น 5. Download a Python Object
Downloads and restores the original Python object.
restored_data = download_data(hash)
print("First element:", restored_data[0])
How It Works
| Step | Process | Description |
|---|---|---|
| 1 | Encryption | Data is encrypted with AES using a random key |
| 2 | Chunking | Data is split into 5โ7 MB blocks |
| 3 | Upload | Each chunk is uploaded to Discord via webhook |
| 4 | Index File | The URLs + encryption key are saved locally, named after the data hash |
| 5 | Download | Downloads all chunks, decrypts, and reconstructs the data |
Function Reference
upload_location(filepath, channels, key=None)
Uploads a file to Discord. Returns: file hash (used for download)
download_location(hash, save_path)
Downloads a file using its hash and saves it locally.
upload_data(obj, channels, key=None)
Uploads any JSON-serializable object. Returns: hash of stored data
download_data(hash)
Downloads and reconstructs a stored Python object.
โ๏ธ Example Workflow
from InfinityStoreLib.Discord.Uploader import *
channels = ["https://discord.com/api/webhooks/1382..."]
# Upload a Python file
hash = upload_location("script.py", channels)
# Download the same file
download_location(hash, "downloads/script_copy.py")
# Upload a Python object
obj = {"user": "Alice", "score": 120}
hash = upload_data(obj, channels)
# Retrieve the object
retrieved = download_data(hash)
print(retrieved)
๐งพ YAML Configuration (optional)
If you donโt want to hardcode your webhooks, you can use a cannels.yaml file:
cannels:
- "https://discord.com/api/webhooks/1382..."
- "https://discord.com/api/webhooks/1383..."
Architecture Overview
โโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Your File / Obj โ
โโโโโโโโโโโโโฌโโโโโโโโโโโโโโโ
โ
โผ
[ AES Encryption ]
โ
โผ
[ Chunking ]
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Discord Webhooks (Channels) โ
โโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโ
โ
โผ
[ Local Index File ]
โ
โผ
[ Download & Decrypt ]
License
MIT License ยฉ 2025 Created by Fabota51
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 infinitystorelib-0.0.1.tar.gz.
File metadata
- Download URL: infinitystorelib-0.0.1.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc4e7903a039fda24f65231e58bdadd8ce669d8c84fba9bfa31667b20a4bbfca
|
|
| MD5 |
48a36bea0b20983925343439a086d7f9
|
|
| BLAKE2b-256 |
219c7c773e3fec1c6c538c072dce8506d44b8411c5f2fac90e549375a1eb66a3
|
File details
Details for the file infinitystorelib-0.0.1-py3-none-any.whl.
File metadata
- Download URL: infinitystorelib-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2610dacaa4dd83349cb05ee72163cb86300a76086a2436a039a86b6206e1c598
|
|
| MD5 |
cb9cf541e54285988a387cfd322b5e87
|
|
| BLAKE2b-256 |
91cd6551cd17ab44b282a3656bf955c48659278c6d899b655609ea328ad30bd6
|