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

toastdriven / itty

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 116
    • 12
  • Source
  • Commits
  • Network (12)
  • Issues (0)
  • 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.

The itty-bitty Python web framework. — Read more

  cancel

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

This URL has Read+Write access

Added gunicorn adapter. Thanks to binarydud for the patch! v0.6.6 
Daniel Lindsley (author)
Sat Jan 23 01:39:38 -0800 2010
commit  085f34a0dc11d6806ab1c098b158d73651165c09
tree    89a6275cd2b2ace013c991084cbd48084048f894
parent  2a5ae6d5a7f9b18f9aca69d1085b05f41057b6f4
itty /
name age
history
message
file .gitignore Fri Dec 04 20:14:46 -0800 2009 Ignored more files. [Daniel Lindsley]
file AUTHORS Sat Jan 23 01:39:49 -0800 2010 Added gunicorn adapter. Thanks to binarydud for... [Daniel Lindsley]
file LICENSE Fri Apr 17 10:26:44 -0700 2009 Making the license explicit and BSD. [Daniel Lindsley]
file README.rst Fri Dec 04 20:35:02 -0800 2009 Fixed the static file serving example. Thanks t... [Daniel Lindsley]
file __init__.py Sun Mar 08 15:47:18 -0700 2009 Added config file support and swappable WSGI se... [Daniel Lindsley]
file benchmarks.rst Fri Dec 18 21:56:38 -0800 2009 Added a Tornado adapter. Thanks to montylounge ... [Daniel Lindsley]
directory examples/ Sat Jan 23 01:39:49 -0800 2010 Added gunicorn adapter. Thanks to binarydud for... [Daniel Lindsley]
file itty.py Sat Jan 23 01:39:49 -0800 2010 Added gunicorn adapter. Thanks to binarydud for... [Daniel Lindsley]
file setup.py Sat Jan 23 01:39:49 -0800 2010 Added gunicorn adapter. Thanks to binarydud for... [Daniel Lindsley]
README.rst

itty.py

The itty-bitty Python web framework.

itty.py is a little experiment, an attempt at a Sinatra influenced micro-framework that does just enough to be useful and nothing more.

Currently supports:

  • Routing
  • Basic responses
  • Content-types
  • HTTP Status codes
  • URL Parameters
  • Basic GET/POST/PUT/DELETE support
  • User-definable error handlers
  • Redirect support
  • File uploads
  • Header support
  • Static media serving

Beware! If you're looking for a proven, enterprise-ready framework, you're in the wrong place. But it sure is a lot of fun.

Example

from itty import get, run_itty

@get('/')
def index(request):
    return 'Hello World!'

run_itty()

See examples/ for more usages.

Other Sources

A couple of bits have been borrowed from other sources:

  • Django
    • HTTP_MAPPINGS
  • Armin Ronacher's blog (http://lucumr.pocoo.org/2007/5/21/getting-started-with-wsgi)
    • How to get started with WSGI

Thanks

Thanks go out to Matt Croydon & Christian Metts for putting me up to this late at night. The joking around has become reality. :)

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