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-0.12.2.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

storage3-0.12.2-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: storage3-0.12.2.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for storage3-0.12.2.tar.gz
Algorithm Hash digest
SHA256 a8f5afeb7566bd2e4ffb40a1261670135354482f774b932f8cd32634c8343e52
MD5 42dc535df1bc7aa85936ecf8e764405a
BLAKE2b-256 3fa0fd2b2f20c6c7c5809799e791adc71aac420a734d1c31c823e8e08bdff381

See more details on using hashes here.

Provenance

The following attestation bundles were made for storage3-0.12.2.tar.gz:

Publisher: ci.yml on supabase/storage-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: storage3-0.12.2-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for storage3-0.12.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1277530feb7be310523263a32057bd52c40c81c49c1e29760619be842acc487b
MD5 c6d3aaaf8e29daeb088fcc4c211ac618
BLAKE2b-256 01924b5a5c69f7160b3bf7da0836ae9bfac9eabfecd2d54b283280896ca9a8ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for storage3-0.12.2-py3-none-any.whl:

Publisher: ci.yml on supabase/storage-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page