a simplest common middleware framework for python.
Project description
anyflow
a simplest common middleware framework for python.
HOW-TO-USE
from anyflow import Flow
flow = Flow()
@flow.use()
def middleware_1(ctx, next):
ctx.state['value'] = 1
# call the next middleware (middleware_2):
return next()
@flow.use()
def middleware_2(ctx, next):
print(ctx.state['value'])
# next middleware does not exists, call nothing:
return next()
flow.run()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
anyflow-0.1.1.tar.gz
(3.1 kB
view hashes)