![Tartiflette](docs/github-landing.png)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=tartiflette_tartiflette&metric=alert_status)](https://sonarcloud.io/dashboard?id=tartiflette_tartiflette)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/tartiflette/tartiflette.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/tartiflette/tartiflette/alerts/)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/tartiflette/tartiflette.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/tartiflette/tartiflette/context:python)
**Tartiflette** is a GraphQL Server implementation built with **Python 3.7+**.
**Summary**
- [Motivation](#motivation)
- [Status](#status)
- [Usage](#usage)
- [Installation](#installation)
- [Building from source](#building-from-source)
- [HTTP server implementations](#http-server-implementations)
- [Roadmaps](#roadmaps)
- [How to contribute to the documentation?](#how-to-contribute-to-the-documentation)
- [How to run the website locally?](#how-to-run-the-website-locally)
## Motivation
[Read this blogpost about our motivations](https://medium.com/dailymotion/tartiflette-graphql-api-engine-python-open-source-a200c5bbc477)
TL; DR
We reached the limits of Graphene, we wanted to build something which met certain requirements:
* **Offers a better developer experience** that respects the Python mindset
* **Uses SDL** _(Schema Definition Language)_
* Uses **asyncio** as the sole execution engine
* Be 100% open source
## Status
**The [first milestone](/docs/roadmaps/milestone-1.md) is behind us, we are now [on the road to the milestone 2](/docs/roadmaps/milestone-2.md)**.
**DNA**
* Define the **GraphQL schema** with the brand new [SDL _(Schema Definition Language)_](https://github.com/facebook/graphql/blob/master/spec/Section%203%20--%20Type%20System.md).
* **Performance oriented:** Performance is the core of our work.
* **Simple is better than complex:** Built with [the Zen of Python](https://www.python.org/dev/peps/pep-0020/#id3) in mind. No over-engineering.
Discover Tartiflette with our fabulous tutorial on [https://tartiflette.io/docs/tutorial/getting-started](https://tartiflette.io/docs/tutorial/getting-started)
## Usage
```python
import asyncio
from tartiflette import Resolver, create_engine
@Resolver("Query.hello")
async def resolver_hello(parent, args, ctx, info):
return "hello " + args["name"]
async def run():
engine = await create_engine(
"""
type Query {
hello(name: String): String
}
"""
)
result = await engine.execute(
query='query { hello(name: "Chuck") }'
)
print(result)
# {'data': {'hello': 'hello Chuck'}}
if __name__ == "__main__":
asyncio.run(run())
```
More details on the [API Documentation](https://tartiflette.io/docs/api/engine/)
## Installation
Tartiflette is available on [pypi.org](https://pypi.org/project/tartiflette/).
While the project depends on *[libgraphqlparser](https://github.com/graphql/libgraphqlparser)*,
wheels are provided since version 1.4.0, ensuring that no system dependency is required.
To install the library:
```bash
pip install tartiflette
```
### Building from source
If you use a platform incompatible with the provided wheels, you'll need to install `cmake` to build `libgraphqlparser`
in order to install the library.
*macOS*
```bash
brew install cmake
```
*Debian/Ubuntu*
```bash
apt-get install cmake
```
## HTTP server implementations
`tartiflette` library itself is transport agnostic, but to simplify integration with existing HTTP servers, two
different libraries are available:
- [tartiflette-aiohttp](https://github.com/tartiflette/tartiflette-aiohttp): integration with `aiohttp`
- [tartiflette-asgi](https://github.com/tartiflette/tartiflette-asgi): integration with ASGI compatible HTTP servers
## Roadmaps
* [Milestone 1 _(Released)_](/docs/roadmaps/milestone-1.md)
* [Milestone 2 - **Work in progress**](/docs/roadmaps/milestone-2.md)
## How to contribute to the documentation?
As you may know, the documentation is hosted on https://tartiflette.io. This _fabulous_ website is built thanks to another amazing tool, [docusaurus](https://docusaurus.io/).
The content of the documentation is hosted in this repository, to be as close as possible to the code. You will find everything you need/want in the folder `/docs`.
### How to run the website locally?
We built a docker image for the documentation _(tartiflette/tartiflette.io on docker hub)_, which allow us to provide you an easy way to launch the documentation locally, without installing a specific version of node.
**prerequisite**:
- Docker
- Docker Compose
- Make
```bash
make run-docs
```
Every change you will make in the `/docs` folder will be automatically hot reloaded. :tada:
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Pythontartiflette-asyncio 的 SDL 优先的 GraphQL 引擎实现.zip (673个子文件)
setup.cfg 1KB
Dockerfile 189B
.dockerignore 76B
.editorconfig 325B
auth-directive-mutation-v1.gif 182KB
auth-directive-introspection-v1.gif 163KB
auth-directive.gif 110KB
ratelimiting.gif 109KB
subscription.gif 105KB
.gitignore 733B
.gitmodules 115B
github.graphql 220KB
schema.graphql 3KB
kitchen-sink.graphql 3KB
advanced.graphql 2KB
simple.graphql 851B
keyword-tokens.graphql 688B
post.graphql 175B
post.graphql 175B
post.graphql 175B
blog.graphql 128B
blog.graphql 128B
blog.graphql 128B
all_in_string_value.graphql 126B
unicode_char_3_string_value.graphql 88B
sentence_string_value.graphql 88B
unicode_char_2_string_value.graphql 88B
unicode_char_1_string_value.graphql 88B
author.graphql 86B
escaped_back_slash_string_value.graphql 84B
t_string_value.graphql 84B
escaped_quote_string_value.graphql 84B
n_string_value.graphql 84B
r_string_value.graphql 84B
b_string_value.graphql 84B
escaped_slash_string_value.graphql 84B
f_string_value.graphql 84B
single_word_string_value.graphql 79B
empty_string_value.graphql 69B
query.graphql 59B
MANIFEST.in 971B
graphql_sdl_grammar.lark 6KB
LICENSE 1KB
Makefile 1KB
engine.md 16KB
migration-guide-0-0-to-1-0.md 13KB
directive.md 10KB
getting-started.md 8KB
1.0.0.md 7KB
dynamic-introspection.md 7KB
rate-limit-fields-with-directives.md 6KB
add-subscription.md 5KB
project-initialization.md 5KB
subscription.md 5KB
README.md 5KB
extend-with-directives.md 5KB
write-your-resolvers.md 5KB
graphql-query-rules-supported.md 4KB
error-handling.md 4KB
CHANGELOG.md 4KB
type-resolver.md 4KB
resolver.md 3KB
scalar.md 3KB
create-server.md 3KB
CODE-OF-CONDUCT.md 3KB
1.2.0.md 3KB
write-your-mutation-resolvers.md 3KB
milestone-1.md 3KB
CONTRIBUTING.md 3KB
0.10.0.md 3KB
schema-registry.md 2KB
getting-started.md 2KB
what-is-tartiflette.md 2KB
0.3.0.md 2KB
1.3.0.md 2KB
0.11.0.md 1KB
1.4.0.md 1KB
running-a-query.md 1KB
ISSUE_TEMPLATE.md 1KB
execution.md 1KB
install-tartiflette.md 1KB
0.12.0.md 1KB
0.9.0.md 1KB
introduction.md 1KB
milestone-2.md 1KB
0.3.3.md 1KB
CONTRIBUTORS.md 1KB
currated-list.md 992B
0.1.8.md 928B
1.1.0.md 800B
running-a-subscription.md 747B
1.4.1.md 737B
running-a-mutation.md 703B
use-with-docker.md 697B
create-a-plugin.md 680B
0.7.0.md 653B
use-a-plugin.md 596B
PULL_REQUEST_TEMPLATE.md 576B
0.7.1.md 542B
graphql-query-rules-missing.md 528B
共 673 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
Unity打怪升级
- 粉丝: 1w+
- 资源: 208
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- TCP/IP网络层IP地址分类及应用解析
- AI演进之路:从机器学习到深度学习的关键概念与应用
- 助焊剂消减TC4钛合金焊接气孔的试验研究.pdf
- 铸钢件通用焊接工艺研究.pdf
- 专用汽车车架总成的焊接维修技术应用.pdf
- 铸造铝合金焊接裂纹分析.pdf
- 转向架构架箱形梁焊接温度场及应力场数值模拟分析.pdf
- 转移型等离子焊接枪电弧形态的数值模拟.pdf
- 装配式钢板箍焊接栓筋连接框架柱试验研究.pdf
- 装载机后车架大梁焊接顺序优化的数值模拟.pdf
- 锥形口罩耳带焊接工作台控制系统的设计.pdf
- 自动扶梯桁架焊接变形分析与控制纠正-.pdf
- 自动变光焊接面罩的使用和保养.pdf
- 自动tig管管焊在洁净管道焊接中的应用.pdf
- 自动焊技术在长输管道焊接中的应用.pdf
- 自动化焊接技术在大型不锈钢储罐中的全面应用.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功