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.0.0.tar.gz (41.5 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.0.0-py3-none-any.whl (43.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for repid-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8b900a351a108a8e262a3a5722caaddae486655817db1e3ddc0b3cea472eed46
MD5 895284552ce3af097bb84ef41bd19f69
BLAKE2b-256 836d33a1e61711f37584ad9b93b8d8c6406ef6c45144516f1ea6f02e299d1684

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for repid-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c96a4ac3627621b99b3eb602b94e9d8e2e317f0167cf8a6b8685f817543b2016
MD5 1ecaa82557c58456fb0deb7a1b9d3e9c
BLAKE2b-256 91e25340a46196f79f0294cacedb10d7d02ed1e2bc43afdf4c52a92ee000cce8

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