Skip to main content

A web micro-framework

Project description

Fresco, a web micro-framework for Python

  • Simple, powerful URL routing, request and response objects.
  • Lightweight and open to integration: you pick the templating and database libraries you want.
  • WSGI compliant: easy integration with your choice of web server, apps and middleware.

A minimal fresco web application:

from fresco import FrescoApp, GET, Response

def helloworld():
    return Response(["<h1>Hello World!</h1>"])

app = FrescoApp()
app.route('/', GET, helloworld)

Read the fresco documentation or visit the bitbucket repo for more info.



  • fresco.decorators.extract_* methods are now deprecated in favour of the functions in fresco.routeargs
  • Fixed an error in RouteArg when using a conversion function and a value is not supplied
  • Added fresco.decorators.json_response
  • Added support for python 3.4 and dropped support for python 3.2


  • A new routearg function allows RouteArgs to be constructed dynamically
  • Renamed Route.decorate to Route.wrap
  • Added Route.filter to pipe the output of the view through a custom filter function


  • Bugfix for RouteArg when using a default value
  • Bugfix for urlfor when using positional arguments.
  • Added decorate method for Route objects.
  • Added fresco.routing.register_converter class decorator for simpler registration of routing pattern converters.
  • Added fresco.util.common.object_or_404.
  • Bugfix: fresco.util.urls.make_query no longer sorts key value pairs into alphabetical order, but preserves the original ordering.
  • fresco.static.serve_static_file now checks for certain malformed requests and returns an HTTP bad request status


  • Improved startup time for apps with lots of middleware

  • fresco.context no longer copies values from the parent when setting up a new request context. This makes it easier for libraries using fresco.context to cache resources per-request.

  • Bugfix for FrescoApp.requestcontext, which was creating duplicate context frames.

  • FrescoApp.view_finished signal now passes the request object to subscribers

  • Route objects can now take a tuple of positional args to pass to views:

    Route(POST, '/contact', args=('',))
  • The route class used by RouteCollection is now configurable, allowing apps to define custom routing classes.

  • fresco.routearg.RouteKwarg has been renamed to RouteArg and now works for positional arguments via Route(..., args=...)

  • Request.make_url now accepts two new optional arguments, query_add and query_replace. This facilitates building urls based on the current query string with selected values added or replaced.

  • Bugfix: improperly encoded paths now cause a 400 bad response to be returned rather than raising UnicodeDecodeError


  • FrescoApp.requestcontext() now invokes all registered middleware. This can be useful for testing views that rely on middleware to set environ keys or provide other services
  • RouteArg classes have been expanded and are now in a separate module, fresco.routeargs


  • Bugfix: Request.form was not handling unicode data in GET requests correctly
  • fresco.core.request_class has been moved to FrescoApp.request_class
  • Route arguments can take default arguments for url generation
  • Added tox for testing: fresco is now tested and works with Python 2.6, 2.7, 3.2 and 3.3


  • Bugfix: Request.make_url was double quoting URLs in some circumstances


  • Improved handling for ResponseExceptions raised during route traversal


  • Bugfix: routing arguments were being incorrectly converted to bytestrings in python2
  • Bugfix: urlfor works correctly with dynamic routes


Note that upgrading to this version will require changes to your application

  • View functions are no longer passed a request object as a positional argument
  • The syntax used to reference views by name has changed from urlfor('mymodule:view') to urlfor('mymodule.view').
  • Routing: named routes are now supported, eg Route('/', GET, myview, name='homepage'). These can later be accessed by eg urlfor('homepage'). The old route tagging facility has been removed.
  • Routing: Support for delegating paths to other routeable objects
  • fresco.exceptions.NotFoundFinal has been replaced by NotFound(final=True)
  • Experimental Python 3 support


  • Bugfix: setting the logger property on a FrescoApp no longer causes errors


  • FrescoApp objects now have an options dictionary for application level settings
  • Added serve_static_file function
  • Added support for signals with blinker
  • urlfor now requires fully qualified module names if called with a string argument


  • Bug: URL generation broken when HTTP_HOST does not contain port number


  • Bugfixes for beaker session support and broken URL generation when ‘X-Forwarded-SSL: off’ header supplied


  • Removed dependency on Pesto

0.1 (unreleased)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
fresco-0.3.9.tar.gz (70.8 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page