Skip to main content

A job queue and task management system with client-server architecture

Project description

WhatsNext logo

Warning This is a private project in early development. It has not been security audited and is strongly advised against running on public-facing servers. Use only in trusted, internal environments. You may also experience several bugs at this time due to the early development stage of this project.

Python 3.10+ PyPI version Documentation Tests License CLI

A simple, powerful job queue for Python applications.

WhatsNext helps you manage and execute background jobs across multiple machines. Add jobs to a queue, and workers pick them up and run them.

Features

  • Simple: Just a few lines of code to get started
  • Reliable: Jobs are stored in PostgreSQL, so nothing gets lost
  • Scalable: Run multiple workers on different machines
  • Flexible: Works with any Python code, SLURM clusters, or Kubernetes
  • Lightweight Client: No database, no caching, no background processes - the client is pure HTTP and runs in restricted environments

Quick Example

from whatsnext.api.client import Server, Job, Client, CLIFormatter

# Connect and get a project
server = Server("localhost", 8000)
project = server.get_project("my-experiments")

# Add a job to the queue
project.append_queue(Job(
    name="experiment-1",
    task="train-model",
    parameters={"learning_rate": 0.01, "epochs": 100}
))

# Create a worker and process jobs
formatter = CLIFormatter(executable="python", script="train.py")
client = Client(
    entity="ml-team",
    name="gpu-worker-1",
    project=project,
    formatter=formatter
)
client.work()

Installation

# Install with uv (recommended)
uv add whatsnext[all]

# Or with pip
pip install whatsnext[all]

Requirements

  • Python 3.10+
  • PostgreSQL 14+

Running the Server

  1. Create a .env file with your database configuration:
database_hostname=localhost
database_port=5432
database_user=postgres
database_password=postgres
database_name=whatsnext
  1. Start the server:
uvicorn whatsnext.api.server.main:app --reload
  1. Visit http://localhost:8000/docs for interactive API documentation.

Documentation

Full documentation is available at the project docs site. Build locally with:

uv run mkdocs serve

Development

# Install dependencies
uv sync --all-extras --all-groups

# Run quality checks
uv run ruff format .
uv run ruff check . --fix
uv run ty check whatsnext
uv run pytest -v

License

AGPL-3.0 - See LICENSE for details.

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

whatsnext-0.0.2.tar.gz (80.2 kB view details)

Uploaded Source

Built Distribution

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

whatsnext-0.0.2-py3-none-any.whl (85.4 kB view details)

Uploaded Python 3

File details

Details for the file whatsnext-0.0.2.tar.gz.

File metadata

  • Download URL: whatsnext-0.0.2.tar.gz
  • Upload date:
  • Size: 80.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for whatsnext-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b343515362502da8fd4b858028c3ceac45cf096cc71d057990513d81b55d20a4
MD5 267e423e4e4eed6954691842599e580f
BLAKE2b-256 62e8900f6cfcff9ee8b5c3111a8307a84053c21086dde10636b2ca33b8e33f13

See more details on using hashes here.

File details

Details for the file whatsnext-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: whatsnext-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 85.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for whatsnext-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b3ee659c0f6b1f22df14e11e629cf34871f1ad383dfebe0847670593d2664a08
MD5 e17947161779aa1ec25c8a07c2657e41
BLAKE2b-256 a8fdecd383e8c18c824fd8ec74d9f5be05b8cafc261c16dce986c30e80d2704d

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