Go to file
Dustin 44a28fda68 app: Add BaseApplication class
The `Application` class is now a sub-class of `BaseApplication`.
Applications that require more control of the framework's behavior can
extend `BaseApplication` instead of `Application`. The `BaseApplication`
class also provides some new features:

* `BaseApplication.setup_routes` is always called when an instance is
  created, and can be used to configure the request dispatcher
* `BaseApplication.update_config` updates the application configuration
  from a configuration file

The major difference between `BaseApplication` and `Application` is that
the latter requires a request dispatcher, while the former does not.
This pattern allows simple applications to construct a `Router` or root
object and then initialize the `Application` without needing to define a
sub-class.
2016-07-14 12:37:47 -05:00
.settings Started documentation 2011-03-13 16:48:16 -05:00
doc Begin 1.0 development 2016-07-14 12:37:47 -05:00
src/milla app: Add BaseApplication class 2016-07-14 12:37:47 -05:00
test app: Refactor Application class 2015-04-25 12:42:42 -05:00
.gitignore Add .gitignore 2016-07-14 12:37:47 -05:00
.hgignore meta: ignore coverage cache 2015-02-19 20:39:57 -06:00
.hgtags Added tag 0.2.1 for changeset 3b8acd86b010 2015-02-21 10:29:48 -06:00
.project Started the Milla project, a simple WSGI web framework 2011-03-13 16:46:42 -05:00
.pydevproject Bump PyDev interpreter and grammer for Python 3 2012-11-27 17:26:34 -06:00
COPYING Added licensing information and boilerplate messages 2011-04-05 23:47:44 -05:00
MANIFEST.in Added an icon and support for automatically serving favicon.ico 2011-03-27 15:24:41 -05:00
README.rst Rename README for GitLab compatibility? 2016-07-06 20:58:27 -05:00
distribute_setup.py Added setup.py 2011-03-13 16:48:35 -05:00
milla.svg Added an icon and support for automatically serving favicon.ico 2011-03-27 15:24:41 -05:00
setup.cfg Version bump 2013-01-22 13:02:17 -06:00
setup.py Begin 1.0 development 2016-07-14 12:37:47 -05:00

README.rst

.. vim: set ft=rst :

=====
Milla
=====

*Milla* is a simple and lightweight web framework for Python. It built on top
of `WebOb`_ and thus implements the `WSGI`_ standard. It aims to be easy to use
while imposing no restrictions, allowing web developers to write code the way
they want, using the tools, platform, and extensions they choose.

To get started using *Milla* right away, visit `Downloads`_ to get the latest
version, then read the `Documentation`_.

Example
=======

.. code:: python

    from wsgiref import simple_server
    from milla.dispatch import routing
    import milla


    def hello(request):
        return 'Hello, world!'

    router = routing.Router()
    router.add_route('/', hello)
    app = milla.Application(router)

    httpd = simple_server.make_server('', 8080, app)
    httpd.serve_forever()


.. _WebOb: http://webob.org/
.. _WSGI: http://wsgi.readthedocs.org/
.. _Downloads: https://bitbucket.org/AdmiralNemo/milla/downloads
.. _Documentation: http://milla.readthedocs.org/