Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any more detailed Useage? #1

Closed
miss85246 opened this issue Jul 8, 2022 · 2 comments
Closed

Is there any more detailed Useage? #1

miss85246 opened this issue Jul 8, 2022 · 2 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@miss85246
Copy link
Contributor

It's looks very cool, but is there any more detailed Useage?

@hlf20010508
Copy link
Owner

hlf20010508 commented Jul 8, 2022

It's looks very cool, but is there any more detailed Useage?

Well you can refer to

The initualization is the same as original minio python API.
You need to use other modules which support async (recommend, easy to use, see the project above), or use asyncio to manually run it (not recommend, because why not use original minio-py?)

Here is the simple example:

from minio_async import Minio
import asyncio

client = Minio(
    endpoint="Your host",
    access_key="Your username",
    secret_key="Your password",
    secure=False  # http for False, https for True
)

loop = asyncio.get_event_loop()
res = loop.run_until_complete(client.presigned_get_object("Your bucket name", "Your object name"))
print('Got presigned url:', res)
loop.close()

@hlf20010508
Copy link
Owner

hlf20010508 commented Jul 8, 2022

I've added some examples here and updated readme.
More examples will be added in the future is I have time.

@hlf20010508 hlf20010508 added the good first issue Good for newcomers label Jul 8, 2022
@hlf20010508 hlf20010508 self-assigned this Jul 13, 2022
hlf20010508 pushed a commit that referenced this issue Jul 14, 2022
@hlf20010508 hlf20010508 added this to the Created examples and docs milestone Jul 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants