Skip to main content

A client library for the sparkworks websocket api

Project description

A client library for accessing live data through the SparkWorks Websocket API.

Example Application providing the token directly

from sparkworksws import SparkWorksWebSocket


class MyMessageHandler(SparkWorksWebSocket.SparkWorksWebSocketClientProtocol):
    def messageReceived(self, message):
        print message


if __name__ == '__main__':
    ws = SparkWorksWebSocket(token='your-token', handler=MyMessageHandler)

    ws.start()

Example Application providing credentials

import sparkworks_client

from sparkworksws import SparkWorksWebSocket


class MyMessageHandler(SparkWorksWebSocket.SparkWorksWebSocketClientProtocol):
    def messageReceived(self, message):
        print message


if __name__ == '__main__':
    configuration = sparkworks_client.Configuration("username", "password", "client_id", "client_secret")
    ws = SparkWorksWebSocket(configuration=configuration, handler=MyMessageHandler)
    ws.start()

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

sparkworksws-0.0.14.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file sparkworksws-0.0.14.tar.gz.

File metadata

  • Download URL: sparkworksws-0.0.14.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for sparkworksws-0.0.14.tar.gz
Algorithm Hash digest
SHA256 bbabf04d36f3fb580b7843484040179103cd81a0f87c4b8e3038a2012967debb
MD5 f9aadae207dac5af573e445425f955ce
BLAKE2b-256 f1c761eb4922ca84f5d1ea7c0252adf236fd00ac99dd2b1c8c83a5cf4dc5afb2

See more details on using hashes here.

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