Free unlimited file hosting using the Discord server
Project description
pyscord-storage |

Because paying for actual file storage is for people with money. Why use S3, GCS, or literally any purpose-built storage service when you can just... use Discord? A chat app. For teenagers. As your CDN.
You're welcome.
Refresh Expired URL
Discord, in its infinite wisdom, decided that CDN URLs should expire. Because nothing says "reliable file hosting" like links that stop working. Anyway, here's how you unfail them:
https://bypass-discord.animemoe.us/DISCORD_FILE_URL_HERE
https://bypass-discord.animemoe.us/https://media.discordapp.net/attachments/858938620425404426/1478701777837621259/animemoeus-waifu.jpg
Groundbreaking infrastructure, truly.
Installation
Shockingly straightforward:
pip install pyscord-storage
Congratulations. You are now a cloud architect.
Usage
Upload a local file, like a person who has completely given up on conventional DevOps:
import pyscord_storage
result = pyscord_storage.upload_from_file("path/to/your.file")
print(result)
Or, if you're feeling extra chaotic, make the backend fetch a file from a URL for you:
import pyscord_storage
result = pyscord_storage.upload_from_url("waifu.jpg", "https://github.com/animemoeus/pyscord-storage/raw/master/tests/temp/takagi.png")
print(result)
Both functions return a dict. You're not getting a proper SDK response object. This is Discord storage. Manage your expectations accordingly.
CLI
For those who prefer their existential dread served directly in the terminal:
pip install pyscord-storage
# Upload a local file
pyscord-storage --file path/to/your.file
# Upload from a remote URL
pyscord-storage --url https://example.com/your.file
On success, it prints the URL. On failure, it prints the error to stderr and exits with code 1. Professional.
Async Support
Yes, we also have async versions — because if you're going to do something ridiculous, you might as well do it non-blockingly.
import asyncio
import pyscord_storage
async def main():
result = await pyscord_storage.async_upload_from_file("path/to/your.file")
print(result)
asyncio.run(main())
import asyncio
import pyscord_storage
async def main():
result = await pyscord_storage.async_upload_from_url("waifu.jpg", "https://github.com/animemoeus/pyscord-storage/raw/master/tests/temp/takagi.png")
print(result)
asyncio.run(main())
About
- Max upload file size is
8MB25MB — an upgrade celebrated with an enthusiasm that says a lot about the alternatives we were previously working with. - There are two CDN domains:
media.discordapp.netandcdn.discordapp.com. Click here for the explanation you didn't ask for but definitely need. - There's also a
proxy_urlthing. Here's more than you wanted to know about it. - Discord CDN links expire. As in, your files disappear. More details here, in case you'd like to really sit with that fact before deploying to production.
Increase Upload Limit
Here's the part where I tell you that to get more storage out of a chat app, you need to pay to "boost" a Discord server. No, I'm not joking.
- Boosting may push the limit to 50MB or 100MB. Allegedly.
- Discord Server Boosting FAQ
- Join our Discord Server (of course there's a Discord server): https://discord.gg/kZuWeKzgkq
Example Implementations
These are real. Deployed. In the wild.
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 pyscord_storage-4.1.1.tar.gz.
File metadata
- Download URL: pyscord_storage-4.1.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.12.3 Linux/6.17.0-14-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84c74a2ecd3186acf7af1f47e1a8ed00bad5e29378e74b253214e05f9bce95c0
|
|
| MD5 |
4624917d6ed2d68be3f10e897a31c7ee
|
|
| BLAKE2b-256 |
b8c6017d8b1cf4c13611faa784391e20165267e7997b0e4601adb9d907b5d9cb
|
File details
Details for the file pyscord_storage-4.1.1-py3-none-any.whl.
File metadata
- Download URL: pyscord_storage-4.1.1-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.12.3 Linux/6.17.0-14-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
529abd1d157c21fd41a70657379137d36434a432a539b4367b7685341f91fa6e
|
|
| MD5 |
573f76ad57fd5c86e531f859e1eb97fa
|
|
| BLAKE2b-256 |
b46582a4ce73ded527c73517f3510f6d60984b177d1ec28971039d56d828efdd
|