Skip to main content

#Lore IO python SDK

####Interactive shell:

python -m loreiosdk wss://ui.getlore.io/storyteller

More information here : https://loreio.atlassian.net/wiki/spaces/LD/pages/711720969/Spyglass+Interactive+Shell

####Scripting:

from loreiosdk.spyglass_script import Spyglass   

# get your spyglass instance
spyglass_instance = Spyglass('wss://ui.getlore.io/storyteller', 'USERNAME',
'PASSWORD', dataset_id='DATASET_ID')

# cmd will trigger an sync command and will return an JSON object containing the result    
# passing a keyword argument = None is the equivalent of passing --argument without any value in the shell
# result will always be in the following format:
# {'seqno': 0, 'message': 'the message from the b-e', 'data': {"Some json/array": 0}}
# based the command used, message and/or data can be None  
result = spyglass_instance.cmd("Command Name", "argument1", "argument2", Keyword_arg1=True, arg2=None)

# streaming_cmd will return a generator.
# Today it is only compatible with the "chart"
# result will be formatted like
for result in spyglass_instance.streaming_cmd('chart', 'chart_id', streaming=None):
   print result  

# async_cmd will trigger a none blocking command, allowing you to do something else
# and if you need the result later, you can use get_result_for_cmd with the seqno
# to get the status ('IN_PROGRESS' or 'DONE') and if done, the result of your command.
seqno = spyglass_instance.async_cmd("Command Name", "Positional_argument", Keyword_arg=1)
print "Do Something else"
status, result = spyglass_instance.get_result_for_cmd(seqno)

##Contributors resources

Build using:

update version in setup.py and __init__.py

python setup.py sdist bdist_wheel  

Publish using:

twine upload dist/loreio-sdk-VERSION.tar.gz

Release files for loreio-sdk 0.5.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for loreio-sdk 0.5.9
File Size Uploaded
loreio-sdk-0.5.9.tar.gz 15.3 kB Details

Release files / loreio-sdk-0.5.9.tar.gz

Download URL loreio-sdk-0.5.9.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
fb5e2a5ecf726e87e6964a981e08316093d38bdbaf8fd94068da611d3b7e7bc4
BLAKE2b-256 checksum
How to use checksums
cfb959a0e325e9c1b0a33be178417fdd25da759f74dc4067f274cef5588f7b62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.5.9 This release

1 release file

0.5.8

1 release file

0.5.7

1 release file

0.5.6

1 release file

0.5.5

1 release file

0.5.4

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.2

1 release file

0.3.0

1 release file

0.2.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page