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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file storage3-0.9.0.tar.gz
.
File metadata
- Download URL: storage3-0.9.0.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e16697f60894c94e1d9df0d2e4af783c1b3f7dd08c9013d61978825c624188c4 |
|
MD5 | b08d038c459637a68697da8999628dbe |
|
BLAKE2b-256 | dae78107787c4aa24c435f44f0b0f3332004c82d84c90b6e449d9b3747100687 |
Provenance
The following attestation bundles were made for storage3-0.9.0.tar.gz
:
Publisher:
ci.yml
on supabase/storage-py
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
storage3-0.9.0.tar.gz
- Subject digest:
e16697f60894c94e1d9df0d2e4af783c1b3f7dd08c9013d61978825c624188c4
- Sigstore transparency entry: 145333254
- Sigstore integration time:
- Predicate type:
File details
Details for the file storage3-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: storage3-0.9.0-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b2fb91f0c61583a2f4eac74a8bae67e00d41ff38095c8a6cd3f2ce5e0ab76e7 |
|
MD5 | 03b3f53882246e2b0ed61321489937ef |
|
BLAKE2b-256 | 612fee424eaa9939d1a6a3ae727b24da6c80ab4ef913ee1dc8c4392eebc73a3c |
Provenance
The following attestation bundles were made for storage3-0.9.0-py3-none-any.whl
:
Publisher:
ci.yml
on supabase/storage-py
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
storage3-0.9.0-py3-none-any.whl
- Subject digest:
8b2fb91f0c61583a2f4eac74a8bae67e00d41ff38095c8a6cd3f2ce5e0ab76e7
- Sigstore transparency entry: 145333257
- Sigstore integration time:
- Predicate type: