Skip to content

Commit 319cef2

Browse files
committed
Refactor for v8.0.0
* Move all request, response, result and configuraton as models * Move dependent classes as inner classes * Add get_object_acl, get_object_attributes, put_object_fan_out APIs Signed-off-by: Bala.FA <bala@minio.io>
1 parent f5a8ff1 commit 319cef2

File tree

142 files changed

+8034
-6269
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+8034
-6269
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ jobs:
3030
runs-on: ${{ matrix.os }}
3131
strategy:
3232
matrix:
33-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
33+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
3434
os: [ubuntu-latest, windows-latest, macos-latest]
3535

3636
steps:
37-
- uses: actions/checkout@v4
37+
- uses: actions/checkout@v5
3838
- name: Run spell check on Ubuntu
3939
if: matrix.os == 'ubuntu-latest'
4040
uses: codespell-project/actions-codespell@master
4141
with:
4242
ignore_words_list: assertIn
4343
- name: Set up Python ${{ matrix.python-version }}
44-
uses: actions/setup-python@v5
44+
uses: actions/setup-python@v6
4545
with:
4646
python-version: ${{ matrix.python-version }}
4747
- name: Install dependencies

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ The MinIO Python Client SDK provides high level APIs to access any MinIO Object
55
This Quickstart Guide covers how to install the MinIO client SDK, connect to the object storage service, and create a sample file uploader.
66

77
The example below uses:
8-
- [Python version 3.9+](https://www.python.org/downloads/)
8+
- [Python version 3.10+](https://www.python.org/downloads/)
99
- The [MinIO `mc` command line tool](https://min.io/docs/minio/linux/reference/minio-mc.html)
1010
- The MinIO `play` test server
1111

1212
The `play` server is a public MinIO cluster located at [https://play.min.io](https://play.min.io).
1313
This cluster runs the latest stable version of MinIO and may be used for testing and development.
1414
The access credentials in the example are open to the public and all data uploaded to `play` should be considered public and world-readable.
1515

16-
For a complete list of APIs and examples, see the [Python Client API Reference](https://min.io/docs/minio/linux/developers/python/API.html)
16+
For a complete list of APIs and examples, see the [Python SDK Documentation](https://docs.min.io/enterprise/aistor-object-store/developers/sdk/python/)
1717

1818
## Install the MinIO Python SDK
1919

20-
The Python SDK requires Python version 3.9+.
20+
The Python SDK requires Python version 3.10+.
2121
You can install the SDK with `pip` or from the [`minio/minio-py` GitHub repository](https://github.com/minio/minio-py):
2222

2323
### Using `pip`
@@ -141,12 +141,12 @@ mc ls play/python-test-bucket
141141

142142
## More References
143143

144-
* [Python Client API Reference](https://min.io/docs/minio/linux/developers/python/API.html)
144+
* [Python SDK Documentation](https://docs.min.io/enterprise/aistor-object-store/developers/sdk/python/)
145145
* [Examples](https://github.com/minio/minio-py/tree/master/examples)
146146

147147
## Explore Further
148148

149-
* [Complete Documentation](https://min.io/docs/minio/kubernetes/upstream/index.html)
149+
* [Complete Documentation](https://docs.min.io/enterprise/aistor-object-store/)
150150

151151
## Contribute
152152

docs/API.md

Lines changed: 762 additions & 553 deletions
Large diffs are not rendered by default.

examples/append_object.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
2-
# MinIO Python Library for Amazon S3 Compatible Cloud Storage,
3-
# (C) 2025 MinIO, Inc.
2+
# MinIO Python Library for Amazon S3 Compatible Cloud Storage, (C)
3+
# [2014] - [2025] MinIO, Inc.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

examples/bucket_exists.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
2-
# MinIO Python Library for Amazon S3 Compatible Cloud Storage,
3-
# (C) 2015 MinIO, Inc.
2+
# MinIO Python Library for Amazon S3 Compatible Cloud Storage, (C)
3+
# [2014] - [2025] MinIO, Inc.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

examples/compose_object.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
2-
# MinIO Python Library for Amazon S3 Compatible Cloud Storage,
3-
# (C) 2020 MinIO, Inc.
2+
# MinIO Python Library for Amazon S3 Compatible Cloud Storage, (C)
3+
# [2014] - [2025] MinIO, Inc.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
1515
# limitations under the License.
1616

1717
from minio import Minio
18-
from minio.commonconfig import ComposeSource
18+
from minio.args import SourceObject
1919
from minio.sse import SseS3
2020

2121
client = Minio(
@@ -25,13 +25,13 @@
2525
)
2626

2727
sources = [
28-
ComposeSource(
28+
SourceObject(
2929
bucket_name="my-job-bucket", object_name="my-object-part-one",
3030
),
31-
ComposeSource(
31+
SourceObject(
3232
bucket_name="my-job-bucket", object_name="my-object-part-two",
3333
),
34-
ComposeSource(
34+
SourceObject(
3535
bucket_name="my-job-bucket", object_name="my-object-part-three",
3636
),
3737
]

examples/copy_object.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
2-
# MinIO Python Library for Amazon S3 Compatible Cloud Storage,
3-
# (C) 2016-2020 MinIO, Inc.
2+
# MinIO Python Library for Amazon S3 Compatible Cloud Storage, (C)
3+
# [2014] - [2025] MinIO, Inc.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
1717
from datetime import datetime, timezone
1818

1919
from minio import Minio
20-
from minio.commonconfig import REPLACE, CopySource
20+
from minio.args import Directive, SourceObject
2121

2222
client = Minio(
2323
endpoint="play.min.io",
@@ -29,7 +29,7 @@
2929
result = client.copy_object(
3030
bucket_name="my-bucket",
3131
object_name="my-object",
32-
source=CopySource(
32+
source=SourceObject(
3333
bucket_name="my-sourcebucket", object_name="my-sourceobject",
3434
),
3535
)
@@ -39,7 +39,7 @@
3939
result = client.copy_object(
4040
bucket_name="my-bucket",
4141
object_name="my-object",
42-
source=CopySource(
42+
source=SourceObject(
4343
bucket_name="my-sourcebucket",
4444
object_name="my-sourceobject",
4545
modified_since=datetime(2014, 4, 1, tzinfo=timezone.utc),
@@ -51,10 +51,10 @@
5151
result = client.copy_object(
5252
bucket_name="my-bucket",
5353
object_name="my-object",
54-
source=CopySource(
54+
source=SourceObject(
5555
bucket_name="my-sourcebucket", object_name="my-sourceobject",
5656
),
5757
user_metadata={"test_meta_key": "test_meta_value"},
58-
metadata_directive=REPLACE,
58+
metadata_directive=Directive.REPLACE,
5959
)
6060
print(result.object_name, result.version_id)

examples/delete_bucket_cors.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# -*- coding: utf-8 -*-
2+
# MinIO Python Library for Amazon S3 Compatible Cloud Storage, (C)
3+
# [2014] - [2025] MinIO, Inc.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
from minio import Minio
18+
19+
client = Minio(
20+
endpoint="play.min.io",
21+
access_key="Q3AM3UQ867SPQQA43P2F",
22+
secret_key="zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG",
23+
)
24+
25+
client.delete_bucket_cors(bucket_name="my-bucket")

examples/delete_bucket_encryption.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
2-
# MinIO Python Library for Amazon S3 Compatible Cloud Storage.
3-
# Copyright (C) 2020 MinIO, Inc.
2+
# MinIO Python Library for Amazon S3 Compatible Cloud Storage, (C)
3+
# [2014] - [2025] MinIO, Inc.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

examples/delete_bucket_lifecycle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
2-
# MinIO Python Library for Amazon S3 Compatible Cloud Storage.
3-
# Copyright (C) 2020 MinIO, Inc.
2+
# MinIO Python Library for Amazon S3 Compatible Cloud Storage, (C)
3+
# [2014] - [2025] MinIO, Inc.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)