Skip to main content

Lightweight job runner framework built on FastAPI and APScheduler with a simple web UI.

Project description

kicker

Lightweight job runner built on FastAPI and APScheduler with a simple web UI.

Features

  • FastAPI-style developer experience
    • app = Kicker()
    • @app.kick(...)
    • standard uvicorn module:app
  • Schedule jobs with APScheduler
  • Run jobs manually from UI
  • Pause/resume scheduler and individual jobs
  • Supports both sync and async functions
  • Simple HTML interface

Installation

uv add kicker

Usage

Create a project and define your jobs:

# main.py
from kicker import Kicker

app = Kicker(
  logger_fmt="%(prefix)s[%(levelname)s] %(message)s at %(asctime)s"
)

@app.kick(day_of_week='mon-fri', hour='9-20/2', minute=0)
async def job_echo(logger):
    logger.info("job_echo executed")


# run the app
# uv run uvicorn package.module:app --reload

To see logs in the UI, declare a logger parameter — kicker injects it automatically. Jobs without it work fine but won't produce UI logs.

Splitting jobs across files

Like FastAPI's APIRouter, Coworker lets you define jobs in separate files and include them in the main app — no circular imports, no shared app instance.

# jobs/weekly_report.py
from kicker import Coworker

worker = Coworker()

@worker.kick(hour=8, minute=0)
async def weekly_report(logger):
  logger.info("weekly_report executed")
# main.py
from kicker import Kicker
from jobs.weekly_report import worker

app = Kicker()
app.include_coworker(worker)

Adding multiple log outputs

It is possible to have multiple visual log output "containers". By default, the default output container is used. To see logs in a different output container, use the standatd extra keyword argument of the logger method you use (error in this example) with a output key and some string value as a new output container name:

@app.kick(second="*/5")
def sync_job(logger: Logger):
    try:
      ...
    except:
        logger.error("sync job executed in the thread pool with a very long message", extra={"output": "errors"})

Notes

  • Scheduler runs in-process (not distributed)
  • Running with multiple workers will duplicate job execution
  • Designed for simple internal tools and automation

License

MIT

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

kicker-0.6.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

kicker-0.6.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file kicker-0.6.0.tar.gz.

File metadata

  • Download URL: kicker-0.6.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for kicker-0.6.0.tar.gz
Algorithm Hash digest
SHA256 3037a3c6b56326d38724d0e7ec5427a460f26dd5774f7f3f59024760917bf03b
MD5 eec1a46c12431420488f59276b29aa80
BLAKE2b-256 79148caf96258532b2583a2b6d65b571691f6890072553bd3abd85d7d6c2217f

See more details on using hashes here.

File details

Details for the file kicker-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: kicker-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for kicker-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 da17299af3eec098e16e1c3407c8cb4ea50d0cb32221f37be1986393792a027d
MD5 219f1f8b0f6b4930bfbd75b49958eb2a
BLAKE2b-256 2cb55947838a4d2dc83c31b45e9522f9d3af782b0e929519fc7d701e9672c6d9

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