Asynchronous MinIO Python Client API
Project description
miniopy-async
Asynchronous MinIO Python Client API
Catalogue
Declaration
- This project is based on Huseyn Mashadiyev's minio-async 1.0.0.
- This project has fixed some bugs of minio-async and added some new features.
- Miniopy-async 1.2 has been pulled requests to minio-async.
Minimum Requirements
- Python>3.6
Build from source
git clone https://github.com/hlf20010508/miniopy-async.git
cd miniopy-async
python setup.py install
Installation
Install with pip
PyPI
pip install miniopy-async
Github Repository
pip install git+https://github.com/hlf20010508/miniopy-async.git
Install with pipenv
PyPI
pipenv install miniopy-async
Github Repository
pipenv install git+https://github.com/hlf20010508/miniopy-async.git#egg=miniopy-async
Quick Start
from miniopy_async import Minio
import asyncio
client = Minio(
"play.min.io",
access_key="Q3AM3UQ867SPQQA43P2F",
secret_key="zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG",
secure=True # http for False, https for True
)
async def main():
url = await client.presigned_get_object("my-bucket", "my-object")
print('url:', url)
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.close()
from sanic import Sanic
from miniopy_async import Minio
from urllib import parse
app = Sanic(__name__)
client = Minio(
"play.min.io",
access_key="Q3AM3UQ867SPQQA43P2F",
secret_key="zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG",
secure=True # http for False, https for True
)
@app.route('/download', methods=['GET'])
async def download(request):
print('downloading ...')
bucket=request.form.get('bucket')
fileName=request.form.get('fileName')
# decodeURI, for those which has other language in fileName, such as Chinese, Japanese, Korean
fileName = parse.unquote(fileName)
url = await client.presigned_get_object(bucket_name=bucket, object_name=fileName)
return redirect(url)
More References
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
miniopy-async-1.10.tar.gz
(62.7 kB
view details)
Built Distribution
File details
Details for the file miniopy-async-1.10.tar.gz
.
File metadata
- Download URL: miniopy-async-1.10.tar.gz
- Upload date:
- Size: 62.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8149275a08ff7b3080e25aa89edd32852a38cb03bd36b98c909f2cef84969326 |
|
MD5 | e1dd456187abd849ec77679989d04e79 |
|
BLAKE2b-256 | 03c47068f202755a06836c8c5161b766b69a5cd9e57f576e20b8e34ff7b76463 |
File details
Details for the file miniopy_async-1.10-py3-none-any.whl
.
File metadata
- Download URL: miniopy_async-1.10-py3-none-any.whl
- Upload date:
- Size: 81.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 776c6e5d378e3a587c5a2e7f3a17e63f15032a9461abe312dd91cb677851673e |
|
MD5 | 036bf35f6ae688b64c66da8623560d8b |
|
BLAKE2b-256 | 930811c76d71313dd96d5ad5f032e441d3576e12c463021feea80cb13ea6afdf |