Skip to main content

Under the hood

Turning code into a Datagrok script

Briefly, you only need to do the following:

  • Create a new script file in the Datagrok script editor
  • Write the code in any supported language.
  • Add header: the set of annotation comments specifying the script language, tags, input and output variables.

That's all.

Runtime environment

For each language, Datagrok uses a predefined header and creates an environment with the set of pre-installed packages.

import os
import io
import json
import pandas as pd
import requests
from datetime import datetime, timedelta

Environment isolation

You can specify an environment for the script to use, including the language version and a set of libraries.

Datagrok uses Conda as the environment management system. A Conda environment:

  • isolates each script run,
  • resolves dependencies,
  • and takes time to be created before a script run.

Later, the script uses the pre-created environment with no delay for resolving dependencies.

In Datagrok, Conda environment configuration can be specified either right inside the script, or as part of a package.

See also: