Enable Python code

Hello Forum,

I want to enable the ability to write code in python instead of javascript.
I deployed the code-executor micro-service, but the "python button" is not present yet.

What's my mistake?

My YAML section is:

codeExecutor:
  # enabled by default from Chart version 6.0.15 and Retool image 3.20.15 onwards
  # explicitly set other fields as needed

  enabled: false

  replicaCount: 1

  # Annotations for code executor pods
  annotations: {}

  # Labels for code executor pods
  labels: {}

  # Config for code executor. Node heap size limits can be overridden here
  config: {}
  # config: {
  #   nodeOptions: --max_old_space_size=1024
  # }
  volumes: {}
  volumeMounts: {}

  # Config affinity and anti-affinity rules for the code executor pods
  affinity: {}

  # Resources for the code executor. Most common issues will be seen with CPU usage as this will
  # most likely be CPU bound. Adjust the CPU if latency increases under load.
  resources:
    limits:
      cpu: 2000m
      memory: 2048Mi
    requests:
      cpu: 1000m
      memory: 1024Mi

  # code executor uses nsjail to sandbox code execution. nsjail requires privileged container access.
  # If your deployment does not support privileged access, you can set `privileged` to false to not
  # use nsjail. Without nsjail, all code is run without sandboxing within your deployment.
  securityContext:
    privileged: true

  image:
    repository: tryretool/code-executor-service
    # defaults to image.tag if >= 3.20.15, otherwise defaults to 1.1.0; explicitly set to override.
    tag: "3.114.3-stable"
    pullPolicy: IfNotPresent

What do I need to change?

Please, can someone help me?

Hello @Claudio!

Apologies for the delay. Where in your App are you looking to use Python code?

Currently, Retool only supports using Python in workflow blocks. Which does not require any additional set up or changes made to your YAML file.

Check out our docs here for using Python blocks in workflows!

If you are looking to switch over the App's code executor I do not believe we have any documentation for this or support this unfortunately.

Also we have AI tooling built in for writing JavaScript! It will appear as a purple robot in a square at the bottom right corner of any code inputs.

Also!

Looking at your YAML file, it has enabled: false at the top, try switching this to true.

After making that change, redeploy your micro-service and verify by checking if the Python button is now present on the Retool interface :saluting_face: