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.27.3.tar.gz (19.8 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.27.3-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for storage3-2.27.3.tar.gz
Algorithm Hash digest
SHA256 dc1a4a010cf36d5482c5cb6c1c28fc5f00e23284342b89e4ae43b5eae8501ddb
MD5 bf26ea1be48ae323bf573d6f9c99cf01
BLAKE2b-256 bfc3e06c17be3b63384cedda50131694a1737745a2e9bc3f7cfb46cfe815372d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for storage3-2.27.3-py3-none-any.whl
Algorithm Hash digest
SHA256 11a05b7da84bccabeeea12d940bca3760cf63fe6ca441868677335cfe4fdfbe0
MD5 026db2aefd6c7f83356c0868ca6edf54
BLAKE2b-256 1391697f37a720c73056f83c7ef5a4b4799b1de9f2fe3d1e41912ac2bd3f1549

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