Misty II python3 wrapper
Project description
Misty2py
Misty2py is a python wrapper around Misty API.
Features
Misty2py can be used to:
- perform actions as an equivalent to sending a POST request to Misty's API;
- obtain information as an equivalent to sending a GET request to Misty's API.
This can be done comfortably from Python by employing following concepts:
- action keywords - Python-styled keywords for endpoints of Misty's API that correspond to performing actions;
- information keywords - Python-styled keywords for endpoints of Misty's API that correspond to retrieving information;
- data shortcuts - Python-styled keywords for commonly used data that is supplied to Misty's API as the body of a POST request.
Usage
- start by making a new instance of
Misty
:
from misty2py.robot import Misty
misty_robot = Misty("0.0.0.0")
- substitute
"0.0.0.0"
by the IP address of your Misty. - use method
perform_action
to tell Misty to perform an action- currently you can only use
misty_robot.perform_action('led', dct=colours, method="dict")
to change the LED light on Misty's chest to a supplied json value ormisty_robot.perform_action('led', string="led_off", method="string")
to turn the LED light on Misty's chest off - the action
led
corresponds to the/api/led
endpoint
- currently you can only use
- use method
get_info
to tell Misty to return information- currently only
misty_robot.get_info(blink_settings)
to obtain blink settings is supported (corresponds to theapi/blink/settings
endpoint)
- currently only
More action and information keywords and data shortcuts will be added soon
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
misty2py-0.0.1.tar.gz
(6.1 kB
view hashes)
Built Distribution
misty2py-0.0.1-py3-none-any.whl
(13.1 kB
view hashes)