Runtime, the conference for engineers running AI in production. Oct. 1 in SF Register now

Opt in to V2 Sandboxes with an environment variable

Starting with version 1.5.4 of the Python SDK, you can switch to V2 Sandboxes without any code changes by setting MODAL_SANDBOX_V2=1 in your environment.

V2 Sandboxes will become the default in the next release (1.6.0), at which point the same variable can be used to opt out. Our goal is that most users never need to know the difference between V1 and V2, or do any work to migrate. See the Python SDK changelog for details.

Ship your first app in minutes.

Get Started

$30 / month free compute