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.

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.5.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.5.0
File Size Uploaded
fanferro-0.5.0.tar.gz 285.9 kB Details

Built distributions (wheels)

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

Total release size: 54.0 MB

Release files / fanferro-0.5.0.tar.gz

Download URL fanferro-0.5.0.tar.gz
Size 285.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3eac7d3a2ef92c450df23a8f72fde49956c3a86cb163f2eec78308b9a33866f5
BLAKE2b-256 checksum
How to use checksums
0f575afae9fbb45345709ca2f463c775e8134eff09e7e31d3f79f90287e77dcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 17, 2026.

Transparency log

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

Download URL fanferro-0.5.0-cp312-abi3-win_arm64.whl
Size 6.7 MB
Tags CPython 3.12 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
2f446020e26f2de59d5fe413d94b4b42c43d3150b11a31bcbb7e1221b5e3255c
BLAKE2b-256 checksum
How to use checksums
6a63a0fa784ef1e8de07875aa8ef7aff230f1bef49035484037bb64a25c12667
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 17, 2026.

Transparency log

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

Download URL fanferro-0.5.0-cp312-abi3-win_amd64.whl
Size 7.0 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
ed3eeafc512aec793589b6646eaf4c67a4e02487db53f654d5cf9dc611964015
BLAKE2b-256 checksum
How to use checksums
34446eb961ab8eb03aa0bc3571add478c84850641de0ed9aa4ad77cd4d61e0d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 17, 2026.

Transparency log

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

Download URL fanferro-0.5.0-cp312-abi3-musllinux_1_2_x86_64.whl
Size 7.0 MB
Tags CPython 3.12 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
d078807844f8d36003d22440adb5dc6bbe43160cb1d9f7b6c6a3d4f782f0c395
BLAKE2b-256 checksum
How to use checksums
758e9ada00720d1163841619533fe86e4576d5952b3ef45bf3eae67108e6e5ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 17, 2026.

Transparency log

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

Download URL fanferro-0.5.0-cp312-abi3-musllinux_1_2_aarch64.whl
Size 6.7 MB
Tags CPython 3.12 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
b7749a78538d00913fe7501dfeed4ac1f1cf254414d6bdad81e3c1fd88517903
BLAKE2b-256 checksum
How to use checksums
b79f011c82168926fd2559a7df4d98e8f1f3d5ae610575e6aaeb9737613b06c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 17, 2026.

Transparency log

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

Download URL fanferro-0.5.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 7.0 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
e32fceec815408c0459cecad6e8b51ac82226c5815428f362667fb0b00a50821
BLAKE2b-256 checksum
How to use checksums
62f5b21e79d48ef4eeac68ef3597cce459c7f6999941a8204092b73ff9f1c564
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 17, 2026.

Transparency log

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

Download URL fanferro-0.5.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 6.7 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
e1660210c02f2f8f6168f13a0e54513e9894f5f3c2b3d749575bfa082639c298
BLAKE2b-256 checksum
How to use checksums
05e1a8909a60e5179ba663c77e0e9b2195fb8725e1ac7934d6b0ed868dcedb8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 17, 2026.

Transparency log

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

Download URL fanferro-0.5.0-cp312-abi3-macosx_11_0_x86_64.whl
Size 6.8 MB
Tags CPython 3.12 abi3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
faa2176bf179fa7d151c285eb3ad28ad92635a84dca2a7368e847def744e8d7d
BLAKE2b-256 checksum
How to use checksums
194c0846e6ce7a0d43280d8c6a1679d8c7e635c6f4d50a32bf31955d13da4a5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 17, 2026.

Transparency log

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

Download URL fanferro-0.5.0-cp312-abi3-macosx_11_0_arm64.whl
Size 5.9 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f1537cf700ff161982c1d63ff34c01eb763a2bdcdc34ce3773e9cc96dd67e4f1
BLAKE2b-256 checksum
How to use checksums
62e98a1be73a4d3d2d0dec9fb1267243c685d2e30c9ac0bd57bee5abd785840e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.0 This release

9 release files

0.4.0

9 release files

0.3.0

9 release files

0.2.0

9 release files

0.1.0

9 release files

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