Skip to main content

A python client wraper for Spotware Open API 2.0

Project description

spotware_connect

https://img.shields.io/pypi/v/spotware_connect.svg https://img.shields.io/travis/marcus-santos/spotware_connect.svg https://coveralls.io/repos/github/marcus-santos/spotware_connect/badge.svg Documentation Status License

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

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

History

0.1.0 (2020-02-25)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spotware_connect-0.1.2.tar.gz (55.5 kB view hashes)

Uploaded Source

Built Distribution

spotware_connect-0.1.2-py2.py3-none-any.whl (52.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page