summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorRay Holder <ray@blacklocus.com>2013-01-21 18:49:12 -0600
committerRay Holder <ray@blacklocus.com>2013-01-21 18:49:12 -0600
commitf913c44737febac73b8c752195543456fb2743d1 (patch)
treeb5de0fa80c7408b4a7d9038d603d9cdbfc0b0106 /README.rst
parentfd4d0e8470a95df48ed0d09f8c23a0054b5bd97d (diff)
downloadretrying-f913c44737febac73b8c752195543456fb2743d1.tar.gz
flushing out the README.rst a bit more
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst67
1 files changed, 60 insertions, 7 deletions
diff --git a/README.rst b/README.rst
index 6b5d1fa..d397322 100644
--- a/README.rst
+++ b/README.rst
@@ -1,16 +1,69 @@
-Retrying Module
-================================
+Retrying, to retry all the things
+=========================
-Retry any arbitrary function conditionally via a @retry decorator.
-Usage
------
-TODO
+.. image:: https://travis-ci.org/rholder/retrying.png?branch=master
+ :target: https://travis-ci.org/rholder/retrying
+
+Retrying is an Apache 2.0 licensed general-purpose retrying library, written in
+Python, to simplify the task of adding retry behavior to just about anything.
+
+
+The simplest use case is retrying a flaky function whenever an Exception occurs
+until a value is returned.
+
+.. code-block:: python
+
+ import random
+ from retrying import retry
+
+ @retry
+ def do_something_unreliable():
+ if random.randint(0, 10) > 1:
+ raise IOError("Broken sauce, everything is hosed!!!111one")
+ else:
+ return "Awesome sauce!"
+
+ print do_something_unreliable()
+
+TODO flush out more examples
+
+
+Features
+--------
+
+- Generic Decorator API
+- Specify stop condition (i.e. limit by number of attempts)
+- Specify wait condition (i.e. exponential backoff sleeping between attempts)
+- Customize retrying on Exceptions
+- Customize retrying on expected returned result
+
Installation
------------
-Installing the retrying module is simple::
+To install retrying, simply:
+
+.. code-block:: bash
$ pip install retrying
+Or, if you absolutely must:
+
+.. code-block:: bash
+
+ $ easy_install retrying
+
+But, you might regret that later.
+
+
+Contribute
+----------
+
+#. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
+#. Fork `the repository`_ on GitHub to start making your changes to the **master** branch (or branch off of it).
+#. Write a test which shows that the bug was fixed or that the feature works as expected.
+#. Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to AUTHORS_.
+
+.. _`the repository`: http://github.com/rholder/retrying
+.. _AUTHORS: https://github.com/rholder/retrying/blob/master/AUTHORS.rst