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

Uploaded Source

Built Distribution

storage3-0.8.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: storage3-0.8.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for storage3-0.8.0.tar.gz
Algorithm Hash digest
SHA256 cdb5af60ff240a8c2ef83cecdb5816042ce4a9162803456bcd1bca075b4c82df
MD5 596b0cc974536b5e40281d7a4be64d6e
BLAKE2b-256 81c5071005934d7e931914453c30c380937497c57476511097980c55015387d5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: storage3-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for storage3-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a1aa28a6eb685b8158f2de26589cd216fcd18328c5762d21159a4545e8cf6709
MD5 f4e6847c924cb9d2ad2fda6183a6d776
BLAKE2b-256 9f573b7e7b78a725c7bd7c573ca5d2bfd0295fb8c872d6662c55748cd6294b48

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