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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: storage3-0.7.4.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.4.tar.gz
Algorithm Hash digest
SHA256 61fcbf836f566405981722abb7d56caa57025b261e7a316e73316701abf0c040
MD5 dc00a14c52eaaead8a31d93d739ca2f1
BLAKE2b-256 72ab0a31178244e9efe7a65f206807f640f2f04a6e42564d5a67eb0c42767623

See more details on using hashes here.

File details

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

File metadata

  • Download URL: storage3-0.7.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0b8e8839b10a64063796ce55a41462c7ffd6842e0ada74f25f5dcf37e1d1bade
MD5 36a6d0b9ceb817ec3a8186519e023c45
BLAKE2b-256 b1c2fb547bae38c4892e42f489609fe98822cac2569e873a4c958222cd833dab

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