loading

Logout succeed

Logout succeed. See you again!

ebook img

Falcon Documentation PDF

pages77 Pages
release year2015
file size0.3 MB
languageEnglish

Preview Falcon Documentation

Falcon Documentation Release 0.3.0 Kurt Griffiths et al. May26,2015 Contents 1 WhatPeopleareSaying 3 2 Features 5 3 UsefulLinks 7 4 Resources 9 5 Documentation 11 5.1 CommunityGuide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 5.2 UserGuide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 5.3 ClassesandFunctions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 5.4 Changelogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 PythonModuleIndex 69 i ii FalconDocumentation,Release0.3.0 Releasev0.3(Installation) FalconisaminimalistWSGIlibraryforbuildingspeedywebAPIsandappbackends. WeliketothinkofFalconas theDieterRamsofwebframeworks. WhenitcomestobuildingHTTPAPIs,otherframeworksweighyoudownwithtonsofdependenciesandunnecessary abstractions. FalconcutstothechasewithacleandesignthatembracesHTTPandtheRESTarchitecturalstyle. 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()) Contents 1 FalconDocumentation,Release0.3.0 2 Contents 1 CHAPTER What People are Saying “Falconlooksgreatsofar. Ihackedtogetheraquicktestforatinyserverofmineandwas~40%fasterwithonly20 minutesofwork.” “I’mloving#falconframework! Supercleanandsimple,IfinallyhavethespeedandflexibilityIneed!” “IfeellikeI’mjusttalkingHTTPatlast,withnothinginthemiddle. Falconseemsliketherequestsofbackend.” “Thesourcecodeforfalconissogood,Ialmostpreferittodocumentation. Itbasicallycan’tbewrong.” “Whatotherframeworkhasintegratedsupportfor‘786TRYITNOW’?” 3 FalconDocumentation,Release0.3.0 4 Chapter1. WhatPeopleareSaying 2 CHAPTER Features Falcontriestodoaslittleaspossiblewhileremaininghighlyeffective. • RoutesbasedonURItemplatesRFC • REST-inspiredmappingofURIstoresources • Global,resource,andmethodhooks • IdiomaticHTTPerrorresponses • FullUnicodesupport • Intuitiverequestandresponseobjects • Worksgreatwithasynclibrarieslikegevent • MinimalattacksurfaceforwritingsecureAPIs • 100%codecoveragewithacomprehensivetestsuite • Onlydependsonsixandmimeparse • Python2.6,2.7,3.3,3.4+PyPy 5 FalconDocumentation,Release0.3.0 6 Chapter2. Features

See more

The list of books you might like