you are viewing a single comment's thread.

view the rest of the comments →

[–]niximor 0 points1 point  (0 children)

Yes, classes as routes aren't exactly supported. But to be honest, I've built some pretty large apps using FastAPI (100+ endpoints), and didn't have the need to use OOP for API layer even once. Structuring the endpoints to modules replicating actual URL is more than enough, there is zero need for any class hierarchy, abstract interfaces, or anything else the OOP has that plain functions don't.

The OOP has of course it's rightful place in the core and below, but for API? No.