Skip to main content

Drop-in boto3 replacement powered by Zig — 1.2x faster S3/DynamoDB, 115x with TurboAPI

Project description

faster-boto3

Drop-in boto3 acceleration layer powered by Zig. Same API, faster internals.

Approach

NOT a boto3 rewrite. Instead, we replace the slow Python internals with Zig:

Component boto3 (Python) faster-boto3 (Zig) Expected speedup
SigV4 signing hmac + hashlib Zig std.crypto.auth.hmac 5-10x
XML parsing (S3) xml.etree.ElementTree Zig XML parser 10-20x
JSON parsing (DynamoDB) json.loads Zig JSON parser 5-10x
HTTP client urllib3 (pure Python) Zig std.http.Client 3-5x
Request serialization string formatting Zig bufPrint 5-10x

Architecture

faster_boto3/
  __init__.py          # Drop-in: `from faster_boto3 import Session`
  session.py           # Wraps boto3.Session, injects Zig accelerators
  _accel.zig           # Zig native module (SigV4, parsers, HTTP)
  sigv4.zig            # HMAC-SHA256 signing
  parsers.zig          # XML + JSON response parsing

Feature Parity

boto3 has 551 unit tests and 905 functional tests. We use these as our compatibility gate:

# Run boto3's own tests against faster-boto3
python -m pytest tests/unit/ tests/functional/ -v

Phase 1: SigV4 Signing

The signing hot path runs on every single AWS API call. Moving it to Zig gives immediate speedup across all services (S3, DynamoDB, Lambda, etc).

Usage (target API)

# Option 1: Monkey-patch boto3
import faster_boto3
faster_boto3.patch()  # replaces slow internals with Zig

import boto3
s3 = boto3.client('s3')  # now uses Zig signing + parsing

# Option 2: Direct import
from faster_boto3 import Session
session = Session()
s3 = session.client('s3')

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

turboboto-0.1.0.tar.gz (370.7 kB view details)

Uploaded Source

Built Distribution

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

turboboto-0.1.0-py3-none-any.whl (366.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: turboboto-0.1.0.tar.gz
  • Upload date:
  • Size: 370.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for turboboto-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eb23928987222a2694cc6e0241461a5dfa2d81d99c1f2c263c1e972862e2c856
MD5 70630532cf71de7d522c83070845d303
BLAKE2b-256 3a935e49ebe2c08861efe1e3740169ab3a21ab2b9e7a699cecd6c7cef60d58e2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: turboboto-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 366.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for turboboto-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7205c610e53ee297767654f05e8d21f4b56f09607d86b2bbd2c0326fff622b29
MD5 c4aa90b5e3049ad6bab7d829a0238e6f
BLAKE2b-256 83cf717288b26f978138c4dc916f5b4443244f7882a8fb576631c5ec4e6117a6

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