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.12.3.tar.gz (5.0 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.12.3-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: safe_s3_storage-0.12.3.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for safe_s3_storage-0.12.3.tar.gz
Algorithm Hash digest
SHA256 436bcabb61845da0b2c3c444faffba36a175a0c08e1d76c6298777f1ce768d88
MD5 a5e0ea5ab5704c73788d756db327aa84
BLAKE2b-256 cd192061e2f907ad7672c997762d118830aca7de9f2b22b7f7eda0b54ab58f4a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: safe_s3_storage-0.12.3-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for safe_s3_storage-0.12.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3fc3efb0fdff3ccd192f2145bfb309f627f06b9103d4a5e9e865a7e09fae93e3
MD5 2ac5586110cb84a1842a4946ee441199
BLAKE2b-256 64d048dbacc4204cc770ce013e8c77bd4fc75153b61bcc7c55b02a359cc62086

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