Python Server Version when Locally Hosted

I’m hosting an anvil project locally on my machine. I was wondering, when I do that, is it possible to use a more recent version of python than 3.10? Any of 3.11, 12 or 13?

If so, how do you do that?

So I was doing some poking around. I ran the anvil-app-server with python3.12 and even though it says python3.12 when I use the help function, when I use python3.12 features, they fail (like the Self type hint).

The main reason I’m asking this question at all, is it would be great to use the most recent versions of python for the performance boosts that are starting to compound.

The answer is that the latest version of the App Server currently has full support for Python 3.12 and experimental support for Python 3.13, on the server.

However, client code runs in Skulpt, our Python-to-JS compiler, which isn’t affected by which version of Python you’re running on the server. You can use whatever features you like on the server, but if you’re in forms or modules you’ll have to stick to Skulpt’s feature-set.

1 Like

So when you use the --shell option when running the server, is that running the client or server shell?

The --shell option launches a Python REPL connected via the Uplink, using your locally installed Python interpreter. Only code running inside the browser uses Skulpt.

1 Like