Example 3: Writing & Publishing a Command Line Python Service

This example shows you how to write and publish a Python service with the command line

Please see:

Publish service to the Registry

snet identity publisher
snet service metadata_init . ProcessService $PUBLISHER_ADDR --encoding json --service_type process
snet service metadata_set_fixed_price 3
snet service metadata_add_endpoints
cat service_metadata.json
snet service publish ExampleOrganization ProcessService --yes

Start daemon

cat snetd.config.json
screen -d -m snetd-linux-amd64

Call service

snet identity caller
snet client open_init_channel_registry ExampleOrganization ProcessService 50 57600 -y
snet client call 1 3 localhost:8080 echo '{"message": "hello"}'

Stop service


Next Example