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.5.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

firefly_python-0.1.5-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for firefly-python-0.1.5.tar.gz
Algorithm Hash digest
SHA256 9295afddbccc06fa32da58da4843b2056bdd0b22e8c630162cee1c1e569e1048
MD5 019a9a6e90fa51baeb817bd32effa9fa
BLAKE2b-256 46142d003b123d5072d8058b0fba7d91401d0cac34fb615657c05956dcb144fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for firefly_python-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1f7d66dd693a8142ed6c9dab73bd64180da2dff38ae43b4445e8c99e98470410
MD5 d01700166382e990f53a58ebd2f26fdd
BLAKE2b-256 e30643111b646f650eef87f5240aca2650be6b43e7cd72af9e2ba602bdf4aef9

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