Metadata-Version: 2.4
Name: firm-queue
Version: 0.1.0
Summary: Database-backed background jobs (a pure-Python port of Rails' Solid Queue). No Redis required — runs on SQLite, PostgreSQL, or MySQL.
Keywords: jobs,queue,background,tasks,sqlite,postgresql,mysql,solid_queue
Author: firm contributors
License-Expression: MIT
License-File: LICENSE
License-File: NOTICE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Database
Classifier: Topic :: System :: Distributed Computing
Classifier: Typing :: Typed
Requires-Dist: firm-core~=0.1.0
Requires-Dist: croniter>=2.0
Requires-Dist: click>=8.1
Requires-Dist: fastapi>=0.110 ; extra == 'fastapi'
Requires-Dist: flask>=3.0 ; extra == 'flask'
Requires-Dist: firm-core[mysql] ; extra == 'mysql'
Requires-Dist: firm-core[postgres] ; extra == 'postgres'
Requires-Python: >=3.11
Project-URL: Homepage, https://github.com/h11t-labs/firm
Project-URL: Repository, https://github.com/h11t-labs/firm
Project-URL: Issues, https://github.com/h11t-labs/firm/issues
Provides-Extra: fastapi
Provides-Extra: flask
Provides-Extra: mysql
Provides-Extra: postgres
Description-Content-Type: text/markdown

# firm-queue

Database-backed background jobs for Python — a pure-Python port of Rails'
[Solid Queue](https://github.com/rails/solid_queue). No Redis required: jobs live in your
existing **SQLite**, **PostgreSQL**, or **MySQL/MariaDB** database.

Part of [firm](https://github.com/h11t-labs/firm), a port of the Rails 8 Solid stack.

```bash
pip install firm-queue
pip install "firm-queue[postgres]"  # with the PostgreSQL driver
```

## Quickstart

```python
import firm.queue as bq

bq.configure(database_url="postgresql://localhost/myapp")

@bq.job()
def greet(name):
    print(f"hi {name}")

greet.enqueue("Ada")
```

Then run the workers:

```bash
firm-queue start --import myapp.jobs
```

(Create the schema first with `schema.create_all()` or the bundled Alembic migrations — see
[Getting started](https://github.com/h11t-labs/firm/blob/main/docs/queue/getting-started.md).)

## Highlights

- **Concurrency controls** — limit how many jobs with the same key run at once
- **Recurring tasks** — cron-style schedules, enqueued exactly once per tick
- **Retries & failure handling** — configurable retry/discard policies with backoff
- **Forked or threaded supervisor** — with heartbeats and crash recovery
- Flask and FastAPI integrations via `firm-queue[flask]` / `firm-queue[fastapi]`

## Docs

- [Queue overview](https://github.com/h11t-labs/firm/blob/main/docs/queue/overview.md)
- [Defining jobs](https://github.com/h11t-labs/firm/blob/main/docs/queue/jobs.md)
- [Workers & the supervisor](https://github.com/h11t-labs/firm/blob/main/docs/queue/workers-and-supervisor.md)
- [All firm documentation](https://github.com/h11t-labs/firm#readme)

MIT licensed. Schema and design derived from Solid Queue (© 37signals, MIT); see
[NOTICE](https://github.com/h11t-labs/firm/blob/main/NOTICE).
