saabeilin / sanic-restful

A simple RESTful helper for Sanic (when HTTPMethodView is not enough)
3 stars 1 forks source link

Is this one dead? #1

Open YoshieraHuang opened 5 years ago

YoshieraHuang commented 5 years ago

Now it's December, but the last commit is at January. Several features like decorator are still not implemented. So this program is dead now? Does the author still maintain this code?

saabeilin commented 5 years ago

@YoshieraHuang We use it in production as-is. There are certain plans for improving but nothing is prioritized yet. I'm absolutely open to any suggestions! Feel free to open new tickets here or mail me directly. Certainly, PRs welcome!

YoshieraHuang commented 5 years ago

@saabeilin Hello, It's very pleasant for me to use this code to build my works. I need to add authentication to endpoint. It can be done by decorator but I have to add authentication decorators to every methods in endpoints. I tried to use decorator attribute in HTTPMethodView of sanic, but the decorators in decorator are executed at as_view(), which seems not work for authentication. There is a line with method decorator in example but it's commented. In source code, method decorator is declared but not implemented. I guess method decorator may work for authentication.

saabeilin commented 5 years ago

@YoshieraHuang Nice to hear! We currently run behind the API gateway/BFF-layer which does the authentication (which seems to be more architecturally right in many cases), in fact, that's why it was not prioritized here. I recall the issues with this decorator and as_view() as well. However, there should be other cases that are nicely solved with decorators. I'll take a look at this.

YoshieraHuang commented 5 years ago

Why not upload this code to pypi? However there is a package named sanic-restful at pypi, which is a port of flask-restful for sanic, but it's still under testing.