From e86dd665fa0b98584f27e52b215da1ec12b3c3dc Mon Sep 17 00:00:00 2001 From: Nabarun Pal Date: Fri, 8 Sep 2017 00:08:38 +0530 Subject: [PATCH 1/3] Convert markdown readme to rst --- Readme.md | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/Readme.md b/Readme.md index 1b2e34a..17cc09b 100644 --- a/Readme.md +++ b/Readme.md @@ -1,16 +1,21 @@ -# Firefly +Firefly +======= -[![Build Status](https://travis-ci.org/rorodata/firefly.svg?branch=master)](https://travis-ci.org/rorodata/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? +How to install? +--------------- Install firefly from source using: pip install firefly-python -# How to use? +How to use? +----------- Create a simple python function. @@ -42,12 +47,14 @@ The service can also be invoked by sending a POST request. $ curl -d '{"n": 10}' http://127.0.0.1:8000/fib 89 -# Documentation +Documentation +------------- -# Features Planned +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 +- Auto reload +- supporting other input and output content-types in addition to json. (for example, a function to resize an image) +- serverless deployment From d66697d217ddce550060a101ba96c5b063ef8512 Mon Sep 17 00:00:00 2001 From: Nabarun Pal Date: Tue, 31 Oct 2017 13:07:58 +0530 Subject: [PATCH 2/3] Renames the Readme file --- Readme.md => Readme.rst | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Readme.md => Readme.rst (100%) diff --git a/Readme.md b/Readme.rst similarity index 100% rename from Readme.md rename to Readme.rst From 88e7c665fedd4e81d8253d8fa2ad430aa0d8cc40 Mon Sep 17 00:00:00 2001 From: Nabarun Pal Date: Tue, 31 Oct 2017 13:11:59 +0530 Subject: [PATCH 3/3] Adds code blocks and removes angle brackets from links --- Readme.rst | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Readme.rst b/Readme.rst index 17cc09b..2226727 100644 --- a/Readme.rst +++ b/Readme.rst @@ -12,6 +12,8 @@ How to install? Install firefly from source using: +.. code-block:: bash + pip install firefly-python How to use? @@ -19,24 +21,30 @@ 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) + 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 . +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) @@ -44,13 +52,15 @@ Let us see how to use it with a client. 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 ----------------