Intro

The simplest arc program would look like this

hello_world.py
import arc


@arc.command()
def main():
    print("Hello World!")


main()
Which we can then execute directly!
$ python hello_world.py 
Hello World!

Let's break this down to better understand what exactly is going on.

  1. @arc.command() is a Python decorator that transforms a function into an arc command.
  2. def main() is just a simple Python function. The function can also declare parameters.
  3. main() while this make look like we're calling the main function, because the function has been transformed into a command, we're actualy executing the command.