💻Create a Program

Register a program to run on Aleph.im virtual machines from a zip archive.

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

Tutorial on creating a hosting a program on Aleph-VM here.

Example on how to develop and run a small webapp based on FastAPI here.

Usage

$ python3 -m aleph_client program <PATH HERE> <ENTRYPOINT HERE>

#example: 
python3 -m aleph_client program ./my-program main:app

The command will output two URLs:

  • a URL link to see the message definition of your program

  • a URL to run your program

Help

$ python3 -m aleph_client program --help

Usage: python3 -m aleph_client program [OPTIONS] PATH ENTRYPOINT

  Register a program to run on Aleph.im virtual machines from a zip archive.

Arguments:
  PATH        [required]
  ENTRYPOINT  [required]

Options:
  --channel TEXT           [default: TEST]
  --private-key TEXT
  --private-key-file TEXT
  --help                   Show this message and exit.

Last updated