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

Uploaded Source

Built Distribution

firefly_python-0.1.15-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: firefly-python-0.1.15.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for firefly-python-0.1.15.tar.gz
Algorithm Hash digest
SHA256 00b6ede263d4f49ebbf8a6f362d834b75f3d728b827405be51a462f411cf5db0
MD5 c733535a268dc3e48291940fda7b2425
BLAKE2b-256 be63c75a7843f2155c183ef162d5496cbf6a53dfb4675fc45da6f4c3e80cb87d

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for firefly_python-0.1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 b4a2e4b261d9b53b1739a9fd36648b2fa6d6ae275ee9fa595038b4fb08d633a9
MD5 9846d5ded4cdcafa11f02367d33e55e2
BLAKE2b-256 2834280c0206fa79098720403f60282632d80c69e9710d436ea0ebe35df383bf

See more details on using hashes here.

Provenance

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