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.31.0.tar.gz (20.3 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.31.0-py3-none-any.whl (28.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for storage3-2.31.0.tar.gz
Algorithm Hash digest
SHA256 d2161e2ea650dc115a1787c30e09b118365589ac772f4dd8643e3a503ecfc667
MD5 406c1c1fd6681a1a785497f4dfa270e5
BLAKE2b-256 1330fee43d523d3f680a833a4aae5bf8094de0b9031b0c2bddb3e0bc6e829e1b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for storage3-2.31.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4bf46e8bea320743179a6beafdc7531c5242495e00e0cc22af7c7a9d69d4ed84
MD5 174852e97cca94053c027cf8de25911f
BLAKE2b-256 2fb260d86a3a99ae743e8a00a6df912f85269b3bc882ba217b8ce1690881c669

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