Trên GitHub, minio/minio-py đã đạt 1.1k sao, nhóm Developer Tools, ngôn ngữ Python. MinIO Client SDK for Python
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
MinIO Python Client SDK for Amazon S3 Compatible Cloud Storage
The MinIO Python Client SDK provides high level APIs to access any MinIO Object Storage or other Amazon S3 compatible service.
This Quickstart Guide covers how to install the MinIO client SDK, connect to the object storage service, and create a sample file uploader.
The example below uses:
Python version 3.10+
The MinIO mc command line tool
The MinIO play test server
The play server is a public MinIO cluster located at https://play.min.io.
This cluster runs the latest stable version of MinIO and may be used for testing and development.
The access credentials in the example are open to the public and all data uploaded to play should be considered public and world-readable.
For a complete list of APIs and examples, see the Python SDK Documentation
Install the MinIO Python SDK
The Python SDK requires Python version 3.10+.
You can install the SDK with pip or from the minio/minio-py GitHub repository:
Using pip
pip3 install minio
Using Source From GitHub
git clone https://github.com/minio/minio-py
cd minio-py
python setup.py install
Create a MinIO Client
To connect to the target service, create a MinIO client using the Minio() method with the following required parameters:
Parameter
Description
endpoint
URL of the target service.
access_key
Access key (user ID) of a user account in the service.
Connects to the MinIO play server using the provided credentials.
Creates a bucket named python-test-bucket if it does not already exist.
Uploads a file named test-file.txt from /tmp, renaming it my-test-file.txt.
Verifies the file was created using mc ls.
file_uploader.py
# file_uploader.py MinIO Python SDK example
from minio import Minio
from minio.error import S3Error
def main():
# Create a client with the MinIO server playground, its access key
# and secret key.
client = Minio(
endpoint="play.min.io",
access_key="Q3AM3UQ867SPQQA43P2F",
secret_key="zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG",
)
# The file to upload, change this path if needed
source_file = "/tmp/test-file.txt"
# The destination bucket and filename on the MinIO server
bucket_name = "python-test-bucket"
destination_file = "my-test-file.txt"
# Make the bucket if it doesn't exist.
found = client.bucket_exists(bucket_name=bucket_name)
if not found:
client.make_bucket(bucket_name=bucket_name)
print("Created bucket", bucket_name)
else:
print("Bucket", bucket_name, "already exists")
# Upload the file, renaming it in the process
client.fput_object(
bucket_name=bucket_name,
object_name=destination_file,
file_path=source_file,
)
print(
source_file, "successfully uploaded as object",
destination_file, "to bucket", bucket_name,
)
if __name__ == "__main__":
try:
main()
except S3Error as exc:
print("error occurred.", exc)
To run this example:
Create a file in /tmp named test-file.txt.
To use a different path or filename, modify the value of source_file.
Run file_uploader.py with the following command:
python file_uploader.py
If the bucket does not exist on the server, the output resembles the following:
Created bucket python-test-bucket
/tmp/test-file.txt successfully uploaded as object my-test-file.txt to bucket python-test-bucket
Verify the uploaded file with mc ls:
mc ls play/python-test-bucket
[2023-11-03 22:18:54 UTC] 20KiB STANDARD my-test-file.txt
RDMA (optional)
put_object and get_object can dispatch to MinIO's RDMA path via
minio-cpp. It is strictly opt-in and
the SDK stays pure-Python unless used.
Requires libminiocpp.so (built with -DMINIO_CPP_ENABLE_RDMA=ON) on the
host's library search path (or pointed at via the MINIOCPP_LIB env var).
It carries its own RDMA transport, libs3rdma, which supports RoCE and
native InfiniBand and needs no NVIDIA client library on the host.
GPU buffer pointers (e.g. CuPy's arr.data.ptr, PyTorch's t.data_ptr())
work as data= / into= arguments unchanged — pass them as int. The SDK
links no CUDA itself; allocating device memory stays the application's job.
Set S3RDMA_DEVICE to pin a particular HCA on a multi-NIC host; otherwise
the first usable device is selected.
See examples/put_object_rdma.py and examples/get_object_rdma.py.
More References
Python SDK Documentation
Examples
Explore Further
Complete Documentation
Contribute
Contributors Guide
License
This SDK is distributed under the Apache License, Version 2.0, see LICENSE and NOTICE for more information.
minio/minio-py thuộc nhóm Developer Tools trên TopGit, cùng 5 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về minio/minio-py ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/minio/minio-py là nguồn chính thức.
minio/minio-py có bao nhiêu sao?
minio/minio-py có 1.1k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/minio/minio-py. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
minio/minio-py có những chủ đề gì?
GitHub topics của minio/minio-py: "aws-s3", "minio", "minio-client", "s3-bucket", "sdk". TopGit xếp repo vào nhóm Developer Tools.
minio/minio-py còn đang phát triển không?
Commit gần nhất trên minio/minio-py là 5 tháng trước (theo timestamp GitHub). Repo có 371 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
minio/minio-py viết bằng ngôn ngữ gì?
minio/minio-py chủ yếu viết bằng Python. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Vì sao minio/minio-py được xếp vào nhóm Developer Tools?
TopGit xếp minio/minio-py vào nhóm Developer Tools dựa trên GitHub topics và mô tả của repo (gắn thẻ: "aws-s3", "minio", "minio-client"). Việc phân loại dựa trên metadata thật của repo, không phải đoán theo cảm tính biên tập.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc minio-py có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về minio-py.