Skip to main content

Repid is a simple, fast, and extensible async task queue framework, with built-in AsyncAPI 3.0 schema generation.

Project description

repid

Repid's logo

PyPI version Coverage Tests PyPI pyversions Read documentation


Repid is a simple, fast, and extensible async task queue framework, with built-in AsyncAPI 3.0 schema generation.


pip install repid

Features

  • AsyncAPI 3.0 out of the box - your schema is generated automatically as you build. No separate spec files to maintain, no drift between code and docs.

  • Broker flexibility - works with RabbitMQ, Redis, and Google Cloud Pub/Sub. Switch or run multiple brokers side by side without changing your actor code.

  • FastAPI-style ergonomics - define actors as plain async functions with dependency injection and Pydantic argument validation. If you know FastAPI, you already know Repid.

  • Built for testability - a drop-in TestClient lets you test actors in-memory without a running broker, making unit tests fast and dependency-free.

  • LLM-friendly documentation - grab llms.txt or llms-full.txt from the docs site to feed into your favorite AI coding assistant.

Quickstart

Here is how the simplest producer-consumer application looks, using AMQP server.

Producer:

import asyncio

from repid import AmqpServer, Repid

app = Repid(title="My App", version="1.0.0")
app.servers.register_server(
    "default",
    AmqpServer("amqp://user:password@localhost:5672"),
    is_default=True,
)


async def main() -> None:
    async with app.servers.default.connection():
        await app.send_message(
            channel="default",
            payload=b"",
            headers={"topic": "awesome_job"},
        )


asyncio.run(main())

Consumer:

import asyncio

from repid import AmqpServer, Repid, Router

app = Repid(title="My App", version="1.0.0")
app.servers.register_server(
    "default",
    AmqpServer("amqp://user:password@localhost:5672"),
    is_default=True,
)

router = Router()


@router.actor
async def awesome_job() -> None:
    print("Hello async jobs!")
    await asyncio.sleep(1.0)


app.include_router(router)


async def main() -> None:
    async with app.servers.default.connection():
        await app.run_worker()


asyncio.run(main())

Check out user guide to learn more!

License

Repid is distributed under the terms of the MIT license. Please see License.md for more information.

Repid's logo is distributed under the terms of the CC BY-NC 4.0 license. It is originally created by ari_the_crow_.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repid-2.0.0b3.tar.gz (482.7 kB view details)

Uploaded Source

Built Distribution

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

repid-2.0.0b3-py3-none-any.whl (180.2 kB view details)

Uploaded Python 3

File details

Details for the file repid-2.0.0b3.tar.gz.

File metadata

  • Download URL: repid-2.0.0b3.tar.gz
  • Upload date:
  • Size: 482.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for repid-2.0.0b3.tar.gz
Algorithm Hash digest
SHA256 858c837a323c6dba17f97380a17f55ff107dc4c1cdeebde775142633a29e9e7c
MD5 73f35709af9d0ac14fe612d698eaf0c8
BLAKE2b-256 875d538b218a7c7321bb417460242a5dc0997020545c2021db21b11d92d3f1ee

See more details on using hashes here.

File details

Details for the file repid-2.0.0b3-py3-none-any.whl.

File metadata

  • Download URL: repid-2.0.0b3-py3-none-any.whl
  • Upload date:
  • Size: 180.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for repid-2.0.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 72d02e7c43b201a5e9e1c7ffd439376a983099e3a7b5d913e2bd3832646adf58
MD5 1d185f07f91ae6c7084d4d5adc05c033
BLAKE2b-256 174ac0d52b149c6cbb207b5b1c87d8485e47bf32f51676ac9b6840cf65300c9b

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