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.

Download files

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

Source Distribution

pyscord_storage-4.1.2.tar.gz (2.5 MB view details)

Uploaded Source

Built Distribution

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

pyscord_storage-4.1.2-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file pyscord_storage-4.1.2.tar.gz.

File metadata

  • Download URL: pyscord_storage-4.1.2.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for pyscord_storage-4.1.2.tar.gz
Algorithm Hash digest
SHA256 396d03236de5ae1141546bded5057ef1b2f347b29fa55814750c50b56ee493ea
MD5 16da9b35188631ca105dfcb6c8d6b3f8
BLAKE2b-256 076a10ce62f60845d53e2ca6a99447ae641fee0f60a8fb5971e656f48e8b5bcd

See more details on using hashes here.

File details

Details for the file pyscord_storage-4.1.2-py3-none-any.whl.

File metadata

  • Download URL: pyscord_storage-4.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for pyscord_storage-4.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 60956ad3e2f72eeebf3d0750fe9d048eded7387a12c6ddf86619f762ba4224f7
MD5 c933db62751d06d671a56e13ae4cab46
BLAKE2b-256 c7c9204ec539a86b44f75f57fc5edb6ffb7e5c091a7b1b5bd756f623d7c124c2

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

4.1.2 This release

2 files

4.1.1

2 files

4.1.0

2 files

4.0.1

2 files

4.0.0

2 files

2.0.4

2 files

2.0.3

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.1.0

2 files

1.0.1

2 files

1.0.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 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