Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Django - best Python micro web framework

Django - best Python micro web framework

There are more Python "micro" web frameworks than you can count: Flask, Bottle, Pyramid, Tornado, web.py are some examples. Django is too strict and heavy from all extraneous lines of code to successfully compete with all of them. Is it? I will show you that Django is the best micro web framework!

Marek Stępniowski

July 14, 2014
Tweet

More Decks by Marek Stępniowski

Other Decks in Programming

Transcript

  1. • few lines of code • few dependencies • small

    memory footprint • application in a single file • framework in a single file „micro” web framework additional
  2. • few lines of code • few dependencies • small

    memory footprint • application in a single file • framework in a single file „micro” web framework this
  3. „micro” web framework • Flask • Bottle • web.py •

    Django 2132 2722 6575 69399 3790 0 35 3391 test
  4. # ls django ! bin conf contrib core db dispatch

    forms http middleware shortcuts template templatetags test utils views what
  5. „micro” web framework • Flask • Bottle • web.py •

    Django 2132 2722 6575 24731 3790 0 35 3391 0 0 0 44668 test
  6. „micro” web framework • Flask • Bottle • web.py •

    Django 20124 2722 6575 24731 3790 0 35 3391 0 0 0 44668 17992 0 0 0 test
  7. from django.conf import settings ! if not settings.configured: settings.configure(DEBUG=True, DATABASES={},

    ROOT_URLCONF='app', INSTALLED_APPS=[], MIDDLEWARE_CLASSES=[], TEMPLATE_DIRS=['templates']) put
  8. from django.core.wsgi import get_wsgi_application application = get_wsgi_application() ! if __name__

    == "__main__": import sys from django.core import management management.execute_from_command_line(sys.argv) create
  9. from django.core.wsgi import get_wsgi_application application = get_wsgi_application() ! if __name__

    == "__main__": import sys from django.core import management management.execute_from_command_line(sys.argv) NOTE:
  10. • few lines of code ✔ • few dependencies ✔

    • small memory footprint ✔ • application in a single file ✔ • framework in a single file „micro” web framework look