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

Uploaded Source

Built Distribution

storage3-0.11.3-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: storage3-0.11.3.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for storage3-0.11.3.tar.gz
Algorithm Hash digest
SHA256 883637132aad36d9d92b7c497a8a56dff7c51f15faf2ff7acbccefbbd5e97347
MD5 29034a965d43c0b9335991770495c6d9
BLAKE2b-256 ac2583eb4e4612dc07a3bb3cab96253c9c83752d4816f2cf38aa832dfb8d8813

See more details on using hashes here.

Provenance

The following attestation bundles were made for storage3-0.11.3.tar.gz:

Publisher: ci.yml on supabase/storage-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: storage3-0.11.3-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for storage3-0.11.3-py3-none-any.whl
Algorithm Hash digest
SHA256 090c42152217d5d39bd94af3ddeb60c8982f3a283dcd90b53d058f2db33e6007
MD5 03f2b7574210aa5ded1d39cd8c2f328c
BLAKE2b-256 c98dff89f85c4b48285ac7cddf0fafe5e55bb3742d374672b2fbd2627c213fa6

See more details on using hashes here.

Provenance

The following attestation bundles were made for storage3-0.11.3-py3-none-any.whl:

Publisher: ci.yml on supabase/storage-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page