Skip to main content

Repid framework: simple to use, fast to run and extensible to adopt job scheduler

Project description

repid

Repid's logo

PyPI version codecov Tests PyPI pyversions Code style: black Read documentation


Repid framework: simple to use, fast to run and extensible to adopt job scheduler.


pip install repid

Quickstart

Here is how the easiest example of producer-consumer application can look like.

Producer:

import asyncio

from repid import Connection, Job, RabbitMessageBroker, Repid

app = Repid(Connection(RabbitMessageBroker("amqp://user:password@localhost:5672")))


async def main() -> None:
    async with app.magic():
        await Job(name="awesome_job").enqueue()


asyncio.run(main())

Consumer:

import asyncio

from repid import Connection, RabbitMessageBroker, Repid, Router, Worker

app = Repid(Connection(RabbitMessageBroker("amqp://user:password@localhost:5672")))
router = Router()


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


async def main() -> None:
    async with app.magic():
        await Worker(routers=[router]).run()


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


Download files

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

Source Distribution

repid-1.5.4.tar.gz (63.0 kB view details)

Uploaded Source

Built Distribution

repid-1.5.4-py3-none-any.whl (63.3 kB view details)

Uploaded Python 3

File details

Details for the file repid-1.5.4.tar.gz.

File metadata

  • Download URL: repid-1.5.4.tar.gz
  • Upload date:
  • Size: 63.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.13.2 CPython/3.10.12 Linux/6.5.0-1017-azure

File hashes

Hashes for repid-1.5.4.tar.gz
Algorithm Hash digest
SHA256 cdd81db0f7a6c8438b44577d0d843ece0574e469ed662a48a112d7e0a95d27a1
MD5 d811e675f7c56f0a4219f5c9f5c355a5
BLAKE2b-256 e5094cc5a5c5905b1a2ca0359d52f4024af3212ef35d2bdbfd70006e85fd9204

See more details on using hashes here.

File details

Details for the file repid-1.5.4-py3-none-any.whl.

File metadata

  • Download URL: repid-1.5.4-py3-none-any.whl
  • Upload date:
  • Size: 63.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.13.2 CPython/3.10.12 Linux/6.5.0-1017-azure

File hashes

Hashes for repid-1.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ab5382616ae458f9d0b9703435e059f01072d065019171a1091b8c3d555a8a08
MD5 76a9077c5a6f06ccf65a7c1890c984e3
BLAKE2b-256 8851a7ad4674a8155e6c8fa19a30dc0ada1bac058abd47ebc51c30ed8ce926fe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page