Falcon: Bare-metal web API framework for Python
UltimateCoder (~ultimatecoder) |
Falcon is a WSGI-compliant web framework designed to build RESTful APIs without requiring external code library dependencies. API endpoints written in Falcon are 19 times faster than API endpoints written in Django or Flask. Falcon is used by organizations like LinkedIn and Rackspace in their critical projects. Learning Falcon is as easy as learning how to take a selfie from a mobile phone. Learn Falcon for performance-boosting your microservices.
Recently I was in a need to define extreme lightweight service for my employer. I can't use Django because it is heavy. Flask was the only option I thought until I found Falcon.
Falcon is WSGI-compliant web framework for crafting your ReSTful APIs. Despite being simple, APIs written by using this framework are extremely fast. Falcon apps work with any WSGI server and run great under CPython 2.7, PyPy, and CPython 3.4+. My experience says that this framework will become a de facto standard for writing APIs in Python. I have tried my best to formulate this workshop for anyone who is interested in developing APIs using Falcon.
- Design Philosophy
- Create Resource
- Integrate resources with app
- Error handling
- Writing functional tests
- Deployment guidelines
- Future of Falcon
- Resource to learn
This section will cover features of the framework. I will talk about its extensible, ReST inspired resource classes, simpler request processing, easy to read error traceback and its compatibility with popular Python interpreters. Falcon is Apache-licensed community- driven open source web framework. I will describe its design philosophy. In the end, I will show benchmarking comparing Django and Flask and Falcon as graphs.
I will demonstrate a hands-on example of writing an API endpoint using Falcon framework. This section will cover instructions from installing the framework to debugging an endpoint. I will write an API endpoint for Employee resource. This endpoint will support standard operations like Create, Read, Update and Delete. I will end this tutorial by demonstrating how one can write a functional level of test cases for their endpoints.
Deploying Falcon app is not different from deploying any WSGI application. I will share guidelines for deploying a concrete Falcon service.
Future of Falcon
In this section, I will discuss upcoming improvements and changes in the framework API.
Resources to learn
I will end my talk by sharing resources which can be read for further study.
25 minutes excluding question answers.
To understand API of this framework knowledge of basic Python programming is expected. Knowledge of Web is not necessary, but it would be good to have.
A full-stack developer by profession, a computer scientist by heart and natural born actor. One of the core organizer of https://pykachchh.github.io/workshop/PyKutch 2016.