Cornice support custom validators (+marshmallow out of the box), i think it not hard add Pydantic/dataclasses support https://cornice.readthedocs.io/en/latest/validation.html https://github.com/Cornices/cornice/tree/main/src/cornice/validators
Let's not speak about those dark times. Pydantic is very specific too <https://github.com/pydantic/pydantic/issues>in real life :) >From my side FastAPI is more about hype, you can also check LiteStar <https://litestar.dev/> - the next station after FastApi with less limitations, but personally i preferred pyramid's philosophy пт, 4 окт. 2024 г. в 16:59, Mikko Ohtamaa <[email protected]>: > Hi, > > On Fri, 4 Oct 2024 at 15:18, Sergey Maranchuk <[email protected]> wrote: > >> Cornice is in `maintenance mode` now and not recommended for new projects. >> https://github.com/Pylons/trypyramid.com/pull/388 >> >> пятница, 4 октября 2024 г. в 15:51:46 UTC+3, Thierry Florac: >> >>> Hi Mikko, >>> I use colander, cornice and cornice-swagger packages with Pyramid. >>> They allow schema verification and validation, and OpenAPI specification >>> generation... >>> >> > I appreciate your recommendations. I did some Colander maintenance a > decade ago. Let's not speak about those dark times. Even if it is not a > perfect solution to every problem, I feel Pydantic could be a good future > solution as it has a vibrant community and is not too opinionated. > > At least it is not Django. > > Br, > Mikko > > >> >>> Best regards, >>> Thierry >>> -- >>> https://www.ulthar.net -- http://pyams.readthedocs.io >>> >>> Le ven. 4 oct. 2024 à 09:58, Mikko Ohtamaa <[email protected]> a >>> écrit : >>> >>>> >>>> >>>>> 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") >>>>> >>>> >>>> Would it be possible to mix the best parts of FastAPI and Pyramid? >>>> >>>> - FastAPI for schema generation and validation >>>> - Pyramid as a web server and routing >>>> >>>> As pointed our earlier, FastAPI uses Starlette web server. Would we be >>>> able to replace Starlette with Pyramid? >>>> >>>> Or more generally: >>>> >>>> Do we have any OpenAPI specification (YAML, JSON) generation tools from >>>> Pyramid endpoints? (As discussed earlier, we have the opposite, manually >>>> writing YAML and then importing it through pyramid_openapi3). >>>> >>>> Br, >>>> Mikko >>>> >>>> -- >>>> >>> 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 [email protected]. >>>> >>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/pylons-discuss/CAK8RCUtrjtxH3dneehNu9mQzz28s4G3g1gMvu1iC1ziFrR6afg%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/pylons-discuss/CAK8RCUtrjtxH3dneehNu9mQzz28s4G3g1gMvu1iC1ziFrR6afg%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 [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pylons-discuss/6265acb6-f16b-4a8a-9de9-c577f2b1354dn%40googlegroups.com >> <https://groups.google.com/d/msgid/pylons-discuss/6265acb6-f16b-4a8a-9de9-c577f2b1354dn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "pylons-discuss" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/pylons-discuss/wnKQT4_5aZA/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/pylons-discuss/CAK8RCUuETnH2QdqG73oqSLQo7WJGdmR4%2BCHPpot%3DAvZ4m4YtrA%40mail.gmail.com > <https://groups.google.com/d/msgid/pylons-discuss/CAK8RCUuETnH2QdqG73oqSLQo7WJGdmR4%2BCHPpot%3DAvZ4m4YtrA%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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/CAJp6tx8mAJW_UrD9BMDauy8y73Q8_Q8yPa1zLQvWNsmnAcS2jg%40mail.gmail.com.
