S3 safe storage
Project description
safe-s3-storage
S3 tools for uploading files to S3 safely (antivirus check, etc) as well as downloading and deleting files.
How To Use
uv add safe-s3-storage
poetry add safe-s3-storage
Retries on S3 errors
safe-s3-storage doesn't provide any retries on S3 errors. You should configure in S3Client:
import typing
import aioboto3
from aiobotocore.config import AioConfig
from types_aiobotocore_s3 import S3Client
from application.settings import settings
async def create_s3_resource() -> typing.AsyncIterator[S3Client]:
s3_session: typing.Final = aioboto3.Session(
aws_access_key_id=settings.s3_access_key_id,
aws_secret_access_key=settings.s3_secret_access_key.get_secret_value(),
)
async with s3_session.client(
"s3",
endpoint_url=str(settings.s3_endpoint_url),
config=AioConfig(retries={"max_attempts": 3, "mode": "standard"}),
) as s3_client:
yield s3_client
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
safe_s3_storage-0.8.3.tar.gz
(4.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file safe_s3_storage-0.8.3.tar.gz.
File metadata
- Download URL: safe_s3_storage-0.8.3.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc1c91d887216eb5a9518685fab2a209261302a937509535c3b3f64013e59320
|
|
| MD5 |
b9e75914b202fc695f1c96150c447f60
|
|
| BLAKE2b-256 |
17e6a9a1e88f1b5f77173eb1c8e3a6f52f6f1b7e0ce408a25e82babee8943c3a
|
File details
Details for the file safe_s3_storage-0.8.3-py3-none-any.whl.
File metadata
- Download URL: safe_s3_storage-0.8.3-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b97ba5de89e2ef0788d4d6e065f57a1b56cba7d1141c0ef5dc366a2dc0d970ed
|
|
| MD5 |
3e7aab9e52596dd243cdc34857061437
|
|
| BLAKE2b-256 |
e581caa638187e9b53ab672e6f84c2d6a7d05b34a0803de6fc431edce988b3cd
|