There is an error in using APIStar according to the tutorial.

APIStar: A smart Web API framework, designed for Python 3.
APIStar docs
while learning to use APIStar, I tried to follow the tutorial and an error occurred.

from apistar import App, Route


def welcome(name=None):
    if name is None:
        return {"message": "Welcome to API Star!"}
    return {"message": "Welcome to API Star, %s!" % name}


routes = [
    Route("/", method="GET", handler=welcome),
]

app = App(routes=routes)


if __name__ == "__main__":
    app.serve("127.0.0.1", 5000, debug=True)

appears at startup as follows:

TypeError: issubclass() arg 1 must be a class

I don"t know where the problem is. I hope my seniors will let me know.

Apr.01,2021
Menu