Object Store¶
Async object storage client for pyfetcher.store.
- Purpose:
Provide an async client for MinIO/S3 operations: upload, download, delete, list, and presigned URL generation. Uses aioboto3 for async S3 compatibility.
- class pyfetcher.store.client.ObjectStoreClient(config=None)[source]¶
Async object storage client for MinIO/S3.
Provides upload, download, delete, and presigned URL operations using aioboto3’s async S3 interface against a MinIO endpoint.
- Parameters:
config (PyfetcherConfig | None) – Application configuration with MinIO connection details.
- async ensure_bucket(bucket=None)[source]¶
Create the bucket if it doesn’t exist.
- Parameters:
bucket (str | None) – Bucket name. Defaults to config bucket.
- Return type:
None
- async upload_bytes(key, data, *, bucket=None, content_type=None)[source]¶
Upload bytes to object storage.
- async upload_file(key, file_path, *, bucket=None, content_type=None)[source]¶
Upload a local file to object storage.
- async presigned_get_url(key, *, bucket=None, expires_in=3600)[source]¶
Generate a presigned GET URL.