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

Uploaded Source

Built Distribution

storage3-0.6.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: storage3-0.6.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for storage3-0.6.0.tar.gz
Algorithm Hash digest
SHA256 f1162fca7c037e403c43dc142ded83a3234c88bf96c9cd426b75921c7c6a6259
MD5 cc2329f820c4b5c783150d494e2e4bbd
BLAKE2b-256 e14ced74da7837190ef88e72ae04567397c2e63db7daa23f202259f0bda9330e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: storage3-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for storage3-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d85a39eaa6fd6803ed0170c073cf78b418392bfadbde828993924da6b2f53b2
MD5 4c4dc7ea028818ca62f85cc5a502e4f0
BLAKE2b-256 7a7aa54669de94a27cb617b0e5f1956ae57d053d29393a55a01dd9e9c487ee8e

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