Skip to main content

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


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.9.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

safe_s3_storage-0.9.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file safe_s3_storage-0.9.0.tar.gz.

File metadata

  • Download URL: safe_s3_storage-0.9.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for safe_s3_storage-0.9.0.tar.gz
Algorithm Hash digest
SHA256 7c25b0aaa4e5d607acdc641a42b3f319a4fb74d99cea74ef9fede3b5a3bf4b98
MD5 dd5cbb192a9b69357a0bd4c57b4188d2
BLAKE2b-256 70e6ed116ae5df4cf2089f0ff4d108d32a750cfd395c2854e275dec0a5d764da

See more details on using hashes here.

File details

Details for the file safe_s3_storage-0.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for safe_s3_storage-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 61245583f6aaada3ff58c68b1d64db6fe4ddeedee6fdcd1e4ab8bb2cb96be4d8
MD5 d45ce81443c532eab89a87469a96cf09
BLAKE2b-256 0dc571cb508b0377503c47771e6bbef73c60b3580eb305757e6c42c621444e29

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page