Visual Studio Code and PyCharm Autocomplete Provider Service

Some delightful and terrifying magic is going on in the online Anvil IDE to provide us with the quite lovely autocomplete feature that looks something like:

And if you’re really feeling like a spicy sandwich and want to execute anvil code in an remote environment, you can using uplink. Which is great.

However, what I’m looking for is basically give the exact same autocomplete functionality you get in the Anvil IDE, but in VSC and Pycharm, using an extension developed by Anvil.

This way developers aren’t stuck in limbo having to do half automated mocking of database objects which quickly become outdated, or can’t use the advanced testing or static type enforcment of these more powerful IDEs.

No I don’t want to do anything manual to make sure I’m in sync with what I would see in the Anvil online IDE, so please don’t suggest it.

Related posts:

2 Likes

I feel the same way. Autocomplete is important.

I have generated almost the entire anvil sdk as stubs, so I do have autocomplete in PyCharm. Some of the anvil.users. functions I have filled out. Also the anvil.server.call() and @anvil.server.callable etc.

Now I can pytest my UI modules in PyCharm.

If a UI module wants to call the server, it can. All the anvil tables commands are wrapped around a SQLIte database.

Basically it is nearly a reciprocal of anvil.works within PyCharm, except for the UI design which still needs to be done on anvil.works.

So far, I have been using it form my own sites, and I am sure it is NOT release quality.

If you feel brave:

Hopefully release quality will come soon…
Screen Recording 2022-03-16 at 3.21.16 AM

5 Likes