In this tutorial, i'm going to show you create a simple rest call that connects to Wia.
Installing Python and the Wia library
If you haven’t already, you need to install the python language to complete this tutorial.
Next is to install the python package manager
pip. Pip allows us to get the Wia python library which provides functionality to help connect to Wia with python.
For windows, open power-shell and run
pip install wia in the power-shell terminal.
For Mac/Linux open a terminal and run
pip install wia in the terminal.
Adding the code
In your favourite text editor, create a new file and call it
from wia import Wia
wia = Wia()
wia.access_token = 'your-device_secret_key'
result = wia.Event.publish(name='rest-call', data='test')
Running the code
Head to your Wia dashboard and in your
Device section and click on the
Debugger tab view the Event coming through.
That's it for this tutorial! Check out our other tutorials, new ones are being added all the time.