{"id":14976199,"url":"https://github.com/syedfaisalsaleeem/fastapi-strawberry-graphql-sqlalchemy-boilerplate","last_synced_at":"2025-10-27T18:30:45.853Z","repository":{"id":44307146,"uuid":"512033462","full_name":"syedfaisalsaleeem/FastApi-Strawberry-GraphQL-SqlAlchemy-BoilerPlate","owner":"syedfaisalsaleeem","description":"Boiler plate project for using GraphQL (Strawberry) with FastAPI and Async SQL Alchemy 🍓 ","archived":false,"fork":false,"pushed_at":"2022-07-11T21:31:45.000Z","size":45,"stargazers_count":143,"open_issues_count":2,"forks_count":25,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T07:31:51.910Z","etag":null,"topics":["async","fastapi","graphql-server","postgresql","python","sqlalchemy","strawberry-graphql"],"latest_commit_sha":null,"homepage":"https://graphql-stickynotes.herokuapp.com/graphql","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syedfaisalsaleeem.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-08T21:44:58.000Z","updated_at":"2024-12-28T19:38:25.000Z","dependencies_parsed_at":"2022-07-14T13:20:33.981Z","dependency_job_id":null,"html_url":"https://github.com/syedfaisalsaleeem/FastApi-Strawberry-GraphQL-SqlAlchemy-BoilerPlate","commit_stats":null,"previous_names":[],"tags_count":1,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syedfaisalsaleeem%2FFastApi-Strawberry-GraphQL-SqlAlchemy-BoilerPlate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syedfaisalsaleeem%2FFastApi-Strawberry-GraphQL-SqlAlchemy-BoilerPlate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syedfaisalsaleeem%2FFastApi-Strawberry-GraphQL-SqlAlchemy-BoilerPlate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syedfaisalsaleeem%2FFastApi-Strawberry-GraphQL-SqlAlchemy-BoilerPlate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syedfaisalsaleeem","download_url":"https://codeload.github.com/syedfaisalsaleeem/FastApi-Strawberry-GraphQL-SqlAlchemy-BoilerPlate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238536115,"owners_count":19488659,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","fastapi","graphql-server","postgresql","python","sqlalchemy","strawberry-graphql"],"created_at":"2024-09-24T13:53:29.591Z","updated_at":"2025-10-27T18:30:40.554Z","avatar_url":"https://github.com/syedfaisalsaleeem.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e Fast Api Strawberry GraphQL Async SQL Alchemy Boiler Plate \u003c/h1\u003e\n\u003ca\u003e\u003cimg src=https://user-images.githubusercontent.com/49129677/178163601-3ff563a4-67a1-45ca-a3cb-6ea193ca10da.png\u003e \u003c/a\u003e\n\n## Description\n\nThis code is a boiler plate for the implementation of GraphQL with Fast Api using Strawberry Library.\nFor GraphQL server we have used Strawberry.\n\n## Features\n\n- Production ready Python web server using Uvicorn and Gunicorn.\n\n- Python \u003ca href=\"https://github.com/tiangolo/fastapi\" class=\"external-link\" target=\"_blank\"\u003e**FastAPI**\u003c/a\u003e backend\n\n- Async Connection of SQL Alchemy with POSTGRESQL DataBase.\n\n- CRUD Operations of GraphQL using Strawberry Library.\n\n- Written Async Unit Tests using Pytest to test GraphQL queries and mutations.\n\n- Boiler Plate directory struture for GraphQL Python.\n\n- Get the data only from the columns using SQL Alchmey which are specified in GraphQL Query.\n\n- Deployment using Docker Container through Docker Compose file.\n\n- Deployed code at specific endpoint to test GraphQL.\n\n- Alembic migrations.\n\n-  Jenkins (continuous integration).\n## Installation\n\nTo run the project in your local environment::\n\n  1. Clone the repository::\n```\n  $ git clone https://github.com/syedfaisalsaleeem/FastApi-Strawberry-GraphQL-SqlAlchemy-BoilerPlate.git\n  $ cd FastApi-Strawberry-GraphQL-SqlAlchemy-BoilerPlate\n```\n  2. Create and activate a virtual environment::\n```\n  $ virtualenv env -p python3\n  $ source env/bin/activate\n```\n  3. Install requirements::\n```\n  $ pip install -r requirements.txt\n```\n  4. Run the application::\n```\n  $ python main_dev.py\n```\nTo run the project using Docker Container:\n\n  1. Clone the repository::\n```\n  $ git clone https://github.com/syedfaisalsaleeem/FastApi-Strawberry-GraphQL-SqlAlchemy-BoilerPlate.git\n  $ cd FastApi-Strawberry-GraphQL-SqlAlchemy-BoilerPlate\n```\n  2. Run this command on CMD::\n```\n  $ docker-compose up -d --build\n```\n## Usage Examples\n\nLaunch the fast api server at specified port default 5000 (open the UI at http://localhost:5000/graphql): ::\n\n    $ python main_dev.py\n\nLaunch using docker: ::\n\n    $ docker-compose up -d --build\n\n## Tests\n\nTest are run with *pytest*. If you are not familiar with this package you can get some more info from `their website \u003chttps://pytest.org/\u003e`_.\n\nTo run the tests, from the project directory, simply::\n\n```\n$ pip install -r requirements.txt\n$ python test.py\n```\n\nYou should see output similar to::\n```\n----------- coverage: platform win32, python 3.8.8-final-0 -----------\nName                                Stmts   Miss  Cover\n-------------------------------------------------------\ntests\\conftest.py                      18      4    78%\ntests\\graphql\\mutations.py              3      0   100%\ntests\\graphql\\queries.py                2      0   100%\ntests\\graphql\\test_stickynotes.py       0      0   100%\ntests\\graphql\\test_user.py             43      0   100%\ntests\\load_test_env.py                  4      4     0%\n-------------------------------------------------------\nTOTAL                                  70      8    89%\n\n\n=================== 8 passed in 0.59s =================\n```\n## Migrations\n\nTo run the project in your local environment::\n\n```\n$ alembic revision --autogenerate -m \"migration string\"\n$ alembic upgrade head\n```\n## License\n\nThis project is licensed under the terms of the MIT license. If you have any question about this opinionated list, do not hesitate to contact me [@SyedFaisal](https://www.linkedin.com/in/syedfaisalsaleem/) on Linkedin or open an issue on GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyedfaisalsaleeem%2Ffastapi-strawberry-graphql-sqlalchemy-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyedfaisalsaleeem%2Ffastapi-strawberry-graphql-sqlalchemy-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyedfaisalsaleeem%2Ffastapi-strawberry-graphql-sqlalchemy-boilerplate/lists"}