import requests


def display_people_in_space() -> bool:
    """The number of people in space at this moment. List of names when known.

    :return: function executed correctly
    :rtype: bool
    """

    res = requests.get("http://api.open-notify.org/astros.json").json()
    number: int = res.get("number")
    craft: str = res["people"][0]["craft"]
    names: list = [
        person.get("name") for person in res.get("people")
        if person.get("craft") == craft
    ]
    names_str: str = ", ".join(names)
    print(f"There are {number} people aboard the {craft}. They are {names_str}")

    return True