Skip to main content

Python bindings for FastQ — high-performance Redis job queue written in C

Project description

FastQ

A high-performance job queue written in C, backed by Redis.

FastQ aims to be faster, leaner on RAM, and polyglot compared to existing job queue solutions like BullMQ, Sidekiq, or Celery.

Features

Core (free)

  • Fast push/pop via Redis Lists with MULTI/EXEC pipelining
  • Priority queues (high / normal / low)
  • Multi-threaded worker pool (pthreads) with Redis connection pooling
  • Automatic retries with exponential backoff
  • Dead Letter Queue for permanently failed jobs
  • Crash recovery for orphaned jobs
  • Daemon mode with systemd support
  • Python bindings (CPython C extension)
  • Node.js bindings (N-API)
  • CLI tool (fastq push, pop, stats, worker, recover)
  • Colored logging (DEBUG/INFO/WARN/ERROR)
  • Zero external runtime dependencies beyond Redis

Pro

  • Cron scheduler — persistent cron jobs and one-shot delayed jobs, survive restarts
  • Rate limiting — token-bucket limiter attached per worker
  • Batch processing — pop up to N jobs in one shot with a deadline
  • Job chaining — automatically push a child job when a parent completes
  • DAG workflows — multi-step dependency graphs; dependents unlock atomically
  • Metrics — Prometheus /metrics and JSON /health HTTP endpoint
  • HMAC license — key verification with constant-time comparison (OpenSSL)

Building

Dependencies

  • hiredis — Redis C client
  • json-c — JSON parsing
  • OpenSSL — HMAC-SHA256 (license + TLS)
  • Redis server (runtime)

Compile

make          # library + CLI
make test     # run all tests
make bench    # throughput benchmark
make python   # Python C extension
make node     # Node.js N-API addon

Run tests

# Start a dev Redis instance (in a separate terminal)
./run_redis.sh

make test

# Run tests under Valgrind
make valgrind

Benchmark

make bench

Python bindings

make python
python3 -c "import fastq; q = fastq.Queue('myqueue'); q.push('{\"hello\":1}')"

Node.js bindings

make node
node -e "const { Queue } = require('./bindings/node'); const q = new Queue('127.0.0.1', 6379, 'myqueue'); console.log(q.push('{\"hello\":1}'));"

Project Structure

fastq/
├── src/                # Core library source
├── include/            # Public headers
├── tests/              # Unit and integration tests (38 tests, 7 suites)
├── benchmarks/         # Throughput benchmarks
├── bindings/
│   ├── python/         # Python CPython extension
│   └── node/           # Node.js N-API addon
├── docs/               # Architecture & API design docs
├── Makefile
├── fastq.service       # systemd unit file
└── run_redis.sh        # Dev Redis launcher

Roadmap

Done

  • Core engine, priority queues, multi-threaded workers, connection pooling
  • Crash recovery, daemon mode, CLI
  • Python and Node.js bindings
  • Cron scheduler, rate limiter, batch processing
  • Job chaining and DAG workflows
  • Prometheus metrics, health endpoint
  • HMAC license system
  • 38 tests across 7 suites, all passing

Next

  • Go / Rust bindings
  • Web UI
  • Kubernetes operator

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

fastq_redis-1.0.0.tar.gz (6.3 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: fastq_redis-1.0.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fastq_redis-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d695e26b1cd8f53190d6dd899a7dbaf7575c565fe7f03e0a92ee21745e84b69a
MD5 b8de6cee3d63a2c9d2b09d703cdcd76d
BLAKE2b-256 ff3f2f58af9bfd54e94a43cd5c18961d6c9dc90444f7c53fa1076a8643307bb7

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastq_redis-1.0.0.tar.gz:

Publisher: publish-python.yml on OxoGhost01/FastQ-Dev

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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