Can i use Anvil in pycharm, or without internet

Hello there!
Can i use Anvil in pycharm, or without internet.

1 Like

Welcome to the forum!

Front end (form) development requires you to use the browser based Anvil IDE, which in turn requires an internet connection. ( edit : this is not quite true, see @owen.campbell’s reply below, though I would argue - as @owen.campbell alluded to - that most would only do this once you have used the IDE to create your broad form layouts, therefore that approach is 50/50 with internet access)

Back end (server side) development can be done in the same Anvil IDE, which is the most convenient way to do it. Or you can develop server code on your local machine using whichever IDE you like and then connect that code to the front end via Anvil’s Uplink service (see the link below).

Once the app is developed, you can if you wish install the whole thing locally using the open source runtime, and no internet would be required at that point.

Uplink info :

Local runtime info :

1 Like

I often work entirely offline.

The front end designer populates a yaml file and a python file for each form. Those can be edited manually within a local clone of the app’s repo.

Client modules and server side code are pure python and so can be edited locally too.

I often also run the app server in a docker container (with the Dockerfile in the app’s repo) with the source code mounted as a volume. That gives me a ‘dev’ app to play around with and test things out.

2 Likes

Well, I have quite a range of existing apps these days. Let’s just say I’ve become adept at cutting and pasting yaml!

That I do not doubt for one second :slight_smile:

I guess I just tend to - possibly incorrectly - assume that newcomers are here for the way that Anvil makes it ridiculously easy to create complete web apps inside their ecosystem. That assuption pushes my responses down the path mine took above.

But I do agree that you can work entirely offline, which I guess is what the OP asked…

1 Like

One thing I’d like to point out is that working offline (for example in PyCharm) does mean that you lose the benefits of Anvil’s autocompleter. Otherwise, as others have said, it’s totally doable; the best way of going about things will really depend on what it is you want to do and what constraints you’re working under.

In apps with complex logic I work on the forms and create the server modules online, then I clone the git repository and work on the server modules in PyCharm. There are some limitations, for example there will be tons of round trips when you access a data table or other services, or you can’t use SQL, but it’s really helpful.
At the end I push the app and it’s nice to find out that the server modules are much faster because they can access the server services without requiring round trips.
We already talked about this in this old post.

2 Likes

Thank you very much!
Anvil is what I’m looking for,great one! I’m studying Anvil, after that maybe it’s a good idea to make a Chinese tutorial.

A post was split to a new topic: App doesn’t work when Google Colab disconnects