GithubHelp home page GithubHelp logo

py-lightstreamer's People

Contributors

dw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

py-lightstreamer's Issues

py-lightstreamer doesn't work with Python 3.x

py-lightstreamer doesn't work with Python 3.x and requires patching.
I am preparing a patch that should address this (as well as keeping Python 2.x compatibility).
I will file a pull request, but in the meantime I prefer tracking the issue here.

Full disclosure: I work for Weswit (Lightstreamer).

Add continuous integration with Travis CI

Hello,

you might add continuous integration (with Travis CI for example)
it will help to ensure that it is working fine both with Python 2 and Python 3.

Kind regards

Not able to replicate Basic Stock-List demo in py-lightstreamer

I've tried out the Lightstreamer python demo script, but since it only supports paid editions of the Lightstreamer server, I'm having a go with py-lightstreamer instead.

After modifying your barebones example to work with your current script (replacing client.on_connection_state() with client.on_state.listen() and table.on_update() with table.on_update.listen()) and substituting the parameters from the Basic Stock-List demo, I end up with this:

import lightstreamer

def on_connection_state(state):
    print 'CONNECTION STATE:', state
    if state == lightstreamer.STATE_DISCONNECTED:
        connect()

def on_update(item_id, row):
    print 'UPDATE!', row

def connect():
    client.create_session(username='', adapter_set='DEMO')
    table = lightstreamer.Table(client, item_ids='item1|item2', schema='stock_name|last_price',
        mode=lightstreamer.MODE_MERGE, data_adapter="MONITOR")
    table.on_update.listen(on_update)

client = lightstreamer.LsClient('http://push.lightstreamer.com/')
client.on_state.listen(on_connection_state)

connect()
raw_input('Press CR to exit')
client.destroy()
client.join()

However, upon running this in Python 2.7, the connection state endlessly switches between connecting and disconnected. What am I doing wrong?

I suppose my real question should be: Will py-lightstreamer work with the Moderato edition of Lightstreamer, with its very limited selection of client APIs? I'm guessing the answer is probably going to be no.

Cheers,
Jon

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.