tinys3
raw JSON → 0.1.12 verified Fri May 01 auth: no python
A small library for uploading files to S3 with support for async uploads, worker pools, cache headers, etc. Current version is 0.1.12, released infrequently.
pip install tinys3 Common errors
error AttributeError: 'NoneType' object has no attribute 'get' ↓
cause Passing None for access_key or secret_key when not using environment variables.
fix
Set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables, or pass valid key strings to Connection().
error tinys3.exceptions.ConnectionError: The authorization mechanism you have provided is not supported ↓
cause Likely due to using old AWS Signature Version (e.g., v2) that is no longer supported.
fix
Enable TLS and ensure you are using valid credentials. If problem persists, use boto3.
Warnings
gotcha tinys3 uses Boto-style credentials (access key, secret key) but does not read from ~/.aws/credentials or environment variables automatically. You must pass them explicitly or set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables before importing. ↓
fix Explicitly pass keys to Connection(), or set environment variables and use conn = Connection(None, None, tls=True) — but note that None keys may cause attribute errors in some versions.
deprecated The library is not actively maintained; last release was in 2017. It may not work with newer Python versions or AWS SDK changes. ↓
fix Consider migrating to boto3 for long-term support.
gotcha The library does not support multipart uploads for large files. Uploading files larger than ~5GB will fail silently or raise an error. ↓
fix Use boto3's multipart upload for files > 5GB.
Imports
- Connection wrong
import tinys3; conn = tinys3.Connection(...)correctfrom tinys3 import Connection
Quickstart
from tinys3 import Connection
conn = Connection('ACCESS_KEY', 'SECRET_KEY', tls=True)
f = open('test.txt', 'rb')
conn.upload('test.txt', f, 'mybucket')