Metadata-Version: 2.1
Name: snappea
Version: 0.1.0
Summary: MessageQueue-less task runner for Django
Author-email: "Klaas van Schelven (Bugsink BV)" <klaas@bugsink.com>
License: BSD-3-Clause
Classifier: Framework :: Django
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: inotify-simple

# Snappea

A simple alternative for celery that doesn't require a broker.

See https://www.bugsink.com/snappea-design/

![Logo](snappea-logo.png "Snappea Logo")

### Usage:

1. Add `snappea` to your `INSTALLED_APPS`.

2. Add a "snappea" DATABASE to your settings, and route snappea traffic to it:

```
DATABASES = {
    [..]
    "snappea": {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'snappea.sqlite3',
        'OPTIONS': {
            'timeout': 5,
        },
    },
}
 
DATABASE_ROUTERS = ("snappea.dbrouters.SeparateSnappeaDBRouter",)

```

3. Create the tables:

```
python manage.py migrate  --database=snappea
```

4. Start the snappea background process:

```
python manage.py runsnappea
```

5. In another Window, fire off a task to test that it works:

```
python manage.py shell
Python [..] (main, [..]
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)

>>> from snappea.example_tasks import printing_task
>>> printing_task.delay()
```

You should now see text in your snappea console.

### Limitations

* Django-only
* Linux-only.

