resources | category | weight |
---|---|---|
examples/tutorials/flow-deploy/create-service-with-flow |
deployment |
10 |
This example shows how to create a simple service with flow.
You can create your own service by utilize flow-as-function
.
This folder contains a example on how to build a service with a flow. Reference here for a minimal service example. The output of score.py will be a json serialized dictionary. You can use json parser to parse the output.
nohup python simple_score.py &
# Note: added this to run in our CI pipeline, not needed for user.
sleep 10
Executing the following command to send a request to execute a flow.
curl -X POST http://127.0.0.1:5000/score --header "Content-Type: application/json" --data '{"flow_input": "some_flow_input", "node_input": "some_node_input"}'
Sample output of the request:
{
"output": {
"value": "some_flow_input"
}
}
Reference here for more.