Skip to main content

miniopy-async

PyPI PyPI - Python Version PyPI - Downloads

Asynchronous MinIO Client SDK for Python

Build from Source

git clone https://github.com/hlf20010508/miniopy-async.git
cd miniopy-async
poetry install
poetry build

Installation

PyPI

pip install miniopy-async

Github Repository

pip install git+https://github.com/hlf20010508/miniopy-async.git

Quick Start

from miniopy_async import Minio
import asyncio


async def main():
    async with Minio(
        "play.min.io",
        access_key="Q3AM3UQ867SPQQA43P2F",
        secret_key="zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG",
        secure=True,  # http for False, https for True
    ) as client:
        url = await client.presigned_get_object("my-bucket", "my-object")
        print("url:", url)


asyncio.run(main())
from sanic import Sanic, response
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
)


# http://127.0.0.1:8000/download?bucket=my-bucket&fileName=testfile
@app.route("/download", methods=["GET"])
async def download(request):
    print("downloading ...")
    bucket = request.args.get("bucket")
    fileName = request.args.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 response.redirect(url)


@app.after_server_stop
async def close_minio_client(*_):
    await client.close_session()

Metadata

Release files for miniopy-async 1.23.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for miniopy-async 1.23.6
File Size Uploaded Provenance Actions
miniopy_async-1.23.6.tar.gz 80.9 kB Without provenance Details for miniopy_async-1.23.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for miniopy-async 1.23.6
File Interpreter ABI Platform Actions
miniopy_async-1.23.6-py3-none-any.whl Python 3 none any Details for miniopy_async-1.23.6-py3-none-any.whl

Total release size: 181.6 kB

Release files / miniopy_async-1.23.6.tar.gz

Download URL miniopy_async-1.23.6.tar.gz
Size 80.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e6249559b729f466cbb2e55a8fb6c1cdcb1b6e69b66df902ad997146451e3ce8
BLAKE2b-256 checksum
How to use checksums
13fcb53237bd3bd8fa553d030153cd48e2391e4f469f68436269cac5abab84d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.10.16 Linux/6.17.0-1022-azure

Release files / miniopy_async-1.23.6-py3-none-any.whl

Download URL miniopy_async-1.23.6-py3-none-any.whl
Size 100.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4047166a31f9696a77c50ae1434782808c18b4f5319f2f1e7deb7146982a7a66
BLAKE2b-256 checksum
How to use checksums
e9dd2e4b740b623c5e977334e4c200e246d080d49b60bb116b98fad138d9b53a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.10.16 Linux/6.17.0-1022-azure

Security for miniopy-async 1.23.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.23.6 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page