Skip to main content

Tasty event processing with Kafka

Project description


cronut is a barebones event processing library using Kafka.


from collections import deque
import json

from cronut import App

d = deque(maxlen=30)

app = App('myapp', broker='kafka://localhost:9096')

def stateless(message):
    event = json.loads(message.value())

@app.process('topic2', state=d)
def stateful(message, state):
    event = json.loads(message.value())

@app.timer(interval=0.1, state=d)
def retrieve(state):
    event = state.pop()

def greet():


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for cronut, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size cronut-0.1.0-py2.py3-none-any.whl (5.4 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size cronut-0.1.0.tar.gz (4.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page