Numerous App Engine

Numerous App Engine

💡

Numerous App Engine requires one of the following versions of Python to be installed: 3.9, 3.10, 3.11, or 3.12.

What is Numerous App Engine?

At Numerous, we want to redefine app creation to align closely with standard Python coding practices, making it a natural extension of engineering problem-solving in Python.

That is why we created Numerous App Engine.

By simply defining your data model — think Pydantic or data classes — you'll automatically get a user interface (UI). Interact with this model directly in your Python code and let us handle the synchronization with the UI seamlessly. This approach allows you to utilize if/else statements, loops, and threading as usual, with the added bonus of writing code that reacts instantly to changes.

Let’s create a counter application as an example to learn how Numerous App Engine works.

Install

Install the Numerous Software Develoment Kit (SDK):

terminal
pip install numerous

Define your app

Create a Python file (for example: “app.py”) with the following code:

app.py
from numerous import app
 
@app
class Count:
    count: float

The @app decorator defines an app from the Count class. The app is defined with one parameter: count.

Run your app

To start using your app locally, run:

terminal
numerous dev app.py:Count

Your local app application is now available to you at http://localhost:7001/ (opens in a new tab). You should see a title and one editable input field.

Add interactivity

To add interactivity, we will define an action. Actions translate to buttons in the user interface. This example increments the count value.

Update the code to the following:

app.py
from numerous import action, app
 
@app
class Count:
    count: float
 
    @action
    def increment(self):
        self.count += 1

Try it out by clicking the button and seeing how your new app works.

Use User Input (UI) in the code

Numerous App Engine lets you use user-inputted values in your code. Add a "step" parameter and use it in the increment action by updating the code to the following:

app.py
from numerous import action, app
 
@app
class Count:
    count: float
    step: float
 
    @action
    def increment(self):
        self.count += self.step

Try changing the "step" value and click the increment action. Now the value increments by the "step" value every time!

Develop and run Numerous App Engine apps locally

terminal
numerous dev 

The numerous dev command starts a development session where you can see your app's user interface (UI). The UI automatically updates when the app's code changes.

To see all supported options of the numerous dev command, run the following:

numerous dev --help

Start a development session

Start a development session for the app defined as the class MyApp in the module app.py:

numerous dev app.py:MyApp 

This will print a URL to the console that you can use to access your app. By default, it will be http://localhost:7001 (opens in a new tab).

Get debug information

Numerous App Engine features are still in the early stages of development. If you experiences issues, please report it to us as it is very helpful for us to get debugging information.

To get debugging information, you can run your app with a special flag, which increases the verbosity of the output to the console:

numerous dev -–log-level debug MODULE:CLASS 

End your development session

Use ctrl + c in the terminal to stop the local development server.

💡

Numerous App Engine is an alpha release. It currently supports local development workflows.