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 create_client

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

# pass in is_async=True to create an async client
storage_client = create_client(url, headers, is_async=False)

storage_client.list_buckets()

Uploading files

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

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

Uploaded Source

Built Distribution

storage3-0.7.7-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: storage3-0.7.7.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for storage3-0.7.7.tar.gz
Algorithm Hash digest
SHA256 9fba680cf761d139ad764f43f0e91c245d1ce1af2cc3afe716652f835f48f83e
MD5 8112071cda8cb47a16fd9e272d6acc91
BLAKE2b-256 237ec644337cc0147e1784c34258a518823d505c008282c82305edcbb7ccc600

See more details on using hashes here.

File details

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

File metadata

  • Download URL: storage3-0.7.7-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for storage3-0.7.7-py3-none-any.whl
Algorithm Hash digest
SHA256 ed80a2546cd0b5c22e2c30ea71096db6c99268daf2958c603488e7d72efb8426
MD5 7d33045c32bb6a37ddcba58ac5035b28
BLAKE2b-256 aafa92bd5459ca82d3c24def4f2a72f07f401c4e95de4d44840e2671bed3f052

See more details on using hashes here.

Supported by

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