xoto3

raw JSON →
2.1.0 verified Sat May 09 auth: no python

High-level utilities for common boto3 operations in AWS serverless Python development. Current version 2.1.0, supports Python >=3.12, <3.15.

pip install xoto3
error ModuleNotFoundError: No module named 'xoto3'
cause Library not installed or installed in wrong environment.
fix
Run pip install xoto3 in your Python environment.
error ImportError: cannot import name 'read_from_bucket' from 'xoto3'
cause Incorrect import path; function is in submodule, not top-level.
fix
Use from xoto3.s3 import read_from_bucket.
error TypeError: write_to_bucket() got an unexpected keyword argument 'raw_response'
cause Using deprecated parameter removed in xoto3 2.x.
fix
Remove raw_response; use Response object returned or check documentation for new pattern.
breaking xoto3 2.x drops support for Python <3.12 and changes some function signatures (e.g., removed deprecated `raw_response` argument).
fix Upgrade to Python 3.12+ and review function signatures; adopt new patterns from documentation.
deprecated The `pynamodb` integration (`xoto3.dynamodb`) is deprecated and will be removed in a future major release.
fix Migrate to plain boto3 DynamoDB calls or use pynamodb directly.
gotcha Functions like `read_from_bucket` return bytes by default; string decoding is not automatic. Expect bytes unless you specify `encoding` parameter.
fix Use `.decode('utf-8')` on the result or pass `encoding='utf-8'` to the function.

Simple S3 read/write using xoto3 utilities.

import os
from xoto3.s3 import read_from_bucket, write_to_bucket
bucket = os.environ.get('S3_BUCKET', 'my-bucket')
key = 'example.txt'
write_to_bucket(bucket, key, b'Hello, xoto3!')
data = read_from_bucket(bucket, key)
print(data)