Hi Mikko, I had a long look at FastAPI a few months ago. At first it looked like a very interesting option to me, and I further explored the docs to find if it offered all that I needed.
The Swagger/OpenAPI integration out of the box has to be the main selling point. Also, the use of Pydantic schemas to validate both inputs and outputs is very attractive, as well as the Oauth2 integration out of the box. On the minus side, the dependency injection system seemed far from clear to me. But the two biggest problems, for my needs, were: - FastAPI doesn't offer rich security policies (the security system in Pyramid is based on Zope's, with roles, permissions, ACLs, route factories, contexts, etc.). Itonly offers "Oauth2 scopes", which can represent global permissions. So, no contextual permissions, workflows, etc, at least not with a substantial amount of work. - FastAPI doesn't seem to allow application composition the way Pyramid does (the exact term in the Pyramid docs is "extending an application") So, in the end, I realised it was just a shinier, modern-er Flask, and I would lose too any things if I made the switch from Pyramid :( Laurent. Le jeu. 12 sept. 2024 à 00:50, Mikko Ohtamaa <mi...@redinnovation.com> a écrit : > Hi, > > Alternatively fastapi is a very popular and maintained framework today. > Though as far as I know, it runs on the top of Flask, not Pyramid. Not sure > if Pyramid integration exists. > > https://github.com/fastapi/fastapi > > Br, > Mikko > > On Wed, 11 Sept 2024 at 16:11, Laurent Daverio <ldave...@gmail.com> wrote: > >> Hello List, >> >> I would like to ask about recommended packages for writing API routes in >> Pyramid. I mostly know two ways of doing it: >> >> - using Pyramid views with a JSON renderer >> - using Cornice >> >> At one time, I was using `pyramid_openapi3` on tope of it, but I decided >> to stop, due to having lots of issues with it (but that's another story). >> >> I generally prefer Cornice, however there a lot of features I don't use, >> like validations, and "resources" (I only use "services", as "resources" >> are not flexible enough for my needs). >> >> So, at this point, my question is: if you were to recommend something >> "better" than Cornice ("better" meaning essentially "lighter"), what would >> it be? >> >> Thanks in advance, >> >> Laurent. >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "pylons-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to pylons-discuss+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pylons-discuss/CAB7cU6xtNQdj%3Dby9WjeJwJZkpV4-GOmDeyaq1XqyJZ_dGC%3D%2B0w%40mail.gmail.com >> <https://groups.google.com/d/msgid/pylons-discuss/CAB7cU6xtNQdj%3Dby9WjeJwJZkpV4-GOmDeyaq1XqyJZ_dGC%3D%2B0w%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to pylons-discuss+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/pylons-discuss/CAK8RCUsN86a_taRKS_9BAZsusVokUeSvvtuYOTRAHzEtYi57Ow%40mail.gmail.com > <https://groups.google.com/d/msgid/pylons-discuss/CAK8RCUsN86a_taRKS_9BAZsusVokUeSvvtuYOTRAHzEtYi57Ow%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/CAB7cU6xDkK0G02g1k0tY2C-jkHBYzWg2evewoB69ziPV5UapbA%40mail.gmail.com.