Skip to content

Instantly share code, notes, and snippets.

@mathisonian mathisonian/index.py
Created Apr 13, 2016

Embed
What would you like to do?
lightning remote
from lightning import Lightning, Line
lgn_host = 'http://localhost:3000/'
#### This instantiates everything
lgn = Lightning(host=lgn_host)
lgn.create_session()
session_id = lgn.session.id
print session_id
line_viz = lgn.line([1, 2, 3, 2, 1])
line_viz.open()
### This hooks into everything
remote_lgn = Lightning(host=lgn_host)
remote_lgn.use_session(session_id)
remote_line = Line(session=lgn2.session, json={'id': line_viz.id}, auth=lgn2.session.auth)
## then you can do
remote_line.append()
remote_line.update()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.