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

bradleywright / mnml

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 31
    • 3
  • Source
  • Commits
  • Network (3)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

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

Integrate Martin Hsu's patch (thanks) 
bradleywright (author)
Mon Oct 19 11:33:16 -0700 2009
commit  7ca541786918be2a88137150c72d3fa21da9caa8
tree    89cb55841c70745246795513638f0e75203de83a
parent  6319999ca1e68e29a9e093ba77bc1f934e984bba
mnml /
name age
history
message
file .gitignore Sun Feb 15 03:08:03 -0800 2009 Add gitignore [bradleywright]
file LICENSE Sun Feb 15 03:12:10 -0800 2009 Add MIT License [bradleywright]
file README.markdown Wed Feb 25 14:43:01 -0800 2009 Switch to simple, name-based routing (`/path/:c... [bradleywright]
file mnml.py Mon Oct 19 11:33:16 -0700 2009 Integrate Martin Hsu's patch (thanks) [bradleywright]
file setup.py Sun Feb 15 11:06:26 -0800 2009 Add setup_tools cruft [bradleywright]
README.markdown

MNML - An ultra-minimal Python web framework

After growing out of the extensive feature set and perceived bloat of Django, and inspired by the new wave of super-tiny Python WSGI/Web frameworks such as Juno, Web.py, and Newf, I thought it a good exercise to write my own. MNML only includes features I feel are useful (if you disagree with the batteries I include you're free to use another framework).

Core Philosophy

MNML's core philosophy is that I really love writing Python and want to do that for most things, but I also want a certain level of "plumbing" taken care of for me. 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 named route matching for URLs with the ability to reverse said URLs (like Django's reverse function);
  • 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.

Finally, MNML will be covered by extensive unit tests!

TODO

Must haves

  • Unit tests;
  • URL reversing;
  • Shortcuts for redirects, gone, 404 etc;
  • Support for middleware (required for sessions at the least);
  • Support web.py style method routing: ` class MyRoute(object):
      def GET(self, request):
          pass
      def POST(self, request):
          pass`;
    
  • More unit tests;
  • Production WSGI interface for Apache etc.

Maybes

  • SCGI support so Google App Engine can run it;
  • De-couple routes from system so people can roll their own (using /resource/:arg/, for example);
  • Response middleware to doctor the response.

Recommended Extensions

  • Jinja2 for templates;
  • Beaker for sessions;
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