Python Tech 2012: django, CherryPy, unittest, nose, celery, decorator
I attended some python conference this week. Here's some random notes on python tech i've learned. Most of these are advanced.
What Are Some Most Popular Python Web Frameworks?
Explicitly mentioned by Google App Engine:
Google App Engine supports any framework written in pure Python that speaks WSGI, including Django, CherryPy, Pylons, web.py, and web2py.
Here's the popular python web frameworks:
- Django (most popular; heavy weight)
- CherryPy (minimal)
- Pylons project (a hodgepodge of many things, including Pyramid.)
- Web2py (inspired by Ruby On Rails)
- http://webpy.org/ (minimal)
They are all based on WSGI. WSGI (Web Server Gateway Interface) is python library that's a simple interface between a python web framework and web servers. So that, each python web app framework can all use this, instead of each creating their own.
Automated Testing Tool
unittest is a python lib for automated testing. It's bundled with python 2.7. (http://docs.python.org/library/unittest.html)
python nose is a improved version of python unittest lib for automated-testing. Nose extends the test loading and running features of unittest, making it easier to write, find and run tests.
Advantages of “python nose” over unittest:
- You can write test functions, and not forced to write test classes.
- Automatic tests discovery and collecting, you do not have to build test suites manually.
- Plugin support
- Very useful standard plugins (coverage, output capture, drop into debugger on errors, doctests support, profiler)
- Test tagging and easy selection of test sets based on tags.
- Parallel testing
- Flexible fixtures support
- Test generators
above opinion by “abbot” from http://stackoverflow.com/questions/5696884/python-nose-vs-unittest
Python Nose home page: http://nose.readthedocs.org/en/latest/
Celery Task Queue
Celery Task Queue (celeryproject.org) is a asynchronous task queue/job queue based on distributed message passing. It is focused on real-time operation, but supports scheduling as well. Written in python.
If you have a question, put $5 at patreon and message me.