Skip to main content

A minimal, zero-dependency (beyond boto3) Python facade over AWS S3, SQS, and Secrets Manager.

Project description

boto-lite

A minimal, zero-dependency (beyond boto3) Python facade over AWS S3, SQS, and Secrets Manager.

Flat public API. Strong types. Predictable errors. Nothing else.

Install

pip install boto-lite
# or
uv add boto-lite

Requires Python 3.10+ and boto3>=1.42.89.

Usage

from boto_lite import s3, sqs, secrets, BotoLiteError
from boto_lite.exceptions import NotFoundError, AuthError

# S3
s3.put_object("my-bucket", "hello.txt", b"hello world")
body: bytes = s3.get_object("my-bucket", "hello.txt")
keys: list[str] = s3.list_keys("my-bucket", prefix="logs/")
s3.delete_object("my-bucket", "hello.txt")

# SQS
sqs.send("https://sqs.us-east-1.amazonaws.com/123/my-q", "payload")
for msg in sqs.receive("https://sqs.us-east-1.amazonaws.com/123/my-q"):
    print(msg.body)
    sqs.delete("https://sqs.us-east-1.amazonaws.com/123/my-q", msg.receipt_handle)

# Secrets Manager
secrets.put("db/password", "s3cr3t")
value: str = secrets.get("db/password")
secrets.delete("db/password", force=True)

All service calls translate boto3's ClientError / NoCredentialsError into three tidy exceptions:

  • NotFoundError — missing bucket/key/queue/secret.
  • AuthError — credentials, signing, or access-denied failures.
  • BotoLiteError — base class; covers everything else.

Why — token benchmark

A typical "upload a file to S3 and read it back" script, in raw boto3 (with the error handling everyone eventually writes) vs. the boto_lite facade:

Version Tokens (cl100k_base) Lines
Raw boto3 186 19
boto_lite facade 65 9
Saved 121 (65.1%) 10

Reproduce locally:

uv sync --group dev
uv run python benchmark_tokens.py

Source: benchmark_tokens.py.

Scope

Intentionally small. Covered today:

  • S3: get_object, put_object, delete_object, list_keys (paginated).
  • SQS: send, receive (long-poll), delete, plus a frozen Message dataclass.
  • Secrets Manager: get (strings only), put (create-or-update), delete (with force).

Not covered (by design — open an issue if you need one): presigned URLs, multipart, copy/head, batch SQS, FIFO params, binary secrets.

License

MIT.

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

boto_lite-0.1.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

boto_lite-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file boto_lite-0.1.0.tar.gz.

File metadata

  • Download URL: boto_lite-0.1.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for boto_lite-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a93920b4e682a821442430c719d02b23858366a67b72844781ec1c24ef97a11c
MD5 0192088c025694c26653bca9dfb20759
BLAKE2b-256 85dea8c3f105573374f80ae133110ab5dd2a7b819956f87371243c74759f1135

See more details on using hashes here.

Provenance

The following attestation bundles were made for boto_lite-0.1.0.tar.gz:

Publisher: release.yml on ahadaoud100/boto-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file boto_lite-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: boto_lite-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for boto_lite-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 627a5568bc36b83b68e311e17ab7b613145a97bfc11eab1dd869e9205c529bf8
MD5 b1935aa9161083d42921f812a3e5b032
BLAKE2b-256 bd1adf0e0a52fa36fd86d115682ad2a981507bfebfafa6c261e6e2253b21e5e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for boto_lite-0.1.0-py3-none-any.whl:

Publisher: release.yml on ahadaoud100/boto-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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