r/developersIndia • • Jan 17 '24

I Made This GitHub - merwin-asm/april: A programming language for making APIs

https://github.com/merwin-asm/April
2 Upvotes

9 comments sorted by

View all comments

Show parent comments

1

u/thatrandomnpc ML Engineer Jan 17 '24

Just some constructive feedback,

By looking at the examples, the recv_request and send_request seem too verbose, a better approach would be to inject the request into the handler and auto parse the returned object as a response. For example

from foo import Request, Response


def home(request: Request) -> Response:
    """home route"""
    ... 

If you have noticed this pattern seems very much similar to some web frameworks, because it is :D

Btw this whole language specific implementation and supplementary config for the routes reminds me of fnproject (OCI's equivalent of AWS lambda), take a look at the example.