# FastGraphQL

<p style="text-align: center;">FastGraphQL is a tool for creating code-driven GraphQL APIs.</p>
----------



[](https://codecov.io/gh/hugowschneider/fastgraphql)

[](https://sonarcloud.io/summary/new_code?id=hugowschneider_fastgraphql)
[](https://sonarcloud.io/summary/new_code?id=hugowschneider_fastgraphql)
[](https://sonarcloud.io/summary/new_code?id=hugowschneider_fastgraphql)
[](https://sonarcloud.io/summary/new_code?id=hugowschneider_fastgraphql)
[](https://sonarcloud.io/summary/new_code?id=hugowschneider_fastgraphql)
[](https://sonarcloud.io/summary/new_code?id=hugowschneider_fastgraphql)
[](https://sonarcloud.io/summary/new_code?id=hugowschneider_fastgraphql)
-------
Documentation: <a href="https://hugowschneider.github.io/fastgraphql" target="_blank">https://hugowschneider.github.io/fastgraphql</a>
Source Code: <a href="https://github.com/hugowschneider/fastgraphql" target="_blank">https://github.com/hugowschneider/fastgraphql</a>
# Disclaimer
*This is still a work in progress and all support is welcomed*
# Motivation
So far most of the projects that use GraphQL need to duplicate
many definitions to be able to have a consistent GraphQL API schema
alongside well-defined models that governs the development and the application.
FastGraphQL proposes to shortcut the path between python models and GraphQL schema
using **Pydantic** models. This ensures not only a single source of truth when comes to
type, input, query and mutation definitions, but also the
ability to use **Pydantic** to features on models and inputs.
# Installation
```shell
$ pip install "fastgraphql[all]"
```
You will also need an ASGI server as well to serve your API
```shell
$ pip install "uvicorn[standard]"
```
# Usage
The very first Hello Work example.
```python
from fastapi import FastAPI
from fastgraphql import FastGraphQL
from fastgraphql.fastapi import make_ariadne_fastapi_router
app = FastAPI()
fast_graphql = FastGraphQL()
@fast_graphql.query()
def hello() -> str:
return "Hello FastGraphQL!!!"
app.include_router(make_ariadne_fastapi_router(fast_graphql=fast_graphql))
```
```shell
$ uvicorn main:app --reload
```
A simple example will not show you the all **FastGraphQL** capabilities, but it
shows how simple this can be.
# Learn
To start your journey into **FastGraphQL**, please refer to [Getting Started](https://hugowschneider.github.io/fastgraphql/tutorial/).
You can find the API documentation [here](https://hugowschneider.github.io/fastgraphql/api/fastgraphql/).
# Integration
FastGraphQL generates independently of any integration a data structure containing all GraphQL definitions and resolvers, which
generates a GraphQL schema.
With that said, all integration will add functionalities and provide
easy and alternative deployments of the defined API.
You can find out more about the different integrations under [Integrations](https://hugowschneider.github.io//fastgraphql/under-construction/)
# Acknowledgment
Thanks to [FastAPI](https://fastapi.tiangolo.com) for the inspiration!
Raw data
{
"_id": null,
"home_page": "https://github.com/hugowschneider/fastgraphql",
"name": "fastgraphql",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8.1,<4.0.0",
"maintainer_email": "",
"keywords": "graphql,fastgraphql",
"author": "Hugo Wruck Schneider",
"author_email": "hugowschneider@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/82/e5/3300736ce3d3c79a204c012bddcd2aa1a5af0529fc46461013aab5cd2cb6/fastgraphql-0.0.12.tar.gz",
"platform": null,
"description": "# FastGraphQL\n\n<p style=\"text-align: center;\">FastGraphQL is a tool for creating code-driven GraphQL APIs.</p>\n\n----------\n\n\n\n\n\n[](https://codecov.io/gh/hugowschneider/fastgraphql)\n\n\n\n[](https://sonarcloud.io/summary/new_code?id=hugowschneider_fastgraphql)\n[](https://sonarcloud.io/summary/new_code?id=hugowschneider_fastgraphql)\n[](https://sonarcloud.io/summary/new_code?id=hugowschneider_fastgraphql)\n[](https://sonarcloud.io/summary/new_code?id=hugowschneider_fastgraphql)\n[](https://sonarcloud.io/summary/new_code?id=hugowschneider_fastgraphql)\n[](https://sonarcloud.io/summary/new_code?id=hugowschneider_fastgraphql)\n[](https://sonarcloud.io/summary/new_code?id=hugowschneider_fastgraphql)\n\n-------\nDocumentation: <a href=\"https://hugowschneider.github.io/fastgraphql\" target=\"_blank\">https://hugowschneider.github.io/fastgraphql</a>\n\nSource Code: <a href=\"https://github.com/hugowschneider/fastgraphql\" target=\"_blank\">https://github.com/hugowschneider/fastgraphql</a>\n\n# Disclaimer\n\n*This is still a work in progress and all support is welcomed*\n\n# Motivation\n\nSo far most of the projects that use GraphQL need to duplicate\nmany definitions to be able to have a consistent GraphQL API schema\nalongside well-defined models that governs the development and the application.\n\nFastGraphQL proposes to shortcut the path between python models and GraphQL schema\nusing **Pydantic** models. This ensures not only a single source of truth when comes to\ntype, input, query and mutation definitions, but also the\nability to use **Pydantic** to features on models and inputs.\n\n# Installation\n\n```shell\n$ pip install \"fastgraphql[all]\"\n```\nYou will also need an ASGI server as well to serve your API\n\n```shell\n$ pip install \"uvicorn[standard]\"\n```\n\n# Usage\n\nThe very first Hello Work example.\n\n```python\nfrom fastapi import FastAPI\nfrom fastgraphql import FastGraphQL\nfrom fastgraphql.fastapi import make_ariadne_fastapi_router\n\napp = FastAPI()\nfast_graphql = FastGraphQL()\n\n\n@fast_graphql.query()\ndef hello() -> str:\n return \"Hello FastGraphQL!!!\"\n\n\napp.include_router(make_ariadne_fastapi_router(fast_graphql=fast_graphql))\n\n```\n\n```shell\n$ uvicorn main:app --reload\n```\n\nA simple example will not show you the all **FastGraphQL** capabilities, but it\nshows how simple this can be.\n\n# Learn\n\nTo start your journey into **FastGraphQL**, please refer to [Getting Started](https://hugowschneider.github.io/fastgraphql/tutorial/).\n\nYou can find the API documentation [here](https://hugowschneider.github.io/fastgraphql/api/fastgraphql/).\n\n# Integration\n\nFastGraphQL generates independently of any integration a data structure containing all GraphQL definitions and resolvers, which\ngenerates a GraphQL schema.\n\nWith that said, all integration will add functionalities and provide\neasy and alternative deployments of the defined API.\n\nYou can find out more about the different integrations under [Integrations](https://hugowschneider.github.io//fastgraphql/under-construction/)\n\n# Acknowledgment\n\nThanks to [FastAPI](https://fastapi.tiangolo.com) for the inspiration!\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "FastGraphQL is intended to help developer create code driven GraphQL APIs",
"version": "0.0.12",
"split_keywords": [
"graphql",
"fastgraphql"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "a5a30ee1e72c0038362b628cef15fe95",
"sha256": "0af66e0023fc13b089b64f2c3d20e7555700dc844e22865b2fd44111d89930d6"
},
"downloads": -1,
"filename": "fastgraphql-0.0.12-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a5a30ee1e72c0038362b628cef15fe95",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8.1,<4.0.0",
"size": 20023,
"upload_time": "2022-12-30T10:04:47",
"upload_time_iso_8601": "2022-12-30T10:04:47.984893Z",
"url": "https://files.pythonhosted.org/packages/c8/b7/4150e7717306071fccfaba764e27b65dbbc20c90f3208eb1a2764eb8c7a6/fastgraphql-0.0.12-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "cdb9f85834ee73485421e0aefafe333f",
"sha256": "77dec2530617bd060045c25224946de914465a5fe803449fe478f7f9cfbbe7c1"
},
"downloads": -1,
"filename": "fastgraphql-0.0.12.tar.gz",
"has_sig": false,
"md5_digest": "cdb9f85834ee73485421e0aefafe333f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8.1,<4.0.0",
"size": 17819,
"upload_time": "2022-12-30T10:04:49",
"upload_time_iso_8601": "2022-12-30T10:04:49.608055Z",
"url": "https://files.pythonhosted.org/packages/82/e5/3300736ce3d3c79a204c012bddcd2aa1a5af0529fc46461013aab5cd2cb6/fastgraphql-0.0.12.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-30 10:04:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "hugowschneider",
"github_project": "fastgraphql",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "fastgraphql"
}