github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

garethr / mnml forked from bradleywright/mnml

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 26
    • 3
  • Source
  • Commits
  • Network (3)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Tree: b7ad29b

click here to add a description

click here to add a homepage

  • Branches (1)
    • master
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

A lightweight Python web framework — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Change to readme 
garethr (author)
Wed Apr 29 14:25:11 -0700 2009
commit  b7ad29bd38ff0f58b9e9477a5ac1d389a84639ca
tree    594e0f297bafd41a690cbf0645b45d89cfbba998
parent  ea9fc16ae8761aa49659c38e61300ed1eeeca9f7
mnml / README.textile README.textile
100644 39 lines (27 sloc) 1.741 kb
edit raw blame history

MNML WSGI Web Framework

A small python glue framework for building web applications and services that
run atop WSGI compliant servers. The emphasis is on HTTP best practices,
readable code and allowing applications to be built using whatever
other python modules you like.

MNML’s core philosophy is that we really love writing Python and want to do that for most things, but I also want a certain level of “plumbing” taken care of. In addition, MNML:

  • Is strictly WSGI;
  • Provides URL mapping to HTTP response relationship, aka routing;
  • Provides methods for all HTTP method verbs (PUT and DELETE are supported);
  • Provides the ability to add middleware functions so one can alter the request or response as required;
  • Does not dictate the template or ORM layer you should use – MNML is strictly about URL routing and serving, and tools needed to do so; and mostly
  • Lets the implementer write Python, not a sub-set of Python.

Hello World

from mnml import RegexBasedApplication, RequestHandler, HttpResponse, development_server

class HelloWorld(RequestHandler):
    def GET(self):
        return HttpResponse("<h1>Hello World</h1>")
        
routes = (
    (r'^/$', HelloWorld),
)
application = RegexBasedApplication(routes)

if __name__ == '__main__':
    development_server(application)

Credits

Original version of MNML by Bradley Wright (intranation.com) with further work by Gareth Rushgrove (morethanseven.net).

MNML has borrowed fairly heavily from newf, since that’s
basically the bare minimum code required for a routed WSGI framework. Webapp, the framework included with the Google App Engine SDK, has also provided inspiration and code.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server