Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.
/ spotware_connect Public archive

A python client for the publicly available protobuf-based API developed by Spotware

License

Notifications You must be signed in to change notification settings

mvs-86/spotware_connect

Repository files navigation

spotware_connect

Documentation Status

License

A python client wraper for Spotware Open API 2 https://connect.spotware.com/docs/open_api_2

Deprecated

Repo is archived, use the official Spotware OpenApi Python client https://github.com/spotware/OpenApiPy

Quickstart

Install with pip:

$ pip install spotware-connect

A sample to request server version:

import spotware_connect as sc

c = sc.Client(live=False) # Demo connection

@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

About

A python client for the publicly available protobuf-based API developed by Spotware

Resources

License

Stars

Watchers

Forks

Packages

No packages published