Programs

Programs are special entries that define code to run on Aleph.im virtual machines.

Aleph.im currently supports programs written in Python that follow the ASGI interface.

In practice, the easiest approach is to use an ASGI compatible web framework, such as FastAPI or Django.

Creating a program

Follow the FastAPI Tutorial to create your first program and test it using uvicorn.

Running on Aleph.im

Use the cli to upload your program.

In this example, we will upload the example_fastapi_2 example from Aleph-VM.

python3 -m aleph_client program /tmp/aleph-vm/examples/example_fastapi_2 __init__:app

The command will output two URLs:

  • A URL link to see the message definition of your program
  • A URL to run your program