Skip to main content

Environment views

From the left sidebar you can navigate to several environment views: Outline, Files, Data sources, Environment, and Variables (including Secrets and Environment variables).

Files#

Upload files for use in a given project. You can load in source data, figures, images, etc.

Compute Profiles#

Depending on the needs of your project, you can opt into more (or less!) memory and processing power by changing the size of your kernel.

Compute Profiles can be changed in the Environment section on the left side panel by adjusting the Size dropdown under Compute Profile. Profiles range from 2-32 GB of memory and 0.25 - 4 CPUs.

SizeRAM (GB)CPU
X Small20.25
Small40.5
Medium (default)81
Large162
X Large324

By default, projects are created with a Medium profile. Note that if you have configured scheduled runs of a project, those will run with the compute profile as set in the latest published version of your project.

Variables#

Secrets#

Keep your sensitive values, like API tokens or passwords, secret by adding them as Secrets. We store all Secrets in a highly-encrypted vault, which is only visible to other Project Editors or Owners. Secrets can be referenced in Python cells, but an attempt to display them in the Logic View or App Builder will return [SECRET VALUE] .

Add Secrets to your project environment easily and securely.

You can add a Secret to a project by clicking the +Add button in the Secrets tab of the left sidebar. If you want to use a Secret which is defined as a shareable, workspace Secret, choose Import workspace secret from the menu to be presented with Secrets which are available for import. If you want to create a Secret for use only in the given project select Create project secret.

To access your Secrets, call them directly in place of where you would hard-code your credentials. In the example below, we're setting up a Snowflake connection and passing the database details as Secrets.

Environment variables#

You can configure environment variables to be used in your projects. Environment variables aren't kept in the encrypted vault, nor are they redacted. Setting an environment variable in the left side panel is equivalent to using the python os library directly in your logic.

See more documentation for the os library here.

Built-in variables#

We also have some variables which are automatically included in your project. These variables can be referenced in any logic cell.

VariableValueDescription
hex_scheduledFalse/TrueIf a project has been set to run on a schedule, this variable is set True
hex_run_context"logic", "app", or "scheduled"Helpful if you want to restrict certain logic to only run while in App, Logic, or Scheduled run modes. As an example, use this if you have some debug logic that you don't want to run while a user is interacting with an app.
hex_user_emailemailIf a user is logged and viewing the app, this variable is set. Helpful if you want to customize what a given user sees in the app.

Variable explorer#

The Variable explorer allows you to browse the objects generated by your code. For each object, we show you its name, type, and value.