Skip to content
This repository was archived by the owner on May 9, 2020. It is now read-only.

Latest commit

 

History

History
27 lines (20 loc) · 490 Bytes

README.md

File metadata and controls

27 lines (20 loc) · 490 Bytes

Flask-Cent

This is a Flask extension for centrifugal/cent.

Configuring your app

from flask_cent import CentClient
cent = CentClient(app)

Alternatively, you can configure it with the factory pattern:

cent = CentClient()
cent.init_app(app)

Publishing to the client

First create a message:

@app.route("/")
def index():
    cent.publish("my_channel_id", key1='value1', key2='value2')