Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

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


Download files

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

Files for anyflow, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size anyflow-0.1.1-py3-none-any.whl (4.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size anyflow-0.1.1.tar.gz (3.1 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