diff --git a/Readme.md b/Readme.md deleted file mode 100644 index 1b2e34a..0000000 --- a/Readme.md +++ /dev/null @@ -1,53 +0,0 @@ -# Firefly - -[![Build Status](https://travis-ci.org/rorodata/firefly.svg?branch=master)](https://travis-ci.org/rorodata/firefly) - -Function as a service. - -# How to install? - -Install firefly from source using: - - pip install firefly-python - -# How to use? - -Create a simple python function. - - # fib.py - - def fib(n): - if n == 0 or n == 1: - return 1 - else: - return fib(n-1) + fib(n-2) - -And run it using firefly. - - $ firefly fib.fib - http://127.0.0.1:8000/ - ... - -That started the fib function as a service listening at . - -Let us see how to use it with a client. - - >>> import firefly - >>> client = firefly.Client("http://127.0.0.1:8000/") - >>> client.square(n=4) - 16 - -The service can also be invoked by sending a POST request. - - $ curl -d '{"n": 10}' http://127.0.0.1:8000/fib - 89 - -# Documentation - - - -# Features Planned - -* Auto reload -* supporting other input and output content-types in addition to json. (for example, a function to resize an image) -* serverless deployment diff --git a/Readme.rst b/Readme.rst new file mode 100644 index 0000000..2226727 --- /dev/null +++ b/Readme.rst @@ -0,0 +1,70 @@ +Firefly +======= + +.. image:: https://travis-ci.org/rorodata/firefly.svg?branch=master + :alt: Build Status + :target: https://travis-ci.org/rorodata/firefly + +Function as a service. + +How to install? +--------------- + +Install firefly from source using: + +.. code-block:: bash + + pip install firefly-python + +How to use? +----------- + +Create a simple python function. + +.. code-block:: python + + # fib.py + + def fib(n): + if n == 0 or n == 1: + return 1 + else: + return fib(n-1) + fib(n-2) + +And run it using firefly. + +.. code-block:: bash + + $ firefly fib.fib + http://127.0.0.1:8000/ + ... + +That started the fib function as a service listening at http://127.0.0.1:8000/. + +Let us see how to use it with a client. + +.. code-block:: python + + >>> import firefly + >>> client = firefly.Client("http://127.0.0.1:8000/") + >>> client.square(n=4) + 16 + +The service can also be invoked by sending a POST request. + +.. code-block:: bash + + $ curl -d '{"n": 10}' http://127.0.0.1:8000/fib + 89 + +Documentation +------------- + +http://firefly-python.readthedocs.io/ + +Features Planned +---------------- + +- Auto reload +- supporting other input and output content-types in addition to json. (for example, a function to resize an image) +- serverless deployment