Falcon - framework for HTTP APIs

Falcon is a high-performance Python framework for building cloud APIs.

Falcon python frameworkFalcon is one of the fastest and high-performance WSGI frameworks. It is written in Python and used for building cloud APIs. Its aim is keeping balance between usability and speed. Falcon is flexible, lean and simple. It tries to do effectively its own part - HTTP APIs and stay out of the developer’s way in other tasks.

Falcon encourages the REST architectural style and includes only essential for the development features. Others like a template engine, form helpers, or an ORM, can be added by the developer later if needed. Falcon let’s developer make the choice: terms of async I/O, serialization, data access, etc. Intuitive routing is provided through URI templates and resource classes.

Falcon works good with Python 2.6, 2.7 and 3.3. Its only dependencies except the standard library are six (to support both Python 2 and 3) and mimeparse (for handling complex Accept headers). That is why Falcon is very reliable. The fewer dependencies and less code it has the lower memory consumption is. Also there is fewer places for bugs to appear. Clever unit testing can be conducted via WSGI helpers and mocks. Falcon developers do everything to keep the code clean and lean, making this Python framework easier to test, optimize, and deploy.

Falcon serves a big number of requests very quickly and efficiently uses hardware. Falcon improves API’s performance and doesn’t bottleneck it under highly concurrent workloads. Falcon handles requests several times quicker than other web frameworks. When Cython is available it provides 20% speed boost.

Falcon scenario includes benchmarks that are executed on a Rackspace Cloud Server. The benchmark acts as a WSGI server. It performs a GET request directly on each framework's app. At the same time a route template with a single embedded parameter is parsed by apps. Among Falcon’s useful features are easy access to headers and bodies through request and response classes. Each app reads both a query parameter and a header from the request data, then sets an x-header on the response, and as a result returns a randomly generated 10 KiB plain-text body.

Falcon can work together with Talons - a library of WSGI middleware that was developed specifically to assist Falcon in building RESTful APIs. As hooks for Falcon Talons is flexible, lightweight, and rapid. The first middleware in Talons is authentication middleware that allows one or more backend identity plugins to handle authentication.

Falcon has little limitations and leaves developer a lot of freedom to customize an implemented API. Handling its own part of the implementation, Falcon gives opportunity to use the best of developer’s knowledge and expertise to create product that corresponds to all the requirements remaining highly efficient and unique. To get more information visit Falcon official website.

Connect with our experts Let's talk