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
Release history Release notifications | RSS feed
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.13.tar.gz
(9.1 kB
view details)
Built Distribution
firefly_python-0.1.13-py3.5.egg
(30.5 kB
view details)
File details
Details for the file firefly-python-0.1.13.tar.gz
.
File metadata
- Download URL: firefly-python-0.1.13.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca82040d6369981b57cbcf7a9da3a143e2d07d1df881a6423c64e52ea681cbbb |
|
MD5 | 3cc9d8bd19ef3e63910ace50f615c9b6 |
|
BLAKE2b-256 | 9299b13cbef69cbcb81e74494a44657b47cda38332111a2a7249bec689f59248 |
File details
Details for the file firefly_python-0.1.13-py3.5.egg
.
File metadata
- Download URL: firefly_python-0.1.13-py3.5.egg
- Upload date:
- Size: 30.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95d6d510a527584b16219dc680b5cf1828a7739784b995d0acb7cad0ab7f63ad |
|
MD5 | 24c538cade7e5a8ffb3f996219efd73b |
|
BLAKE2b-256 | 6f76dbff18a6a028d0e6ed6f4e655e5a686439a31cff5ab6cf84c8cea4b0b86c |