#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
Metadata
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)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| loreio-sdk-0.5.9.tar.gz | 15.3 kB | Without provenance | 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
|
Security for loreio-sdk 0.5.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.