The Falcon Web Framework#

Release v4.1 (Installation)

Falcon is a minimalist ASGI/WSGI framework for building mission-critical REST APIs and microservices, with a focus on reliability, correctness, and performance at scale.

We like to think of Falcon as the Dieter Rams of web frameworks. Falcon encourages the REST architectural style, and tries to do as little as possible while remaining highly effective.

import falcon


class QuoteResource:
    def on_get(self, req: falcon.Request, resp: falcon.Response) -> None:
        """Handle GET requests."""
        resp.media = {
            'quote': "I've always been more interested in the future than in the past.",
            'author': 'Grace Hopper',
        }


app = falcon.App()
app.add_route('/quote', QuoteResource())

For a fully working example, check out the Quickstart.

What People are Saying#

“Falcon is rock solid and it’s fast.”

“We have been using Falcon as a replacement for [another framework] and we simply love the performance (three times faster) and code base size (easily half of our [original] code).”

“I’m loving #falconframework! Super clean and simple, I finally have the speed and flexibility I need!”

“Falcon looks great so far. I hacked together a quick test for a tiny server of mine and was ~40% faster with only 20 minutes of work.”

“I feel like I’m just talking HTTP at last, with nothing in the middle. Falcon seems like the requests of backend.”

“The source code for Falcon is so good, I almost prefer it to documentation. It basically can’t be wrong.”

“What other framework has integrated support for 786 TRY IT NOW ?”

Features#

Falcon tries to do as little as possible while remaining highly effective.

  • ASGI, WSGI, and WebSocket support

  • Native asyncio support

  • No reliance on magic globals for routing and state management

  • Stable interfaces with an emphasis on backwards-compatibility

  • Simple API modeling through centralized RESTful routing

  • Highly-optimized, extensible code base

  • Easy access to headers and bodies through request and response objects

  • DRY request processing via middleware components and hooks

  • Strict adherence to RFCs

  • Idiomatic HTTP error responses

  • Straightforward exception handling

  • Snappy testing with WSGI/ASGI helpers and mocks

  • CPython 3.8+ and PyPy 3.8+ support

Who’s Using Falcon?#

Falcon is used around the world by a growing number of organizations, including:

  • 7ideas

  • Cronitor

  • EMC

  • Hurricane Electric

  • Leadpages

  • OpenStack

  • Rackspace

  • Shiftgig

  • tempfil.es

  • Opera Software

If you are using the Falcon framework for a community or commercial project, please consider adding your information to our wiki under Who’s Using Falcon?

You might also like to view our Add-on Catalog, where you can find a list of add-ons maintained by the community.

Documentation#