Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

quesadilla

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quesadilla

An elegant background task queue for the more civilized age

  • 0.5.0.post1
  • PyPI
  • Socket score

Maintainers
1

pipeline status coverage report latest release

quesadilla

quesadilla is an elegant background task queue for the more civilized age.

Example usage

First, install quesadilla: pip install quesadilla==0.5.0.

tasks.py:

import logging
import random

from quesadilla.connectors.in_memory import ThreadSafeInMemoryConnector
from quesadilla.core import TaskNamespace, async_task, sync_task

logging.basicConfig(level=logging.INFO)

namespace = TaskNamespace("tasks", connector=ThreadSafeInMemoryConnector())
queue = namespace.queue("queue")


@sync_task(queue)
def simple_task(i: int) -> bool:
    return i == 0


@async_task(queue)
async def simple_atask(i: int) -> bool:
    return i == 0


# simulate someone adding jobs to the queue
# queue is preloaded with 200 tasks
for _ in range(100):
    simple_task.queue(random.choice((0, 1)))
    simple_atask.queue(random.choice((0, 1)))

Run with python -m quesadilla runners listener tasks::queue.

Exit with SIGINT (Ctrl + C) or SIGTERM.

Roadmap

  • support for retrying failed tasks
  • support for cronjobs and heartbeat
  • support for task priority
  • support for delayed execution
  • documentation
  • a real-world connector! (most likely PostgreSQL with psycopg and SQLAlchemy 2.0)

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc