Metadata-Version: 2.3
Name: kicker
Version: 0.1.0
Summary: Lightweight job runner framework built on FastAPI and APScheduler with a simple web UI.
Author: ANdrey Morozov
Author-email: ANdrey Morozov <andrey@morozov.lv>
Requires-Dist: apscheduler>=3.11.2
Requires-Dist: fastapi>=0.136.1
Requires-Dist: uvicorn>=0.46.0
Requires-Python: >=3.14
Description-Content-Type: text/markdown

# kicker

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

## Features

* Schedule jobs with APScheduler
* Run jobs manually from UI
* Pause/resume scheduler and individual jobs
* Supports both sync and async functions
* Simple HTML interface (no frontend framework)

---

## Installation

```bash
pip install kicker
```

---

## Quick Start

Create a project and define your jobs:

```python
# jobs.py
import logging

logger = logging.getLogger("kicker")

def my_job():
    logger.info("Hello from job")
```

Run the app:

```python
# main.py
from fastapi import FastAPI
from kicker import create_app

app = create_app()
```

Or use your current pattern:

```bash
uvicorn main:app --reload
```

---

## Usage

Open in browser:

```
http://localhost:8000/kicker
```

From UI you can:

* Start / pause scheduler
* Run jobs manually
* Pause / resume individual jobs
* View execution logs

---

## Writing Jobs

### Sync job

```python
def my_job():
    print("sync job")
```

### Async job

```python
async def my_job():
    await some_async_call()
```

Both are supported. Sync jobs are executed in a thread pool automatically.

---

## Scheduling Jobs

Example:

```python
scheduler.add_job(
    my_job,
    trigger="cron",
    minute="*/5",
    id="my_job"
)
```

---

## Project Structure (example)

```
my_project/
├── main.py
└── jobs.py
```

---

## Notes

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

---

## Roadmap

* Job registration decorators
* Plugin system
* Persistent job stores
* Better UI

---

## License

MIT
