.. This file is part of Message For You Sir (m4us).
.. Copyright (C) 2010 Krys Lawrence
..
.. Message For You Sir is free software: you can redistribute it and/or modify
.. it under the terms of the GNU Affero General Public License as published by
.. the Free Software Foundation, either version 3 of the License, or (at your
.. option) any later version.
..
.. Message For You Sir is distributed in the hope that it will be useful, but
.. WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
.. or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public
.. License for more details.
..
.. You should have received a copy of the GNU Affero General Public License
.. along with Message For You Sir.  If not, see <http://www.gnu.org/licenses/>.

###########################
Message For You Sir! (m4us)
###########################

.. contents::

.. about

About
=====

*Message For You Sir!* (m4us) is a coroutine-based concurrent programming
library and framework for Python_.  It is heavily inspired by the `BBC
Research`_'s brilliant Kamaelia_ project.  In fact, it largely intends to be a
reimplementation of most of Kamaelia_'s core concepts, but be based on Python_
coroutines instead of generators.  It also aims to be cleaner and simpler.

.. features

Features
========

* Provides coroutine-based inbox/outbox message-passing programming style.
* Provides simple event loop and message routing mechanisms.
* Provides single-thread and thread-based concurrency.
* Promotes loose-coupling and component-based program design.
* Excellent for pipeline-style data transformation systems.
* Supports publish/subscribe style message distribution.
* Works with both plain Python_ 2.6+ coroutines (``value = (yield)``) and
  class-based components.
* Much more pythonic than Kamaelia_ and with less magic.
* Clearly defined interfaces for all objects.
* Complete API documentation and very clean source code.
* Extensible with custom schedulers, post offices, message filters, etc.
* Extensible with zope.interface_ adapters and custom interface
  implementations.
* Easy to extend to support distributed computing.
* 100% line test coverage and almost 100% branch test coverage.
* Currently implements equivalents to Kamaelia_'s *Component*,
  *ThreadedComponent*, *Scheduler*, *Pipeline*, *Graphline*, and *Backplane*.
* Provides several convenience functions and decorators to make creating
  common coroutine types easy.

.. status

Status
======

This project is very young and the code should be considered *Alpha* quality.
It has been minimally tested on Linux and Windows, under Python_ 2.6, but has
not yet been seriously tested on any platform.  That said, it does have an
extensive test suite with almost 100% branch test coverage.

You are welcome to use this project if you like it, and contributions are
certainly welcome, but if you are looking for a better supported project with a
strong community, then Kamaelia_ is a the more responsible choice.

.. installation

Installation
============

The easiest way to install this distribution is::

  pip install m4us

or::

  easy_install m4us

.. WARNING:: If you use setuptools_, distribute_ will be installed
   automatically, replacing your setuptools.  If this is unacceptable, using
   virtualenv_ to isolate the installation is recommended.

.. basic_usage

Basic Usage
===========

Documentation is still lacking.  For now see `A Simple Example`_
|(in docs/example.py)| for a simple example.

See also the integration tests for additional examples.

.. documentation_and_support

Documentation and Support
=========================

**Home page:**
  http://pypi.python.org/pypi/m4us
**Downloads:**
  http://pypi.python.org/pypi/m4us#downloads
**Documentation:**
  http://packages.python.org/m4us
**Bug/issue tracker:**
  http://bitbucket.org/krys/m4us/issues
**Source code repository:**
  http://bitbucket.org/krys/m4us

.. contributing

Contributing
============

There is always room for improvement in this project and contributions are
certainly welcome.  The easiest way to contribute is simply to file a bug
report in the `issue tracker`_ whenever you find a problem or want to suggest
an improvement.

If you would like to participate in a more substantial way, check out the
`issue tracker`_ and the `To Do Items Index`_ |(in docs/source/todo.rst)| to
find out about the work still needs to be done.

.. NOTE:: If you submit a bug report, patch or other code, you automatically
   agree to licence the contribution.  See the `Licensing Information`_ |(in
   LICENCE)| for details on contribution licensing.

.. licence

Licence
=======

*Message For You Sir!* is licensed under the `GNU Affero General Public License
version 3`_ or later (AGPLv3+).  This is free software: you are free to change
and redistribute it under certain conditions.  There is NO WARRANTY, to the
extent permitted by law.  For full licensing information, see the `Licensing
Information`_ |(in LICENCE)|.

.. credits

Credits
=======

*m4us* was created by Krys Lawrence <m4us at krys ca>.

This project is greatly inspired by Kamaelia_.  Special thanks goes to the
authors of that project.

.. end

.. If you are reading this file in text form, you can ignore everything below.
.. ----------------------------------------------------------------------------

.. These are hacks get around the fact that PyPI does not properly render links
.. in substitutions.
.. |(in docs/example.py)| replace:: \ \
.. |(in docs/source/todo.rst)| replace:: \ \
.. |(in LICENCE)| replace:: \ \

.. _A Simple Example: http://packages.python.org/m4us/example.html
.. _To Do Items Index: http://packages.python.org/m4us/todo.html
.. _Licensing Information: http://packages.python.org/m4us/licence.html

.. links

.. _Python: http://python.org
.. _`BBC Research`: http://www.bbc.co.uk/rd/index.shtml
.. _Kamaelia: http://www.kamaelia.org/
.. _zope.interface: http://pypi.python.org/pypi/zope.interface
.. _virtualenv: http://pypi.python.org/pypi/virtualenv
.. _distribute: http://pypi.python.org/pypi/distribute
.. _setuptools: http://pypi.python.org/pypi/setuptools
.. _issue tracker: http://bitbucket.org/krys/m4us/issues
.. _GNU Affero General Public License version 3:
   http://www.gnu.org/licenses/agpl.html
