Falcon

What is Falcon?

Falcon is a minimalist WSGI library for building speedy web APIs and app backends. We like to think of Falcon as the Dieter Rams of web frameworks.

Fast

Falcon is a blazing fast, minimalist Python web API framework for building reliable app backends and microservices.

Reliable

Organizations like LinkedIn, Leadpages, Wargaming, and Rackspace rely on Falcon for critical projects.

RESTful

The Falcon web framework encourages the REST architectural style. Resource classes implement HTTP method handlers that resolve requests and perform state transitions.

Complementary

Falcon complements more general Python web frameworks by providing extra performance and flexibility wherever you need it.

Extensible

A number of Falcon add-ons, templates, and complementary packages are available for use in your projects. We’ve listed several of these on the Falcon wiki as a starting point, but you may also wish to search PyPI for additional resources.

Compatible

Thanks to WSGI, Falcon runs on a large variety of web servers and platforms. Falcon works great with CPython 2.6, 2.7, and 3.4+. Or try PyPy for an extra speed boost. Falcon supports both PyPy2.7 and PyPy3.5 as of PyPy v5.10.

Code sample

# sample.py

import falcon

class QuoteResource:
    def on_get(self, req, resp):
        """Handles GET requests"""
        quote = {
            'quote': (
                "I've always been more interested in "
                "the future than in the past."
            ),
            'author': 'Grace Hopper'
        }

        resp.media = quote

api = falcon.API()
api.add_route('/quote', QuoteResource())

official falconframework.org


src stackshare.io/falcon