Git Product home page Git Product logo

falconry / falcon Goto Github PK

View Code? Open in Web Editor NEW
9.4K 9.4K 920.0 6.74 MB

The no-magic web data plane API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.

Home Page: https://falcon.readthedocs.io/en/stable/

License: Apache License 2.0

Python 97.69% HTML 0.12% CSS 0.06% Shell 0.34% Makefile 0.05% Dockerfile 0.04% JavaScript 0.14% Cython 1.56%
api api-rest asgi framework http microservices python rest web wsgi

falcon's People

Contributors

carlwgeorge avatar caselit avatar csojinb avatar davidbgk avatar ex-nerd avatar flaper87 avatar fxfitz avatar jmvrbanac avatar joshbrand avatar kgriffs avatar lichray avatar maxking avatar mcm avatar mgorny avatar myusko avatar navyad avatar ozzzik avatar painterjd avatar philiptzou avatar rs-randallburt avatar santeyio avatar sebasmagri avatar steven-upside avatar tipabu avatar tudborg avatar ueg1990 avatar vgerak avatar vytas7 avatar wssbck avatar yohanboniface avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

falcon's Issues

Validation helpers

Validation helpers that throw appropriate HTTP exceptions for URI params as well as the body (validate XML, JSON).

Would this be better as a separate project/add-on?

Unit testing helpers

Plunder the test suite for useful helper functions and classes that would enable unit-testing of services that depend on Falcon.

Cannot install Falcon via PIP

Using:

pip install falcon

Produces:

(FalconExample)chads-mac-mini:FalconExample chadlung$ pip install falcon
Downloading/unpacking falcon
Could not find any downloads that satisfy the requirement falcon
No distributions at all found for falcon

Detailed Error Log Data:

Downloading/unpacking falcon

Getting page http://pypi.python.org/simple/falcon
URLs to search for versions for falcon:

No distributions at all found for falcon

Exception information:
Traceback (most recent call last):
File "/Users/chadlung/PythonProjects/FalconExample/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/basecommand.py", line 107, in main
status = self.run(options, args)
File "/Users/chadlung/PythonProjects/FalconExample/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/commands/install.py", line 256, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/Users/chadlung/PythonProjects/FalconExample/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/req.py", line 1011, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/Users/chadlung/PythonProjects/FalconExample/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/index.py", line 157, in find_requirement
raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for falcon

Allow Registration of a Custom Exception Handler

Having a mechanism for taking control of exception handling and response generation from them would be ideal in many circumstances. This allows applications to use Exception classes that better fit their domain without having to do any implicit Exception mapping or re-throwing.

XML support

Includes:

  • client_accepts_xml for Request
  • XML serialization for HTTPError

Hooks

Useful for processing req/resp objects in a DRY way.

Would need a way to possible attach attributes to req/resp objects - ctx dict?

Ideas for hooks:

  • Before/after a request, scoped at global or resource level
  • Input validators
  • Output escapers
  • dict serializer/deserializer (e.g., json.dumps) and auto-set media/content type
  • Cache-Control

perf: Cython support

When the package is installed on a given system, it should compile everything using Cython if available (possibly as an optional argument).

Also, look into annotating the code to further improve performance (would need to auto-generate or something so as not to break running interpreted).

feat: Auto-encode resp.body

In Python 3, the body will always be unicode, but in Python 2 it may not be, so have to check.

  • Watch for performance regression.
  • Need to convert resp.body to a byte string (Python 2) or bytearray (Python 3). Test with gunicorn and such to see if we can just always return a bytearray.
  • Allow specifying the encoding, but default to UTF-8.
  • Make sure to test with some crazy code points to ensure this all works OK.

Metrics collector

Add a devops metric collector that is easy to query programmatically, and eventually hook up to statsd, zmq, etc.

Support more URI template stuff

http://tools.ietf.org/html/rfc6570

  • {/list*} => /red/green/blue
  • Path Segment Expansion: {/var}
  • Mandatory query params (when literals are specified, will also need query continuation support)
  • Max length? Maybe not, because would mean 404 if exceeded unless rearchitect how route matching works. Have to match and then throw a different exception if too long.
  • Etc.

Depends on issue #114

doc: Website

  • Layout
  • Content
  • Logo
  • Background
  • Publish on CDN

Caching plugin

Something really fast for caching stuff like auth tokens. Uses ZMQ to replicate to all processes and keep lookups in-process.

Must support the Vary header.

Falcon bootstrap

Have a repo and a built-in tool or something to pull it down easily to bootstrap new projects.

Pass a custom logger to use instead of wsgi.errors

As an API developer, I can consolidate all app messages in a single log file so that I don't loose the context of the messages.

It would be cool if wsgi.errors could still (optionally) be written to in tandem.

Plugin system

Support plugins that can drop functions and classes into the falcon module namespace.

Ideas:

  • Async middleware
  • Async pipe file to/from disk
  • ZMQ, statsd channels for metrics collector
  • ?

Parallel middleware

Add optional support for executing ingress hooks in parallel using greenlets, asyncio, and/or Twisted. Processing should not continue until all parallel hooks return success (need to be able to specify conditions on the ctx that must all be true before proceeding to the next group). If any hook fails/bails out, the remaining hooks and the main app do not execute, and any parallel hooks that are still running are killed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.