2.5 KiB
Falcon: The Unladen WSGI Framework
Release v. (Installation <install>)
Falcon is a minimalist WSGI library for building speedy web APIs and app backends.
When it comes to building HTTP APIs, other frameworks weigh you down with tons of dependencies and unnecessary abstractions. Falcon cuts to the chase with a clean design that embraces HTTP. We like to think of Falcon as the Dieter Rams of web frameworks; functional, simple, and elegant.
class CatalogItem(object):
# ...
@falcon.before(hooks.to_oid)
def on_get(self, id):
return self._collection.find_one(id)
app = falcon.API(after=[hooks.serialize])
app.add_route('/items/{id}', CatalogItem())Developer Joy
Python developers around the world enjoy using Falcon at home and at work.
TODO: When we confirm enough of these, publish the list.
Confirmed: IBM, Red Hat, Rackspace Unconfirmed: AT&T, Marchex
- S. Magrí
-
I feel like I'm just talking HTTP at last... with nothing in the middle... Falcon seems like the 'requests' of backend.
- K. Conway
-
What other framework has integrated support for HTTP 786 'TRY IT NOW'?
- jlegler
-
The source code for falcon is so good, I almost prefer it to documentation. It basically can't be wrong.
Features
Falcon tries to do as little as possible while remaining highly effective.
- Routes based on URI templates RFC
- REST-inspired mapping of URIs to resources
- Global, resource, and method hooks
- Idiomatic HTTP error responses
- Full Unicode support
- Intuitive request and response objects
- Works great with async libraries like gevent
- Minimal attack surface for writing secure APIs
- 100% code coverage with a comprehensive test suite
- Only depends on six and mimeparse
- Python 2.6, 2.7, 3.3, 3.4 + PyPy
User Guide
user/intro user/install user/quickstart user/tutorial
API Documentation
api/api api/request_and_response api/status api/errors api/hooks api/util