Giter Site home page Giter Site logo

joewetton / fastql Goto Github PK

View Code? Open in Web Editor NEW

This project forked from obytes/fastql

0.0 0.0 0.0 536 KB

โš™๏ธ Full stack, Modern Web Application Generator. โœจ Using FastAPI, GraphQL, PostgreSQL as database, Docker, automatic HTTPS and more. ๐Ÿ”–

Home Page: https://www.obytes.com/blog/getting-started-with-graphql-in-python-with-fastapi-and-ariadne

License: MIT License

Shell 3.60% Dockerfile 11.53% Makefile 2.57% Python 80.28% Mako 2.01%

fastql's Introduction

FastQL - FastAPI GraphQL Playground ๐Ÿ”ง

fastql

Generate a FullStack playground using FastAPI and GraphQL and Ariadne โšก

This Repository is based on this Article Getting started with GraphQL in Python with FastAPI and Ariadne, Read Article to know how to use it.

Overview ๐Ÿ“Œ

  • FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints.
  • GraphQL used to create a schema to describe all the possible data that clients can query through that service. A GraphQL schema is made up of object types, which define which kind of object you can request and what fields it has.
  • Ariadne is a Python library for implementing GraphQL servers using schema-first approach.

Features

  • Full Docker integration (Docker based).
  • Docker Compose integration and optimization for local development.
  • Production ready Python web server using Uvicorn and Gunicorn.
  • GraphQL playground based on Graphene and Ariadne.
  • Docker Compose integration and optimization for local development.
  • Production ready Python web server using Uvicorn.
  • Secure password hashing by default.
  • JWT token authentication.
  • SQLAlchemy database integration using PostgreSQL.
  • Alembic migrations for database schema.
  • rabbitMQ (asynchronous) message broker.
  • API tests based on Pytest, integrated with Docker, so you can test the full API interaction, independent on the database.

Getting Started

Project setup

# clone the repo
$ git clone https://github.com/obytes/fastql.git

# move to the project folder
$ cd fastql

Running the Docker Container

  • We have the Dockerfile created in above section. Now, we will use the Dockerfile to create the image of the FastAPI app and then start the FastAPI app container.
  • Using a preconfigured Makefile tor run the Docker Compose:
# Pull the latest image
$ make pull

# Build the image
$ make build

# Run the container
$ make start

Testing

While i use HTTPX an HTTP client for Python 3, to test the API, most of the tests are using a live log thats why need before to run a server using uvicorn and migrate the database, then you will have the ability to run the tests. To have a clean environment, recommended to use Docker for that, when you start the containers try to open the application container and then run pytest to test the API.

License

This project is licensed under the terms of the MIT license.

fastql's People

Contributors

yezz123 avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.