Skip to main content

GraphQL Engine for python

Project description


**Tartiflette** is a GraphQL Server implementation built with **Python 3.5+**.

**Tartiflette is not production ready, we are working on it heavily. [Feel free to join us to build Tartiflette](./docs/**

**[Take a look of our roadmap for v1](#roadmap---road-to-v1)**.


* Define the **GraphQL schema** with the brand new [SDL _(Schema Definition Language)_](
* **Performance oriented:** Performance is the core of our work.
* **Simple is better than complex:** Built with [the Zen of Python]( in mind. No over-engineering.


* [Usage](#usage)
* [Installation](#installation)
* [installation dependencies](#installation-dependencies)
* [Getting Started](./docs/
* [API](./docs/
* [Roadmap - Road to v1](#roadmap---road-to-v1)
* [Roadmap - Milestone 2](#roadmap---milestone-2)

## Usage

import asyncio

from tartiflette import Engine, Resolver

async def resolver_hello(parent, args, ctx, info):
return "hello " + args["name"]

async def run():
tftt_engine = Engine("""
type Query {
hello(name: String): String

result = await tftt_engine.execute(
query='query { hello(name: "Chuck") }'

# {'data': {'hello': 'hello Chuck'}}

if __name__ == "__main__":
loop = asyncio.get_event_loop()

## Installation

Tartiflette is available on [](

pip install tartiflette

### Installation dependencies

As Tartiflette based its Executor engine on *[libgraphqlparser](*. You'll need these following commands on your environment to use the library. `cmake`, `bison` and `flex`.

brew install cmake flex bison

apt-get install cmake flex bison

## Roadmap - Road to v1

Following on our experience in managing GraphQL APIs in production **for more than a year**, we've decided to build a brand new GraphQL Engine.

[Know more about the API.](docs/

Here are the subjects we are working on:

### Communication and documentation

* [x] Define Open Source guidelines (Contributing, Code of conduct, Issue Template, PR Template).
* [X] (API) Describe the API that will be used by the Tartiflette users.
* [x] (API) [Engine constructor](
* [X] (API) How to declare custom directives in the Engine Constructor.
* [X] (API) How to declare middleware on a resolver.
* [X] (API) Executor.
* [x] (API) Resolver.
* [x] (API) Resolver - `Info` parameter.
* [ ] (Website) Landing page for
* [ ] (Website) Expose documentation on

### Query Parser

* [x] Build communication interface between [libgraphqlparser]( & Tartiflette through [CFFI](
* [x] Build a `Parser` which parses a GraphQL Query and creates a list of Asynchronous Tasks.
* [x] Build an `Executor` which executes the Asynchronous Tasks list created by the `Parser`.

### Executor

* [x] Bind the Types specified in the SDL to the `Executor`.
* [x] Typing resolver outputs
* [x] Error management
* [X] Abstract and Compound Types: Interfaces
* [ ] Abstract and Compound Types: Unions
* [X] NodeDefinition: Check that the Type exists.
* [X] (Directive) Integrate the directive's execution in the Executor.
* [X] (Directive) introspection based on directive

### SDL - Schema Definition Language

* [x] Build a `Parser` which parse the [Schema Definition Language]( and created the associated schema and types as Python objects.
* [X] Think about custom Scalar API
* [x] (Introspection) Implement the `__type` Field.
* [x] (Introspection) Implement the `__schema`Field.
* [X] (Directive) Append directive informations _(from SDL)_ as metadata on Fields / Types.
* [X] (Directive) Implement the declaration of the custom directives into the Engine constructor.
* [X] (Directive) Implement @deprecated

### Continuous integration

* [x] Run Code Quality checks + Tests
* [x] Automatize the integration of `libgraphqlparser`
* [X] Build & Publish artifact to pypi

## Roadmap - Milestone 2

* [ ] Implement **[Apollo Cache Control](**
* [ ] Think about `subscriptions`

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
tartiflette-0.3.0.tar.gz (125.2 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page