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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

storage3-0.7.3-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: storage3-0.7.3.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for storage3-0.7.3.tar.gz
Algorithm Hash digest
SHA256 943c31de4a7c7490ad7960d963a6b410979ebd0e1b3d320d76cb61564ab0b528
MD5 0c439279a03f9fa6c960b4bf76f439b5
BLAKE2b-256 68c9aba24eac8e6d445a31267b53be82869b88c9e0ac231638622fca9bb3ec10

See more details on using hashes here.

File details

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

File metadata

  • Download URL: storage3-0.7.3-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for storage3-0.7.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dc6a59da801ee6fc00015da4967ac0b5c3e5508d31ffd796f0e4c83957e5c6a0
MD5 c12e80b87f775bf49bebf0b4ef3b7684
BLAKE2b-256 69428d0fe45492d441a5ed156a3bf6c8b5116175cc1e705b090f8bb05316a584

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