Skip to main content

Supabase Storage client for Python.

Project description

Storage-py

Python Client library to interact with Supabase Storage.

How to use

As it takes some effort to get the headers. We suggest that you use the storage functionality through the main Supabase Python Client

from storage3 import AsyncStorageClient

url = "https://<your_supabase_id>.supabase.co/storage/v1"
key = "<your api key>"
headers = {"apiKey": key, "Authorization": f"Bearer {key}"}

storage_client = AsyncStorageClient(url, headers)

async def get_buckets():
  await storage_client.list_buckets()

Uploading files

When uploading files, make sure to set the correct mimetype by using the file_options argument:

async def file_upload():
  await storage_client.from_("bucket").upload("/folder/file.png", file_object, {"content-type": "image/png"})

If no mime type is given, the default text/plain will be used.

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

storage3-2.28.1.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

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

storage3-2.28.1-py3-none-any.whl (28.2 kB view details)

Uploaded Python 3

File details

Details for the file storage3-2.28.1.tar.gz.

File metadata

  • Download URL: storage3-2.28.1.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.2

File hashes

Hashes for storage3-2.28.1.tar.gz
Algorithm Hash digest
SHA256 925494c7408480c59f8af26e8198ed6e703cf93334911aaf0232935617882eb3
MD5 309c271c25bdcf155785c6012dc24284
BLAKE2b-256 807444d1200000389dbbdfeb334fa6044d9df3752222213dbf5446a057d9805e

See more details on using hashes here.

File details

Details for the file storage3-2.28.1-py3-none-any.whl.

File metadata

  • Download URL: storage3-2.28.1-py3-none-any.whl
  • Upload date:
  • Size: 28.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.2

File hashes

Hashes for storage3-2.28.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5a6166a9e88e84bc9447fffc27a949f247767ca8bf4450f4fc7c79b1ae195b23
MD5 99ebf05f44dea5741773363ad202bed7
BLAKE2b-256 fe3696261e145899f3f7fcc792f5b9f8c24f2d0758f18e432cd627e4623d17b8

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