3 ms·
It is worth noting that Pyramid Web Framework is also awesome to use. I see it as a middle ground between Django and Flask. The scaffolds make some design decis
by ergo14 8y ago
It is worth noting that Pyramid Web Framework is also awesome to use. I see it as a middle ground between Django and Flask. The scaffolds make some design decisions for project and you can pick from what you like the most. Pyramid allows for extensible applications and never gets in your way.
The most critical Python infrastructure (PyPi) is now built with it, if you haven't tried it give it a shot. It is one of most well thought out frameworks for python in my opinion.
I've made a tutorial for it: https://docs.pylonsproject.org/projects/pyramid-blogr/en/latest/ https://docs.pylonsproject.org/projects/pyramid-blogr/en/lat....
- blumomo 8y agoI'm a very happy ist of Pyramid. Using it professionally for various larger applications as well as for pet projects. It's very well thought through. We're providing a GraphQL and integrating it was a breeze.
- audiolion 8y agoI would be interested to hear about how you did pyramid and graphql, ive been following graphene but are there specific tie ins for pyramid? books? articles?
- blumomo 8y agoThe integration is actually straight forward if you use the "graphene" library which you already looked in to. If you use SQLAlchemy, there's even a graphene-sqlalchemy binding which makes it really really easy. Simply add a /graphql view to your Pyramid app such as: from cornice import Service from pyramid.exceptions import HTTPBadRequest from ..schemas import schema graphql = Service( name='graphql', path='/graphql', description="GraphQL", accept='application/json', renderer='json', ) @graphql.post(permission='readwrite') def post_graphql(request): query = request.json_body.get('query') variables = request.json_body.get('variables', None) if not query: raise HTTPBadRequest return schema.execute(query, variable_values=variables, context_value={ 'dbsession': request.dbsession, 'user_id': request.authenticated_userid, })