"Environment Variables" feature on Knowru platform

"Environment Variables" feature on Knowru platform can save your time and improve the security of your sensitive information by allowing you to manage your often adjustable configurations directly from our platform, and keep your sensitive information content away from other members.

Previously, in order to use external resources that require credentials, you had to write your sensitive information like your password in your scripts. Or, when you wanted to change some configurations inside your APIs, you would have to release a new version, which took a long time.

Going forward, you won’t have these issues with our new "Environment Variables" feature.


import os

def run(data):

# Before

password = "my-password" # security issue

# After

password = io.environ["DB_PASSWORD"]

In order not to write your sensitive information in your code, enter your passwords as JSON when creating a new runnable or runnable version. Then use the environment variables inside your code.

If you have thresholds or configurations that you have to adjust often, write the parts inside your code so that they seek values from environment variables. Then when creating a runnable or version, provide the values.

Later, when you want to change a value of an environment variable, go to a runnable version detail page and press the "Edit Environment Variables" button to make appropriate changes.

Please note the following details when using environment variables:

  • All the values in the environment variables should be strings (e.g. {“THRESHOLD”: 7} (X), {“THRESHOLD”: “7”} (0))
  • Only the owners of runnable versions can see environment variables (even owners of runnables nor those who have the retrieve or read source code access won't be able to see environment variables).