Skip to content

Conversation

balamurugana
Copy link
Member

@balamurugana balamurugana commented Aug 7, 2025

  • Now all APIs accepts region, extra_headers and extra_query_params additional arguments for more control.
  • Add checksum support

@balamurugana balamurugana marked this pull request as draft August 7, 2025 09:11
@balamurugana balamurugana force-pushed the Add-region-extra_headers-and-extra_query_params branch 15 times, most recently from d1f7ade to 32797f3 Compare August 11, 2025 00:48
@balamurugana balamurugana self-assigned this Aug 12, 2025
@balamurugana balamurugana force-pushed the Add-region-extra_headers-and-extra_query_params branch from 32797f3 to 6756df1 Compare September 1, 2025 04:18
@balamurugana balamurugana marked this pull request as ready for review September 1, 2025 04:29
Copy link

@csumisha csumisha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updated method definitions have not been reflected in the sample provided in api.py, documentation, and examples. It has to be fixed.

@@ -136,6 +143,7 @@ class Minio:

def __init__(
self,
*,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The keyword only argument change is not handled in all the example files and documents.

minio/helpers.py Outdated
self._map[bucket_name] = region

def remove(self, bucket_name: str):
"""Set region for the bucket."""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo, it should be remove region for the bucket.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

tmp_file_path: Optional[str] = None,
progress: Optional[ProgressType] = None,
region: Optional[str] = None,
extra_headers: Optional[HTTPHeaderDict] = None,
extra_query_params: Optional[HTTPQueryDict] = None,
):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are not taken care in the examples provided in this file as well as all examples and docs.

version_id=version_id,
extra_headers=request_headers,
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the reason for not including region and extra headers even though the method accepts?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fget_object() saves get_object stream to a temporary file. The temporary file name is like "{passed_file_path}.{etag_of_the_object}.part.minio". To get the etag of the object, we use stat_object(). For this case, there is no need to pass any extra headers/query_params to stat_object(). Finally the temporary file is renamed to passed_file_path.

@balamurugana balamurugana force-pushed the Add-region-extra_headers-and-extra_query_params branch 3 times, most recently from 4d50239 to f473f2f Compare September 18, 2025 15:48
Now all APIs accepts region, extra_headers and extra_query_params
additional arguments for more control.

Signed-off-by: Bala.FA <bala@minio.io>
@balamurugana balamurugana force-pushed the Add-region-extra_headers-and-extra_query_params branch from f473f2f to f018d84 Compare September 18, 2025 16:03
Copy link

@sivanantham-gnanavel sivanantham-gnanavel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to update API.md and README.md for:

  • Minio() → keyword-only arguments
  • metadata → user_metadata

region = self._get_region(bucket_name)
region = self._get_region(
bucket_name=bucket_name,
region=region,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing: extra_headers and extra_query_params

"my-bucket", "my-object", "my-filename",
bucket_name="my-bucket",
object_name="my-object",
file_path="my-filename",
metadata={"My-Project": "one"},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
metadata={"My-Project": "one"},
user_metadata={"My-Project": "one"},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants