/july/__init__.py

https://github.com/fengluo/july · Python · 86 lines · 45 code · 1 blank · 40 comment · 0 complexity · fbedc989b136b0358ea53c78127115a8 MD5 · raw file

  1. # -*- coding: utf-8 -*-
  2. """
  3. July
  4. =====
  5. .. image:: https://secure.travis-ci.org/lepture/july.png
  6. :target: https://secure.travis-ci.org/lepture/july
  7. July is the best season for Tornado , it’s all about how to organize a tornado
  8. project. It is inspired by Django and Flask.
  9. This is a project by `Hsiaoming Yang <http://lepture.com>`_.
  10. All projects are listed at `project page <http://project.lepture.com>`_.
  11. - `Documentation <http://july.readthedocs.org/>`_
  12. - `GitHub <https://github.com/lepture/july>`_
  13. - `PyPi <http://pypi.python.org/pypi/july>`_
  14. Feature
  15. --------
  16. - Organize tornado as App
  17. - Built-in SQLAlchemy
  18. - Flash message design
  19. - Built-in Mail App
  20. and more.
  21. Overview
  22. ---------
  23. A minimal July Application::
  24. from july.web import JulyHandler
  25. from july.app import JulyApplication
  26. class HelloHandler(JulyHandler):
  27. def get(self):
  28. self.write('Hello July')
  29. handlers = [('/', HelloHandler)]
  30. application = JulyApplication(handlers=handlers)
  31. if __name__ == '__main__':
  32. from july import run_server
  33. run_server(application)
  34. Get more information on `Documentation`_.
  35. Installation
  36. --------------
  37. This project is **UNDER DEVELOPMENT**, it is not robust.
  38. - Install with pip::
  39. $ pip install july
  40. - Install with easy_install::
  41. $ easy_install july
  42. Bug report
  43. -----------
  44. If you have any trouble, report bug at
  45. `GitHub Issue <https://github.com/lepture/july/issues>`_.
  46. :license: BSD
  47. :copyright: (c) 2012 - now, Hsiaoming Yang
  48. """
  49. import os
  50. #: always use utc time
  51. os.environ['TZ'] = 'UTC'
  52. #: always place python3 egg cache in /tmp
  53. os.environ["PYTHON_EGG_CACHE"] = "/tmp/egg"
  54. __version__ = '0.9.2'
  55. __author__ = 'Hsiaoming Yang'