Browse Source

Mention Pyramid in readme

Ask Solem 13 years ago
parent
commit
5e26137f62
3 changed files with 61 additions and 37 deletions
  1. 23 11
      README.rst
  2. 15 15
      celery/app/__init__.py
  3. 23 11
      docs/includes/introduction.txt

+ 23 - 11
README.rst

@@ -13,8 +13,14 @@
 
 --
 
+.. contents::
+    :local:
+
 .. _celery-synopsis:
 
+Synopsis
+========
+
 Celery is an open source asynchronous task queue/job queue based on
 distributed message passing.  It is focused on real-time operation,
 but supports scheduling as well.
@@ -31,15 +37,23 @@ language.  It can also `operate with other languages using webhooks`_.
 There's also `RCelery` for the Ruby programming language, and a `PHP client`.
 
 The recommended message broker is `RabbitMQ`_, but support for
-`Redis`_, `MongoDB`_, Beanstalk`_, `Amazon SQS`_, `CouchDB`_ and
+`Redis`_, `MongoDB`_, `Beanstalk`_, `Amazon SQS`_, `CouchDB`_ and
 databases (using `SQLAlchemy`_ or the `Django ORM`_) is also available.
 
-
-Celery is easy to integrate with `Django`_, `Pylons`_ `Flask`_, and `web2py`_, using
-the `django-celery`_, `celery-pylons`_ and `Flask-Celery`_ add-on packages.
-But Celery is only Python, and the integration packages is used mostly for
-convenience, Celery has also been successfully used with other frameworks and
-libraries, like `Pyramid`_ and `Bottle`_.
+Celery is easy to integrate with web frameworks, some of which even have
+integration packages:
+
+    +-----------------+------------------------+
+    | `Django`_       | `django-celery`_       |
+    +-----------------+------------------------+
+    | `Pyramid`_      | `pyramid_celery`_      |
+    +-----------------+------------------------+
+    | `Pylons`_       | `celery-pylons`_       |
+    +-----------------+------------------------+
+    | `Flask`_        | `flask-celery`_        |
+    +-----------------+------------------------+
+    | `web2py`_       | `web2py-celery`_       |
+    +-----------------+------------------------+
 
 .. _`RCelery`: http://leapfrogdevelopment.github.com/rcelery/
 .. _`PHP client`: https://github.com/gjedeer/celery-php
@@ -59,18 +73,16 @@ libraries, like `Pyramid`_ and `Bottle`_.
 .. _`web2py`: http://web2py.com/
 .. _`Bottle`: http://bottlepy.org/
 .. _`Pyramid`: http://docs.pylonsproject.org/en/latest/docs/pyramid.html
+.. _`pyramid_celery`: http://pypi.python.org/pypi/pyramid_celery/
 .. _`django-celery`: http://pypi.python.org/pypi/django-celery
 .. _`celery-pylons`: http://pypi.python.org/pypi/celery-pylons
-.. _`Flask-Celery`: http://github.com/ask/flask-celery/
+.. _`flask-celery`: http://github.com/ask/flask-celery/
 .. _`web2py-celery`: http://code.google.com/p/web2py-celery/
 .. _`operate with other languages using webhooks`:
     http://ask.github.com/celery/userguide/remote-tasks.html
 .. _`limited support`:
     http://kombu.readthedocs.org/en/latest/introduction.html#transport-comparison
 
-.. contents::
-    :local:
-
 .. _celery-overview:
 
 Overview

+ 15 - 15
celery/app/__init__.py

@@ -141,33 +141,33 @@ class App(base.BaseApp):
     def task(self, *args, **options):
         """Decorator to create a task class out of any callable.
 
-        .. admonition:: Examples
+        **Examples:**
 
-            .. code-block:: python
+        .. code-block:: python
 
-                @task()
-                def refresh_feed(url):
-                    return Feed.objects.get(url=url).refresh()
+            @task()
+            def refresh_feed(url):
+                return Feed.objects.get(url=url).refresh()
 
-            With setting extra options and using retry.
+        with setting extra options and using retry.
 
-            .. code-block:: python
+        .. code-block:: python
 
             from celery.task import current
 
             @task(exchange="feeds")
             def refresh_feed(url):
                 try:
-                    return Feed.objects.get(url=url).refresh()
-                except socket.error, exc:
-                    current.retry(exc=exc)
+                return Feed.objects.get(url=url).refresh()
+            except socket.error, exc:
+                current.retry(exc=exc)
 
-            Calling the resulting task:
+        Calling the resulting task::
 
-                >>> refresh_feed("http://example.com/rss") # Regular
-                <Feed: http://example.com/rss>
-                >>> refresh_feed.delay("http://example.com/rss") # Async
-                <AsyncResult: 8998d0f4-da0b-4669-ba03-d5ab5ac6ad5d>
+            >>> refresh_feed("http://example.com/rss") # Regular
+            <Feed: http://example.com/rss>
+            >>> refresh_feed.delay("http://example.com/rss") # Async
+            <AsyncResult: 8998d0f4-da0b-4669-ba03-d5ab5ac6ad5d>
 
         """
 

+ 23 - 11
docs/includes/introduction.txt

@@ -7,8 +7,14 @@
 
 --
 
+.. contents::
+    :local:
+
 .. _celery-synopsis:
 
+Synopsis
+========
+
 Celery is an open source asynchronous task queue/job queue based on
 distributed message passing.  It is focused on real-time operation,
 but supports scheduling as well.
@@ -25,15 +31,23 @@ language.  It can also `operate with other languages using webhooks`_.
 There's also `RCelery` for the Ruby programming language, and a `PHP client`.
 
 The recommended message broker is `RabbitMQ`_, but support for
-`Redis`_, `MongoDB`_, Beanstalk`_, `Amazon SQS`_, `CouchDB`_ and
+`Redis`_, `MongoDB`_, `Beanstalk`_, `Amazon SQS`_, `CouchDB`_ and
 databases (using `SQLAlchemy`_ or the `Django ORM`_) is also available.
 
-
-Celery is easy to integrate with `Django`_, `Pylons`_ `Flask`_, and `web2py`_, using
-the `django-celery`_, `celery-pylons`_ and `Flask-Celery`_ add-on packages.
-But Celery is only Python, and the integration packages is used mostly for
-convenience, Celery has also been successfully used with other frameworks and
-libraries, like `Pyramid`_ and `Bottle`_.
+Celery is easy to integrate with web frameworks, some of which even have
+integration packages:
+
+    +-----------------+------------------------+
+    | `Django`_       | `django-celery`_       |
+    +-----------------+------------------------+
+    | `Pyramid`_      | `pyramid_celery`_      |
+    +-----------------+------------------------+
+    | `Pylons`_       | `celery-pylons`_       |
+    +-----------------+------------------------+
+    | `Flask`_        | `flask-celery`_        |
+    +-----------------+------------------------+
+    | `web2py`_       | `web2py-celery`_       |
+    +-----------------+------------------------+
 
 .. _`RCelery`: http://leapfrogdevelopment.github.com/rcelery/
 .. _`PHP client`: https://github.com/gjedeer/celery-php
@@ -53,18 +67,16 @@ libraries, like `Pyramid`_ and `Bottle`_.
 .. _`web2py`: http://web2py.com/
 .. _`Bottle`: http://bottlepy.org/
 .. _`Pyramid`: http://docs.pylonsproject.org/en/latest/docs/pyramid.html
+.. _`pyramid_celery`: http://pypi.python.org/pypi/pyramid_celery/
 .. _`django-celery`: http://pypi.python.org/pypi/django-celery
 .. _`celery-pylons`: http://pypi.python.org/pypi/celery-pylons
-.. _`Flask-Celery`: http://github.com/ask/flask-celery/
+.. _`flask-celery`: http://github.com/ask/flask-celery/
 .. _`web2py-celery`: http://code.google.com/p/web2py-celery/
 .. _`operate with other languages using webhooks`:
     http://ask.github.com/celery/userguide/remote-tasks.html
 .. _`limited support`:
     http://kombu.readthedocs.org/en/latest/introduction.html#transport-comparison
 
-.. contents::
-    :local:
-
 .. _celery-overview:
 
 Overview