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

Uploaded Source

Built Distribution

storage3-0.5.3-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: storage3-0.5.3.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.3 Darwin/22.2.0

File hashes

Hashes for storage3-0.5.3.tar.gz
Algorithm Hash digest
SHA256 0c8b356d61eb021d8fcb9ca94d124754f2738c75a73babef91b2f1f60b2a13c0
MD5 606a34051f7887d0b7542c457d0fcc9e
BLAKE2b-256 8547c676730c34639e945b94c66feebcdf6bbd54d1b2ac2fce8353b3784bcd08

See more details on using hashes here.

File details

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

File metadata

  • Download URL: storage3-0.5.3-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.3 Darwin/22.2.0

File hashes

Hashes for storage3-0.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5dab88b8e91afadb72fbfde4ce8fb819d6324385624ceb9dca2927fb80b3b800
MD5 469d03aa170f141bb0d4797285e7f3ff
BLAKE2b-256 192e83ebbab871bad3ae76ed5538d18d8d36cf09089a03911b0cbc8624bf4af5

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