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


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-1.1.1.tar.gz (42.1 kB view details)

Uploaded Source

Built Distribution

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

repid-1.1.1-py3-none-any.whl (43.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: repid-1.1.1.tar.gz
  • Upload date:
  • Size: 42.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.5.3 CPython/3.10.6

File hashes

Hashes for repid-1.1.1.tar.gz
Algorithm Hash digest
SHA256 842b2f950f35bfbe24e214bc5f20e9a0ba49455ad43fa5d62971b87ded4d01ff
MD5 07919513809f042e5bbe75c438c43108
BLAKE2b-256 0c7924c8c6ae7ca0f0c56e4cca18a35d0077da210b062b156011ea266267f133

See more details on using hashes here.

File details

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

File metadata

  • Download URL: repid-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 43.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.5.3 CPython/3.10.6

File hashes

Hashes for repid-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5b0bc54f22d3391e6bdccfc6dfbbd7094e8de9b772ccb91e046524a09135559b
MD5 8334be79c69ec3333a586a42e1a60941
BLAKE2b-256 621583d6f54b9ccd58267f0d34e718a074db92033fdc3b4e21fa3809b413f191

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