Installation & Setup

Buckle up!

Setting Up Your Local Server

Begin your journey with Shimoku by setting up a local server. This process allows you to explore Shimoku's capabilities without needing to log in or create an account.

Install the Library

In order to use Shimoku’s API, first install our SDK library

Get it from our Github page and install it in your Python +3.9

pip install shimoku

Initialize the Server for the Playground

Next, open the terminal in your environment and type the following command:

> shimoku playground init

Once the terminal shows the server logs, proceed to the next step

In case the default port (8000) is already in use, it is necessary to change it in the command prompt. For instance, the port 8080 could be used:

> shimoku playground init --local-port 8080

It is not recommended to have more than one local server running, as the front-end application can only access one at a time (even in different tabs).

Initialize the Shimoku SDK

Following up, create a python script and start by importing the client from the shimoku library and initializing it. This step sets up a local server environment for your development and automatically opens your default browser.

from shimoku import Client

s = Client()

We recommend the following parameters for a better development experience:

s = Client(
    async_execution=True,  # Grouped plotting
    verbosity='INFO',      # Insight in the execution
)

If you have used a port for the server that is not 8000 you will have to set it in the initialization of the client:

s = Client(
    local_port=8080,
    async_execution=True,
    verbosity='INFO'
)

Key Features and Advantages

The Shimoku Playground is an integral feature of the Shimoku platform, designed to facilitate local development.

  • Local Server Utilization: Instead of connecting to the cloud-based Shimoku API, the Playground operates via a local server. This setup is initialized through the SDK, offering a more immediate and responsive development environment.

  • Consistent API Compatibility: Code developed within the Playground is fully compatible with the Shimoku API. This ensures a smooth transition from local to cloud-based environments, allowing developers to switch between local and cloud deployments without needing to modify their code.

  • No Token Consumption: The Playground runs on the developer's local machine, bypassing the need for token usage associated with cloud-based operations on the Shimoku platform. This is particularly beneficial for extensive testing and development, as it reduces the overhead costs typically incurred during the development process.

Last updated