Skip to main content

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

  • requests
  • pyAesCrypt
  • yaml
  • faker
  • json
  • hashlib

๐Ÿ“– 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

infinitystorelib-0.0.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

infinitystorelib-0.0.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

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

Hashes for infinitystorelib-0.0.1.tar.gz
Algorithm Hash digest
SHA256 fc4e7903a039fda24f65231e58bdadd8ce669d8c84fba9bfa31667b20a4bbfca
MD5 48a36bea0b20983925343439a086d7f9
BLAKE2b-256 219c7c773e3fec1c6c538c072dce8506d44b8411c5f2fac90e549375a1eb66a3

See more details on using hashes here.

File details

Details for the file infinitystorelib-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for infinitystorelib-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2610dacaa4dd83349cb05ee72163cb86300a76086a2436a039a86b6206e1c598
MD5 cb9cf541e54285988a387cfd322b5e87
BLAKE2b-256 91cd6551cd17ab44b282a3656bf955c48659278c6d899b655609ea328ad30bd6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page