Skip to main content

pyscord-storage | Uptime Robot status Uptime Robot ratio (30 days)

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(
    "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(
        "https://github.com/animemoeus/pyscord-storage/raw/master/tests/temp/takagi.png",
    )
    print(result)


asyncio.run(main())

About

  • Max upload file size is 8MB 25MB — 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.net and cdn.discordapp.com. Click here for the explanation you didn't ask for but definitely need.
  • There's also a proxy_url thing. 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.

Development

uv sync
uv run pytest
uv run ruff check .
uv run pre-commit install

Example Implementations

These are real. Deployed. In the wild.

Metadata

Release files for pyscord-storage 4.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyscord-storage 4.1.2
File Size Uploaded
pyscord_storage-4.1.2.tar.gz 2.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyscord-storage 4.1.2
File Interpreter ABI Platform
pyscord_storage-4.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 2.5 MB

Release files / pyscord_storage-4.1.2.tar.gz

Download URL pyscord_storage-4.1.2.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
396d03236de5ae1141546bded5057ef1b2f347b29fa55814750c50b56ee493ea
BLAKE2b-256 checksum
How to use checksums
076a10ce62f60845d53e2ca6a99447ae641fee0f60a8fb5971e656f48e8b5bcd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.27 {"installer":{"name":"uv","version":"0.11.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / pyscord_storage-4.1.2-py3-none-any.whl

Download URL pyscord_storage-4.1.2-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60956ad3e2f72eeebf3d0750fe9d048eded7387a12c6ddf86619f762ba4224f7
BLAKE2b-256 checksum
How to use checksums
c7c9204ec539a86b44f75f57fc5edb6ffb7e5c091a7b1b5bd756f623d7c124c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.27 {"installer":{"name":"uv","version":"0.11.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

4.1.2 This release

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.1

2 release files

4.0.0

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page