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.

Files for spotware-connect, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size spotware_connect-0.1.2-py2.py3-none-any.whl (52.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size spotware_connect-0.1.2.tar.gz (55.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page