Organising big apps, and Python 3 in the browser

Hi everyone,

I am pleased to announce an early Christmas present from us – we’ve made it much easier to organsie large Anvil apps!

With a new tree-based structure, your forms and modules can now be arranged into hierarchical packages:

You can find out all the detail in the docs:

Anvil Docs | Structuring Your App

And for the apps you already have, we’ve got a guide to help you migrate!

How-To Guides | Converting an app to use packages

(This is a versioned upgrade. So if you’ve published a version of your app, upgrading the dev version won’t change anything about your published app!)


But wait, there’s more…

I am also pleased to say that our Python-to-Javascript compiler now supports Python 3 syntax for client-side code – which means, yes, that F-strings are on the menu in your Form code!

What are F-strings? They’re a cool feature of Python 3 that lets you build strings in code. Instead of writing:

self.label_1.text = "Hello, " + your_name + "!"

you can write:

self.label_1.text = f"Hello, {your_name}!"

Much more pleasant, right? :slight_smile:

We’ve supported Python 3 on the server for a long time, of course. But now you can use it throughout your app – and we’ve made it the default for all new apps.

If you have an existing app you want to upgrade, we’ve got you covered:

How-To Guides | Switching apps to client-side Python 3

(And yes, the switch is reversible – you can switch back and forth between Python 3 and 2, on the client as well as the server. And it’s per-version - so if you publish a version of your app, upgrading the dev version won’t break anything.)


A big thanks to everyone on the team who made this happen, and to the stalwart beta testers who helped us refine the design!

Have a merry (and Pythonic) Christmas :slight_smile:

13 Likes

The Feature Requests forum is thataway :arrow_right: :wink:

(And lest you think I’m not serious…this is an example of a big change, that was based heavily on feature requests posted in that forum! Go post, and “like” others’ posts!)

Thank you Anvil Team for this Christmas Gift! :christmas_tree::gift:

1 Like