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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: storage3-0.5.4.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.4.tar.gz
Algorithm Hash digest
SHA256 0f0e08fd1fb13cd74c091853e9f4644a4bb8a08a2b24cc5db12f4675035d2b1b
MD5 cd0aced75432945b1206995ee27c29f0
BLAKE2b-256 01a30a9e2909b01329b40ba54715ed987794bc26c8af7bb015656a3c0e64fccc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: storage3-0.5.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 380bda00c88a0d894b55c7591c71b9967fdbec581247ac159e009319de123bf7
MD5 c09aba53f33aa8d243c3682093d5bb3d
BLAKE2b-256 eb4f864270df68a1fe0be67aba7d1c8a980b87133ac47d6c993f3c4115b5af3f

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