Skip to content
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.

pekrau/wrapid

Repository files navigation

Wrapid: Micro framework built on Python WSGI for RESTful server APIs

  • Designed for a RESTful resource-oriented architecture.
  • Provides the basis for a well-organized API uniform for all representations, including HTML for human browsers, and JSON for programmatic access.
  • Includes HTML output generation classes (derived from the HyperText module).
  • Predefined class for HTML representation in a standard page layout.
  • Built-in support to produce documentation of the API by introspection.
  • Agnostic as to back-end storage; no Object-Relational Manager (ORM), or other built-in DB connection.
  • Uses Python WSGI as the web server interface.

The framework defines four distinct phases in the server's processing of a request. The application code built on the framework can use an HTTP Response exception to jump out of the normal processing during any of the four phases.

  1. Prepare: connect to a database, authenticate the request, etc.
  2. Handling: update database, modify server-side resources, etc.
  3. Data: Collect the data for the response.
  4. Response: Select the representation, and return the response data in it.

The source code distribution contains an example implementation 'example.py', which illustrates a few of the features. To install it, enable the mod_wsgi module in your Apache2 installation, and add the contents of the file 'apache2.cnf' (available in the distribution) to your Apache2 configuration file 'sites-available/default' (or similar).

The wrapid framework is written in Python 2.6. The following source code packages are needed:

Of course, this web application is itself implemented using wrapid. The links in the navigation panel to the left show some example resources.

About

wrapid: Micro framework built on Python WSGI for RESTful server APIs

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages