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

Uploaded Source

Built Distribution

storage3-0.7.0-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for storage3-0.7.0.tar.gz
Algorithm Hash digest
SHA256 9ddecc775cdc04514413bd44b9ec61bc25aad9faadabefdb6e6e88b33756f5fd
MD5 4be6cb70713af0537829eacdfa86e8e3
BLAKE2b-256 3d6648b64fa6b6496c68c55c0e4d076904d47ea9f33c3156eba2557dbfec40df

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for storage3-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dd2d6e68f7a3dc038047ed62fa8bdc5c2e3d6b6e56ee2951195d084bcce71605
MD5 dd7f754f90b2437d0cd845e870ebef5d
BLAKE2b-256 fdc96add986d87c11eab4e8e1a3db1d5b4778abb7dcb3637a4e0a86b10cba185

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