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

Uploaded Source

Built Distribution

storage3-0.12.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: storage3-0.12.0.tar.gz
  • Upload date:
  • Size: 10.0 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.0.tar.gz
Algorithm Hash digest
SHA256 94243f20922d57738bf42e96b9f5582b4d166e8bf209eccf20b146909f3f71b0
MD5 12f2d5f012a085fbffc0aed20dbd0856
BLAKE2b-256 c5869eae84e8ad4ba73f575f3eaf5536d949f2fd7d6adc85829f9af04bce97e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for storage3-0.12.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: storage3-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 18.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c4585693ca42243ded1512b58e54c697111e91a20916cd14783eebc37e7c87d
MD5 6bb73812d6783a9a78c277f963db36a7
BLAKE2b-256 b07e693d6d603db142eb5e6f3cb76eb6e9c439582b7539e2695e175e2de3ac44

See more details on using hashes here.

Provenance

The following attestation bundles were made for storage3-0.12.0-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