Skip to main content

deploying functions made easy

Project description


Firefly
-------

Firefly is a tool to expose Python functions as RESTful APIs.

Install
~~~~~~~

It can be installed using pip.

..code:: bash

$ pip install firefly-python

Usage
~~~~~

Write a python function:

..code:: python

# sq.py
def square(n):
return n*n

And run it with firefly:

..code:: bash

$ firefly sq.square
[2017-06-08 12:45:11 +0530] [20237] [INFO] Starting gunicorn 19.7.1
[2017-06-08 12:45:11 +0530] [20237] [INFO] Listening at: http://127.0.0.1:8000 (20237)
...

Firefly provides a simple client interface to interact with the server.

..code:: python

>>> from firefly.client import Client
>>> client = Client("http://127.0.0.1:8000")
>>> client.square(n=4)
16

Or, you can use the API directly:

..code:: bash

$ curl -d '{"n": 4}' http://127.0.0.1:8000/square
16

Links
~~~~~

* `Documentation <https://firefly-python.readthedocs.io/>`_
* `Github <https://github.com/rorodata/firefly>`_

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

firefly-python-0.1.14.tar.gz (9.2 kB view details)

Uploaded Source

Built Distributions

firefly_python-0.1.14-py3.5.egg (30.7 kB view details)

Uploaded Source

firefly_python-0.1.14-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file firefly-python-0.1.14.tar.gz.

File metadata

File hashes

Hashes for firefly-python-0.1.14.tar.gz
Algorithm Hash digest
SHA256 8df0c17cfbbb659e85f2754d9993de75fdfe7ac8db95d7faa013546baaecea9d
MD5 2f1f96303b4b5beaf1335ccdeced97e2
BLAKE2b-256 59fa3e57ae079bcaeaa3bdd25a1830f49223fa49aa2715005c36f55aac12d5b8

See more details on using hashes here.

File details

Details for the file firefly_python-0.1.14-py3.5.egg.

File metadata

File hashes

Hashes for firefly_python-0.1.14-py3.5.egg
Algorithm Hash digest
SHA256 62dfd6bdf80f5db2d0a1ab1af509805faab922f43ce9dc4d12176131354778e1
MD5 9434209731c564ea3262a23712aaee9d
BLAKE2b-256 524bfc03dc1d5d79547309a59dabff9abc8e325b073be4aa31e6c03ad64e0a90

See more details on using hashes here.

File details

Details for the file firefly_python-0.1.14-py3-none-any.whl.

File metadata

File hashes

Hashes for firefly_python-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 7b7945b497cf563102e98267f3cdf3f9390ea56c1d8b95cc352e643886ce176b
MD5 1af368d21e32bee97e3a2b8958e3ca41
BLAKE2b-256 c382091702482edc724746e8aa0d3f5e8e1f1a3ac7204932dc8e05556d0731f5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page