Code Monkey home page Code Monkey logo

tpqps's Introduction

The Python Quants

tpqps

Streaming Plots with Plotly

tpqps is a wrapper class for the streaming API of http://plot.ly.

The package is authored and maintained by The Python Quants GmbH. © Dr. Yves J. Hilpisch. MIT License.

Disclaimer

The tpqps package is intended as a technological illustration only. It comes with no warranties or representations, to the extent permitted by applicable law.

Installation

Installing from source via Git and Github:

git clone https://github.com/yhilpisch/tpqps
cd tpqps
python setup.py install

Using pip in combination with Github:

pip install git+git://github.com/yhilpisch/tpqps

Connection

In order to connect to the API, you need to have an account with Plotly (https://plot.ly). Once logged in to you account, you can create an API key and ans streaming API tokens. These are expected to be stored in a configuration file, with a filename of plotly.cfg, for instance, as follows:

[plotly]
user_name = user_name_...
api_key = api_key_...
api_tokens = token1,token2,token3,token4,...

You can then create a streaming plot object as follows.

import tpqps
ps = tpqps.tpqps('plotly.cfg', 'Plot Title')
[_ for _ in ps.__dir__() if not _.startswith('__')]
['user_name',
 'api_key',
 'api_tokens',
 'sources',
 'source_id',
 'traces',
 'data',
 'maxpoints',
 'token_number',
 'context',
 'poller',
 'title',
 'cols',
 'rows',
 'subplots',
 'layout',
 'plot_url',
 'fig',
 'init_plot',
 'add_layout',
 'add_data_source',
 'add_trace',
 'set_max_points',
 'get_plot_url',
 'start_streaming',
 'add_socket',
 'set_subplot_title',
 'set_subplot_specs']

Documentation

More details will follow that describe the usage of tpqps.

The Python Quants

http://tpq.io | @dyjh | [email protected]

tpqps's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.