Teach coding with Anvil

Learning to code, using Anvil

Learning to code, using Anvil

Hands-on learning

Students love a hands-on learning environment.

Anvil lets them turn their new-found programming knowledge into interactive apps they can share and take pride in.

Python is all you need

Anvil is the answer to the question:

Why do I need to learn HTML, CSS, Javascript, SQL, HTTP requests to build a web app when I already know Python?

By keeping everything in Python, Anvil lets you introduce object-oriented, event-driven programming, without needing to teach five different languages at the same time.

Build a Web UI quickly

Building a UI is as simple as dragging and dropping components onto a template, allowing your pupils to focus their efforts on the programming logic.

If you prefer to build a UI in Python, everything that can be dragged onto a template can be written in code.

Everything is a Python object

Anvil web Forms, and all their components, are Python objects. Once pupils know the basics of classes and methods they are ready to create dynamic web apps.

With its object-oriented UI model, Anvil is a great way to teach object-oriented coding.

class Form1(Form1Template):
    def __init__(self, **properties):
        # Set Form properties and Data Bindings
        # Any code you write here will run when the form opens
        self.button_1.set_event_handler('click', self.button_1_click)

    def button_1_click(self, **event_args):
        print('Button was clicked')

Version control

Save and name a version. Built on top of Git, pupils can see the full history of their projects and revert to old versions if they make a mistake.

Database management

A database service out of the box! Use Python code to create, read, update and delete rows from a table.

from anvil.tables import app_tables

# Add a new row and return a Row object that represents it
row = app_tables.people.add_row(Name="Jane Smith",

Server code

Python function calls make interacting with server-side code pythonic.

# In the client
import anvil.server
value = anvil.server.call('say_hello', 'World')

# On the server
def say_hello(name):
  print(f"Hello from the server, {name}")
  return [1, 2, 3, 4]


Learning new syntax is effortless with code editor auto-completion. There is full documentation, helpful articles and tutorials, as well as an active forum for when you or your pupils need a hint.

Free for classroom use

Anvil is free to use.

We also offer our professional features for free to educational institutions to use in the classroom! Email education@anvil.works to find out more.

Find out more

So why not use Anvil to get students writing graphical web apps? Here are some simple app builds to inspire you: