Multinode - Rapidly build distributed cloud applications in Python | Product Hunt

Core concepts


A daemon is a process that runs forever. Like scheduled tasks, daemons often play a supporting role in web app backends - for example, by performing some background task such as processing data polled from a website or a queue.


Here, the daemon continuously scrapes a stock price from a website, saving it to a multinode dict. When the service receives a GET request, the latest stock price is loaded from the dict and returned.

import time
import os
import requests
from fastapi import FastAPI
import uvicorn
import multinode as mn

app = FastAPI()

prices_dict = mn.get_dict(name="prices")

def maintain_up_to_date_stock_price():
    while True:
        response = requests.get("")
        current_price = extract_price_from_html(response)
        prices_dict["ABC"] = current_price


def get_price():
    price = prices_dict["ABC"]
    return {"price": price}

def api():, host="", port=80)
Scheduled tasks