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 AsyncStorageClient
url = "https://<your_supabase_id>.supabase.co/storage/v1"
key = "<your api key>"
headers = {"apiKey": key, "Authorization": f"Bearer {key}"}
storage_client = AsyncStorageClient(url, headers)
async def get_buckets():
await storage_client.list_buckets()
Uploading files
When uploading files, make sure to set the correct mimetype by using the file_options
argument:
async def file_upload():
await 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.12.0.tar.gz
.
File metadata
- Download URL: storage3-0.12.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
94243f20922d57738bf42e96b9f5582b4d166e8bf209eccf20b146909f3f71b0
|
|
MD5 |
12f2d5f012a085fbffc0aed20dbd0856
|
|
BLAKE2b-256 |
c5869eae84e8ad4ba73f575f3eaf5536d949f2fd7d6adc85829f9af04bce97e2
|
Provenance
The following attestation bundles were made for storage3-0.12.0.tar.gz
:
Publisher:
ci.yml
on supabase/storage-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
storage3-0.12.0.tar.gz
-
Subject digest:
94243f20922d57738bf42e96b9f5582b4d166e8bf209eccf20b146909f3f71b0
- Sigstore transparency entry: 244108179
- Sigstore integration time:
-
Permalink:
supabase/storage-py@8099668f2bbce5de70fb37d1c74d30955dd9b57d
-
Branch / Tag:
refs/heads/main
- Owner: https://github.com/supabase
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
ci.yml@8099668f2bbce5de70fb37d1c74d30955dd9b57d
-
Trigger Event:
push
-
Statement type:
File details
Details for the file storage3-0.12.0-py3-none-any.whl
.
File metadata
- Download URL: storage3-0.12.0-py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
1c4585693ca42243ded1512b58e54c697111e91a20916cd14783eebc37e7c87d
|
|
MD5 |
6bb73812d6783a9a78c277f963db36a7
|
|
BLAKE2b-256 |
b07e693d6d603db142eb5e6f3cb76eb6e9c439582b7539e2695e175e2de3ac44
|
Provenance
The following attestation bundles were made for storage3-0.12.0-py3-none-any.whl
:
Publisher:
ci.yml
on supabase/storage-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
storage3-0.12.0-py3-none-any.whl
-
Subject digest:
1c4585693ca42243ded1512b58e54c697111e91a20916cd14783eebc37e7c87d
- Sigstore transparency entry: 244108188
- Sigstore integration time:
-
Permalink:
supabase/storage-py@8099668f2bbce5de70fb37d1c74d30955dd9b57d
-
Branch / Tag:
refs/heads/main
- Owner: https://github.com/supabase
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
ci.yml@8099668f2bbce5de70fb37d1c74d30955dd9b57d
-
Trigger Event:
push
-
Statement type: