[Product Launch] We're adding Python support to Retool Workflows!

Hey folks––you’ve asked about when we’re bringing support for additional languages into Retool. Today, we’re excited to officially introduce Python to the Retool platform––starting with automation in Retool Workflows.

Retool Python

Select either JavaScript or Python as your language when running code blocks in Workflows. Just drag a block out onto the canvas, select “Code”, and then select the Python tab to start writing. Auto-completion, context, and linting are all included out of the box. We’ve also preinstalled 20 libraries and packages—like numpy, pandas, scipy, and plotting libraries like seaborn—so that you don't lose access to the powerful packages you’re used to writing with in your IDE or notebook.

Here’s something we’re really excited about: you can use Python via Workflows to run complex data processing, analysis, or visualization server-side and feed the inputs back into your Retool apps with the new webhook Response block.

And this is just the beginning! We’d love to know what you’re building and how the code editing experience feels, so please don’t hesitate to share your feedback.

Check out our launch Twitter thread and blog post to see more examples in action (and please help share the announcement!):


quick q. is it possible to call a function in python as well? i cannot get this working.


Hey Lukas! Calling functions from Python blocks isn't supported today, but that (and the interoperability of Python in other block types) is in the works.

1 Like

Hello, the blog post mentions the feature will be available to on-prem deployment in 2.113 version, the version is out but I can't figure out how to enable it. Was it included in the first released version (2.113.3)? Or will it be added in a different version?

Hi @mskrip Thanks for checking in!

It's not quite ready for on-prem :confused: Apologies! We're working on updating the blog post. I'm also letting our team know that you're interested in using this feature on-prem. I'll reach back out with any updates!

Hi all, quick update here! Currently, Python for self-hosted accounts is available in Beta for users that urgently need Python support and are willing to participate in beta testing. Let me know if you want to participate. Otherwise, we should have Python generally available on prem soon

@Tess Question. Why would I only be seeing my values returning in the logs tab and not the data tab?

Im running an api call and seeing the values spit back properly in log but nothing shows in data

import requests

def send_request():
    response = requests.get(
            'api_key': 'KEY HERE',
            'url': 'https://www.example.com', 
            'extract_rules': '{"title":"h1","price":".listing__infoRow .listing__price .listing__amount span"}', 

    if response.status_code == 200:
        data = response.json()
        title = data.get('title')
        price = data.get('price')
        return {'title': title, 'price': price}
        print('Failed to retrieve data. HTTP Status Code:', response.status_code)
        return None

result = send_request()

Example code where I remove API key and url just to illustrate

Hi @seandawes I believe if you add return result, it'll work in the case of status codes being 200

For non 200 codes, I think it'll just return 'null' for None

:pray: Thank you. Dunno how I overlooked that. Sometimes its the simple things.

Is python available for workflows for on-premise deployments yet? I just tried updating today and it seems like JS is still the only option for code blocks. If it's still not generally available, how could I gain access to the beta you mentioned? Thanks!

1 Like

+1 on this - any news on when Python for Self Hosted will be mainstream? @Tess

I just got an update :slightly_smiling_face: We've moved Python for Self Hosted out of beta (docs to come). If you spin up on the latest versions of 3.14, 3.16, 3.18, and 3.20 with code executor, you will now have Python support automatically

1 Like