Skip to main content

fanferro

Fast, robust SNS + SQS messaging for Python, powered by a Rust core.

fan-out (SNS → SQS) · fanfare (announcing to a topic) · ferro (iron: the Rust core)

import fanferro
from pydantic import BaseModel                  # or dataclasses, msgspec, protobuf, ...


@fanferro.message_type("checkout.order_placed.v1")
class OrderPlaced(BaseModel):
    order_id: str
    amount_cents: int


client = fanferro.Client(
    source="urn:service:checkout",
    provisioning=fanferro.Provisioning.ensure(),  # create missing resources (default: must exist)
)
orders = client.topic("orders")
billing = client.queue("billing", dead_letter=fanferro.DeadLetterQueue("billing-dlq"))
client.subscription(orders, billing)
consumer = client.consumer(billing, concurrency=20)


@consumer.route(OrderPlaced)
async def charge(order: OrderPlaced) -> None:
    ...                                    # return → ack · raise → retry with backoff → DLQ


async def main() -> None:
    async with client:                     # connect + provision declared resources
        await orders.publish(OrderPlaced(order_id="o-1", amount_cents=1299))
        await consumer.run()               # SIGTERM → graceful drain

Status: 0.x - the API may still change between minor versions.

Install

uv add fanferro                   # pip install fanferro
uv add "fanferro[all]"            # + pydantic, protobuf, msgspec, opentelemetry-api

Highlights

  • Handlers are plain typed functions. Return to ack, raise to retry. No receipt handles.
  • Your own types. Pydantic, dataclasses, msgspec, protobuf, JSON or raw bytes.
  • Routing on anything. Message type, attribute, body field or topic.
  • Safe by default. Heartbeats, retries with backoff, dead-letter queues, graceful shutdown.
  • Infrastructure in code. Declared queues, topics and subscriptions are checked or created.
  • Tests without AWS or Docker. An in-memory broker runs the same engine you deploy.
  • Mistakes caught early. Bad names, sizes and signatures fail before any network call.
  • Observable. Typed events, structured logs, hooks and OpenTelemetry.
  • The hard parts included. Large payloads via S3, outbox, idempotency, FIFO ordering.
  • Fast. A Rust core, full batches and little Python work per message.
  • No required dependencies. Fully typed, Python 3.12-3.15, wheels for Linux, macOS, Windows.

Performance

  • Rust does the heavy lifting. Signing, HTTP, the SQS and SNS protocols and batching.
  • Full batches, overlapping. Messages are received ten at a time, the next batch prefetched.
  • Acks don't block handlers. Deletes are batched in the background while the next message runs.
  • Little Python per message. Only your codecs, routing and handlers run on the event loop.
  • Lean defaults. Small messages, no redundant checksums, no tracing work unless enabled.

Benchmarks and how to run them: Performance.

Real AWS, emulators and the in-memory broker

fanferro runs on real AWS, on the AWS emulators MiniStack and LocalStack, and on its in-memory broker. Real AWS is the reference: probes run the same scenarios and raw API calls on each target, and the in-memory broker follows AWS wherever they found a difference, with AWS's error codes and texts.

Target Use it for How it differs from AWS
Real AWS Production It is the reference
In-memory broker (fanferro.testing.memory_client()) Tests without AWS or Docker No credentials, and other accounts' queues and topics are just missing; filter policy errors leave out the parser position SNS appends; long polls that a stopping consumer aborts end at once (MemoryBroker(orphaned_polls=True) serves them as SQS does)
MiniStack End-to-end tests without Docker Accepts many queue and SNS attributes, names and FIFO ids that AWS refuses; differs in receipt handles of earlier receives, Number values, numeric filters on String attributes, and X-Ray headers and Binary values through SNS
LocalStack End-to-end tests with Docker Accepts out-of-range queue attributes and a dead-letter queue of the other type; differs in FIFO receipt handles and duplicates, Number values, wildcard filters and presigned URL expiry

Neither emulator enforces SQS's 60 seconds between deleting a queue and creating it again or between two purges, drops SNS deliveries to queues encrypted with alias/aws/sqs as AWS does, or refuses unknown credentials. Every finding, the recorded runs and how to probe an account of your own: Parity with AWS.

Learn more

Getting started First publisher and consumer, local development
Publishing · Consuming Options, batches, FIFO, routing, concurrency, shutdown
Failure handling Retries, dead-letter queues, poison messages
Provisioning Declaring resources, failure modes, IAM permissions
Message formats · Large payloads Codecs, envelopes, claim checks
Observability Events, logging, hooks, OpenTelemetry, metrics
Patterns Transactional outbox, inbox, fan-out, versioning, ordering
Testing · Deployment In-memory broker, MiniStack, production setup
Examples Runnable examples for every feature
Reference Configuration, events, attributes, errors
Architecture How it is built and why, with decision records

Using an AI coding agent? Point it at fanferro guide (the usage guide shipped with the package) or copy skills/fanferro into your project's skills.

Contributing

See AGENTS.md (for humans and AI agents): uv sync, make check, conventional commits.

License

MIT

Metadata

Release files for fanferro 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fanferro 0.7.0
File Size Uploaded Provenance Actions
fanferro-0.7.0.tar.gz 335.4 kB With provenance Details for fanferro-0.7.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for fanferro 0.7.0
File Actions
fanferro-0.7.0-cp312-abi3-win_arm64.whl CPython 3.12 abi3 Windows ARM64 Details for fanferro-0.7.0-cp312-abi3-win_arm64.whl
fanferro-0.7.0-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details for fanferro-0.7.0-cp312-abi3-win_amd64.whl
fanferro-0.7.0-cp312-abi3-musllinux_1_2_x86_64.whl CPython 3.12 abi3 Linux musl 1.2+ x86-64 Details for fanferro-0.7.0-cp312-abi3-musllinux_1_2_x86_64.whl
fanferro-0.7.0-cp312-abi3-musllinux_1_2_aarch64.whl CPython 3.12 abi3 Linux musl 1.2+ ARM64 Details for fanferro-0.7.0-cp312-abi3-musllinux_1_2_aarch64.whl
fanferro-0.7.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 abi3 Linux glibc 2.17+ x86-64 Details for fanferro-0.7.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
fanferro-0.7.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.12 abi3 Linux glibc 2.17+ ARM64 Details for fanferro-0.7.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
fanferro-0.7.0-cp312-abi3-macosx_11_0_x86_64.whl CPython 3.12 abi3 macOS 11.0+ x86-64 Details for fanferro-0.7.0-cp312-abi3-macosx_11_0_x86_64.whl
fanferro-0.7.0-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details for fanferro-0.7.0-cp312-abi3-macosx_11_0_arm64.whl

Total release size: 55.0 MB

Release files / fanferro-0.7.0.tar.gz

Download URL fanferro-0.7.0.tar.gz
Size 335.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3a12bbede6bfa79eb5d331fb5176911fcb1e59acb4cfed40f069bece622b6f90
BLAKE2b-256 checksum
How to use checksums
9f086515b002ebf2f8751272c1355c3dba7f07e7fe19c2c42ef9e02307c54f7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / fanferro-0.7.0-cp312-abi3-win_arm64.whl

Download URL fanferro-0.7.0-cp312-abi3-win_arm64.whl
Size 6.8 MB
Tags CPython 3.12 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
b6b1fbe4a4b707a14880cc3e5d4ac3fc35d91ace6b9309065fa326e2d11a220b
BLAKE2b-256 checksum
How to use checksums
fdadae9fcf4d479b59b1b8a2bdac8d85c873f1aa5142bbd97b98f84ec4d141b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / fanferro-0.7.0-cp312-abi3-win_amd64.whl

Download URL fanferro-0.7.0-cp312-abi3-win_amd64.whl
Size 7.2 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
1b5158a5713e5b24245ba422e74a45c908a2dbc0046f7de816501eb886cfb6ce
BLAKE2b-256 checksum
How to use checksums
6552db68011de064c044c186aabdb63201942223a87702724472060153a6ece5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / fanferro-0.7.0-cp312-abi3-musllinux_1_2_x86_64.whl

Download URL fanferro-0.7.0-cp312-abi3-musllinux_1_2_x86_64.whl
Size 7.1 MB
Tags CPython 3.12 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
78a7a2740238aad76011a2c383ac9909ee7e56b7b8e576b2e896a86dd73d912a
BLAKE2b-256 checksum
How to use checksums
0be74015ed516e39f24bfa0950e2b3f526f8ef73245097464d84f376d7f437b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / fanferro-0.7.0-cp312-abi3-musllinux_1_2_aarch64.whl

Download URL fanferro-0.7.0-cp312-abi3-musllinux_1_2_aarch64.whl
Size 6.8 MB
Tags CPython 3.12 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
aeb89136b39f7ed610775ca7df45ed83ba4cfb3d0d5b182f38a2c0acc6f3d9b3
BLAKE2b-256 checksum
How to use checksums
1d4228d34d30736e94af76b2acee489477c60f0faf45c0210bbbe8f4742f8a29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / fanferro-0.7.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL fanferro-0.7.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 7.1 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
c844f98d2a97cae830c73c3ec711cb31743bfd8c6b2d18a5c0e100c615a9a60e
BLAKE2b-256 checksum
How to use checksums
2a7b35c1e8dbed7adc8610ae65ab0cd75ca4590d9858ad8dee4dc4411f6011ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / fanferro-0.7.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL fanferro-0.7.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 6.8 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
8810359aeea7fe9cf927b4cf875672279915bd4b1a3dddb38b5a1243f529265b
BLAKE2b-256 checksum
How to use checksums
ae6daaf311693eb6c2bcc4e3fe0a0b1460e111dc2a307a6645c8644f4748fff6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / fanferro-0.7.0-cp312-abi3-macosx_11_0_x86_64.whl

Download URL fanferro-0.7.0-cp312-abi3-macosx_11_0_x86_64.whl
Size 6.9 MB
Tags CPython 3.12 abi3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
b11d051971c5178d11908a7c0d46030f76b41469ef1afb237f956fb801f989b8
BLAKE2b-256 checksum
How to use checksums
50529966a0026f011295e712ae2b4976d00c509b8b45386c874b0ba41b7e375a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / fanferro-0.7.0-cp312-abi3-macosx_11_0_arm64.whl

Download URL fanferro-0.7.0-cp312-abi3-macosx_11_0_arm64.whl
Size 6.0 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1d184023e50f7d9f73465717c3b4e5c5122a7f27f4d25fb00216b415999ea73d
BLAKE2b-256 checksum
How to use checksums
1c487d480e87287f32fc1beab3673b8c230fbff3d568ac6042152a410b4d3c6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Security for fanferro 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 9 files in this release have been uploaded with provenance metadata.

Select from 9 files

Attestation for fanferro-0.7.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page