{"id":13598443,"url":"https://github.com/tartiflette/tartiflette-asgi","last_synced_at":"2025-04-10T09:31:16.229Z","repository":{"id":34701076,"uuid":"182316472","full_name":"tartiflette/tartiflette-asgi","owner":"tartiflette","description":"ASGI support for the Tartiflette GraphQL engine","archived":false,"fork":false,"pushed_at":"2023-06-26T07:57:25.000Z","size":2983,"stargazers_count":99,"open_issues_count":14,"forks_count":16,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-25T11:02:22.438Z","etag":null,"topics":["asgi","async","graphql","http","python","starlette","websocket"],"latest_commit_sha":null,"homepage":"https://tartiflette.github.io/tartiflette-asgi","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/tartiflette.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-04-19T19:38:45.000Z","updated_at":"2025-03-06T03:26:49.000Z","dependencies_parsed_at":"2023-07-18T05:24:23.816Z","dependency_job_id":null,"html_url":"https://github.com/tartiflette/tartiflette-asgi","commit_stats":{"total_commits":166,"total_committers":16,"mean_commits":10.375,"dds":"0.16265060240963858","last_synced_commit":"2a0bf55c1309bac7703b6861d1d58b18d4149bd6"},"previous_names":["tartiflette/tartiflette-starlette"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tartiflette%2Ftartiflette-asgi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tartiflette%2Ftartiflette-asgi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tartiflette%2Ftartiflette-asgi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tartiflette%2Ftartiflette-asgi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tartiflette","download_url":"https://codeload.github.com/tartiflette/tartiflette-asgi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248191691,"owners_count":21062553,"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":["asgi","async","graphql","http","python","starlette","websocket"],"created_at":"2024-08-01T17:00:52.675Z","updated_at":"2025-04-10T09:31:11.207Z","avatar_url":"https://github.com/tartiflette.png","language":"Python","funding_links":[],"categories":["GraphQL","Python"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/tartiflette/tartiflette-asgi/master/img/tartiflette-asgi.png\" alt=\"tartiflette-asgi logo\"/\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/tartiflette/tartiflette-asgi/actions\"\u003e\n    \u003cimg src=\"https://github.com/tartiflette/tartiflette-asgi/workflows/Build/badge.svg?branch=master\" alt=\"Build status\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/tartiflette-asgi\"\u003e\n    \u003cimg src=\"https://badge.fury.io/py/tartiflette-asgi.svg\" alt=\"Package version\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/ambv/black\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/code_style-black-000000.svg\" alt=\"Code style\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n`tartiflette-asgi` is a wrapper that provides ASGI support for the [Tartiflette](https://tartiflette.io) Python GraphQL engine.\n\nIt is ideal for serving a GraphQL API over HTTP, or adding a GraphQL API endpoint to an existing ASGI application (e.g. FastAPI, Starlette, Quart, etc).\n\nFull documentation is available at: https://tartiflette.github.io/tartiflette-asgi\n\n## Requirements\n\n`tartiflette-asgi` is compatible with:\n\n- Python 3.6+.\n- Tartiflette 1.x.\n\n## Quickstart\n\nFirst, install Tartiflette's external dependencies, as explained in the [Tartiflette tutorial](https://tartiflette.io/docs/tutorial/install-tartiflette).\n\nThen, you can install Tartiflette and `tartiflette-asgi` using `pip`:\n\n```bash\npip install tartiflette \"tartiflette-asgi==0.*\"\n```\n\nYou'll also need an [ASGI web server](https://github.com/florimondmanca/awesome-asgi#servers). We'll use [Uvicorn](http://www.uvicorn.org/) here:\n\n```bash\npip install uvicorn\n```\n\nCreate an application that exposes a `TartifletteApp` instance:\n\n```python\nfrom tartiflette import Resolver\nfrom tartiflette_asgi import TartifletteApp\n\n@Resolver(\"Query.hello\")\nasync def hello(parent, args, context, info):\n    name = args[\"name\"]\n    return f\"Hello, {name}!\"\n\nsdl = \"type Query { hello(name: String): String }\"\napp = TartifletteApp(sdl=sdl, path=\"/graphql\")\n```\n\nSave this file as `graphql.py`, then start the server:\n\n```bash\nuvicorn graphql:app\n```\n\nMake an HTTP request containing a GraphQL query:\n\n```bash\ncurl http://localhost:8000/graphql -d '{ hello(name: \"Chuck\") }' -H \"Content-Type: application/graphql\"\n```\n\nYou should get the following JSON response:\n\n```json\n{ \"data\": { \"hello\": \"Hello, Chuck!\" } }\n```\n\nTo learn more about using `tartiflette-asgi`, head to the documentation: https://tartiflette.github.io/tartiflette-asgi\n\n## Contributing\n\nWant to contribute? Awesome! Be sure to read our [Contributing guidelines](https://github.com/tartiflette/tartiflette-asgi/tree/master/CONTRIBUTING.md).\n\n## Changelog\n\nChanges to this project are recorded in the [changelog](https://github.com/tartiflette/tartiflette-asgi/tree/master/CHANGELOG.md).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftartiflette%2Ftartiflette-asgi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftartiflette%2Ftartiflette-asgi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftartiflette%2Ftartiflette-asgi/lists"}