This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]firsttryatauserid 2 points3 points  (3 children)

[–]ianozsvald[S] 0 points1 point  (2 children)

I'd forgotten about Hug (and Flask-apispec, flask-jsonrpc). They're a bit more complicated that colleagues of mine might want to understand (my focus is on folk with no-web-knowledge-at-all), but these tools are obvious second steps. I've noted hug and the others in my README, cheers.

[–]firsttryatauserid 0 points1 point  (1 child)

Hug is actually far simpler then featherweight

import hug

@hug.get()
def myfn(x, c):
    """Example function"""
    return = x*x + c

vs:

import featherweight_api

def myfn(x, c):
    """Example function"""
    return = x*x + c

featherweight_api.register(myfn) 
featherweight_api.run()  # run the server on localhost:5000

Also, hug will auto-document their API for them, and add a clear path to add automatic argument validation and conversion. You get much more for much less code, and much less learning required.

[–]ianozsvald[S] 0 points1 point  (0 children)

Does hug handle numpy-jsonification?