spotware_connect¶
A python client wraper for Spotware Open API 2 https://connect.spotware.com/docs/open_api_2
- Free software: GNU General Public License v3
- Documentation: https://spotware_connect.readthedocs.io.
Quickstart¶
Install with pip:
$ pip install spotware-connect
A sample to request server version:
import spotware_connect as sc
c = sc.Client()
@c.event
def connect():
c.emit("VersionReq")
@c.message(msgtype="VersionRes")
def version(msg, payload, version, **kargs):
print("Server version: ", version)
c.stop()
c.start(timeout=5) # optional timeout in seconds
See the usage in docs for a complete example with App Authorization.
Features¶
- Simple client for connecting, sending and receiving Protobuf Messages
- Use decorators to specify wich messages to process
- No need to worry about sockets, bytes and message structure
- Use abbreviated names for sending and receiving payloads: VersionReq translates to ProtoOAVersionReq
- Requests limit 5/second more information about limits here
Credits¶
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
Using twisted for network layer