Python module to assist in creating blocks on Blockspring.
pip install blockspring
Save the following script to an example.py file:
import blockspring
def myFunction(request, response):
mySum = request.params["num1"] + request.params["num2"]
response.addOutput('sum', mySum)
response.end()
blockspring.define(myFunction)
Then in your command line write:
python example.py --num1=20 --num2=50
or
echo '{"num1":20, "num2": 50}' | python example.py
MIT
Email us: founders@blockspring.com
- Sang Han (jjangsangy)