v.0.3

On 2022.01.25

This version has been deprecated. If used with the current API version it can produce unexpected behaviour or errors.

The package shimoku-api-python is no longer maintained

To get the new version 🚀

pip install --upgrade shimoku-api-python

Fixes

  • Alert Indicators s.plt.alert_indicator() can have other Reports in the same row.

  • The variable menu_path now doesn’t modify capital and lower cases

New

  • s.plt.delete_path() Which can be used to remove any URL with all the reports within it directly. Example:

Let’s say that we have a menu path equals to test-path/line-test' and we want to remove line-test and everything on it, then we can:

s.plt.delete_path('test-path/line-test')

Or you may want to remove it all, then you can simply delete it in the following way:

s.plt.delete_path('test-path')

  • s.plt.append_data_to_trend_chart() Now it is possible to append data to already existing charts. For example

app_path: str = 'test'
menu_path: str = f'{app_path}/append-test'

data = [
    {'date': dt.date(2021, 1, 1), 'x': 5, 'y': 5},
    {'date': dt.date(2021, 1, 2), 'x': 6, 'y': 5},
    {'date': dt.date(2021, 1, 3), 'x': 4, 'y': 5},
    {'date': dt.date(2021, 1, 4), 'x': 7, 'y': 5},
    {'date': dt.date(2021, 1, 5), 'x': 3, 'y': 5},
]

s.plt.line(
    data=data,
    x='date', y=['x', 'y'],
    menu_path=menu_path,
    row=1, column=1,
)

data_ = [
    {'date': dt.date(2021, 1, 6), 'x': 5, 'y': 5},
    {'date': dt.date(2021, 1, 7), 'x': 6, 'y': 5},
]

s.plt.append_data_to_trend_chart(
    menu_path=menu_path,
    row=1, column=1,
    component_type='line',
    data=data_,
    x='date', y=['x', 'y'],
)

It will first create the chart and second append the new 2 days of data:

  • A new chart: Horizontal barchart is available: s.plt.horizontal_barchart() An example follows

data_ = [
    {'Name': 'a', 'y': 5, 'z': 3},
    {'Name': 'b', 'y': 7, 'z': 4},
    {'Name': 'c', 'y': 3, 'z': 5},
    {'Name': 'd', 'y': 5, 'z': 6},
]

s.plt.horizontal_barchart(
    data=data_,
    x=['y', 'z'], y='Name',
    menu_path=menu_path,
    row=1, column=1,
)

  • A new chart: Zero centered barchart is available: s.plt.zero_centered_barchart() An example follows:

data_ = [
    {'Name': 'a', 'y': 5},
    {'Name': 'b', 'y': -7},
    {'Name': 'c', 'y': 3},
    {'Name': 'd', 'y': -5},
]

s.plt.zero_centered_barchart(
    data=data_,
    x='Name', y=['y'],
    menu_path=menu_path,
    row=1, column=1,
)

Last updated