Flask Graphene Sqlalchemy

screenshot of Flask Graphene Sqlalchemy

Flask Graphene Sqlalchemy

Project template to build a GraphQL API in Python


The purpose of this repository is to provide a project template to build a GraphQL API in Python. It is inspired by various references and aims to provide a more complete API and a scalable architecture. The repository offers a step-by-step tutorial on the Github Wiki for detailed design intentions.


  • Feature complete GraphQL API generation from a PostgreSQL database
  • Scalable architecture
  • Uses Flask, Graphene, and SQLAlchemy


  1. Install the required third-party packages by opening a terminal window, changing the directory to the project folder, and executing the following command:
$ pip3 install -r requirements.txt
  1. The following Python packages will be installed:
    • flask (0.12.3)
    • flask-graphql (1.4.1)
    • graphene (2.0.0)
    • graphene-sqlalchemy (2.0.0)
    • nose2 (0.7.4) - Used for running tests
    • requests (2.20.0) - Used for running tests
    • sqlalchemy (1.3.0)


This repository provides a project template for building a GraphQL API in Python. It offers a feature complete API generation from a PostgreSQL database, a scalable architecture, and utilizes Flask, Graphene, and SQLAlchemy. The installation process involves installing the required third-party packages, and test cases can be executed using the nose2 -v command.


Flask is a lightweight and popular web framework for Python, known for its simplicity and flexibility. It is widely used to build web applications, providing a minimalistic approach to web development with features like routing, templates, and support for extensions.


A website that uses GraphQL as a query language to manage data fetching and state management. This includes features such as a strongly typed schema, client-side caching, and declarative data fetching to streamline data management and optimize website performance.