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

Uploaded Source

Built Distribution

storage3-0.6.1-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: storage3-0.6.1.tar.gz
  • Upload date:
  • Size: 9.0 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.1.tar.gz
Algorithm Hash digest
SHA256 7f50c2279da604c3c088fc72f6d10fee146e30fe9ecbf9d505cea5c884622700
MD5 632612da91a84a78073cc8db14139fe5
BLAKE2b-256 6ab187bc183c78395ebbb00613fc2b474c60259d3878c64047b561bf5e13a931

See more details on using hashes here.

File details

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

File metadata

  • Download URL: storage3-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 15.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0a8b8dc08f4d2268c8f46035fffcb13be99ed489bd0be29786f979c42f5a7169
MD5 63ef0c83f717a789878bf71fc50ac450
BLAKE2b-256 b168e0ee1631d36a2f44e6b7d9c05f5e280b147abf6a1a9df23bcae1660573a1

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