Skip to content

h2oai/nitro

Repository files navigation

Nitro

Create apps 10x quicker, without Javascript, HTML, or CSS.

Nitro

Currently a Work in Progress. Follow the development blog or @CrunchingData for updates, or use Discord or Discussions for help / ideas / suggestions.

Get started

Philosophy

Recall how simple it is to author interactive command line applications using Python's built-in input() and print():

def main():
    name = input('What is your name?')
    feel = input(f'How do you feel today, {name}?')
    print(f'What a coincidence, {name}, I feel {feel}, too!')
> What is your name?
> Boaty McBoatface
> How do you feel today, Boaty McBoatface?
> intrigued
> What a coincidence, Boaty McBoatface, I feel intrigued, too!

Nitro brings that same level of simplicity to authoring web applications:

from h2o_nitro import View, box

def main(view: View):
    name = view(box('What is your name?', value='Boaty McBoatface'))
    feel = view(box(f'How do you feel today, {name}?', value='intrigued'))
    view(f'What a coincidence, {name}, I feel {feel}, too!')

Hello World app

And here's a more elaborate example with seven pages in seven Python statements:

Recruitment app