All Projects → tartiflette → Tartiflette

tartiflette / Tartiflette

Licence: mit
GraphQL Engine built with Python 3.6+ / asyncio

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Tartiflette

Graphql Core
A Python 3.6+ port of the GraphQL.js reference implementation of GraphQL.
Stars: ✭ 344 (-52.16%)
Mutual labels:  api, graphql, asyncio
Typegql
Create GraphQL schema with TypeScript classes.
Stars: ✭ 415 (-42.28%)
Mutual labels:  api, graphql
Django Restql
Turn your API made with Django REST Framework(DRF) into a GraphQL like API.
Stars: ✭ 396 (-44.92%)
Mutual labels:  api, graphql
Crudl
CRUDL is a backend agnostic REST and GraphQL based admin interface
Stars: ✭ 438 (-39.08%)
Mutual labels:  api, graphql
Wp Graphql Acf
WPGraphQL for Advanced Custom Fields
Stars: ✭ 358 (-50.21%)
Mutual labels:  api, graphql
Django Api Domains
A pragmatic styleguide for Django API Projects
Stars: ✭ 365 (-49.24%)
Mutual labels:  api, graphql
Grand Stack Starter
Simple starter project for GRANDstack full stack apps
Stars: ✭ 419 (-41.72%)
Mutual labels:  api, graphql
Askql
AskQL is a query language that can express any data request
Stars: ✭ 352 (-51.04%)
Mutual labels:  api, graphql
Apiv2 Graphql Docs
AniList API V2 GraphQL Documentation
Stars: ✭ 501 (-30.32%)
Mutual labels:  api, graphql
Graphql Dotnet
GraphQL for .NET
Stars: ✭ 5,031 (+599.72%)
Mutual labels:  api, graphql
Swell
Swell: API development tool that enables developers to test endpoints served over streaming technologies including Server-Sent Events (SSE), WebSockets, HTTP2, GraphQL, and gRPC.
Stars: ✭ 517 (-28.09%)
Mutual labels:  api, graphql
Figma Graphql
The reimagined Figma API (super)powered by GraphQL
Stars: ✭ 354 (-50.76%)
Mutual labels:  api, graphql
Railt
⚡️ A PHP GraphQL Framework
Stars: ✭ 353 (-50.9%)
Mutual labels:  graphql, sdl
Villus
🏎 A tiny and fast GraphQL client for Vue.js
Stars: ✭ 378 (-47.43%)
Mutual labels:  api, graphql
Absinthe
The GraphQL toolkit for Elixir
Stars: ✭ 3,805 (+429.21%)
Mutual labels:  api, graphql
Graphql Php
A PHP port of GraphQL reference implementation
Stars: ✭ 4,219 (+486.79%)
Mutual labels:  api, graphql
Wp Graphql Woocommerce
Add WooCommerce support and functionality to your WPGraphQL server
Stars: ✭ 318 (-55.77%)
Mutual labels:  api, graphql
Ethql
A GraphQL interface to Ethereum 🔥
Stars: ✭ 547 (-23.92%)
Mutual labels:  api, graphql
V8 Archive
Directus Database API — Wraps Custom SQL Databases with a REST/GraphQL API
Stars: ✭ 486 (-32.41%)
Mutual labels:  api, graphql
Rick And Morty Api
The Rick and Morty API
Stars: ✭ 542 (-24.62%)
Mutual labels:  api, graphql

Tartiflette

Tartiflette is a GraphQL Server implementation built with Python 3.6+.

Summary

Motivation

Read this blogpost about our motivations 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 is behind us, we are now on the road to the milestone 2.

DNA

Discover Tartiflette with our fabulous tutorial on https://tartiflette.io/docs/tutorial/getting-started

Usage

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__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(run())

More details on the API Documentation

Installation

Tartiflette is available on pypi.org.

pip install tartiflette

Installation dependencies

1.2.0+

As Tartiflette based its Executor engine on libgraphqlparser. You'll need these following commands on your environment to use the library. cmake

MacOSX

brew install cmake

Ubuntu

apt-get install cmake

Before 1.2.0

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.

MacOSX

brew install cmake flex bison

Ubuntu

apt-get install cmake flex bison

Make sure you have bison in version 3

Note to Mac OS users: Make sure bison in your path is really Bison 3, look here for details.

Tartiflette over HTTP

Discover our implementation of tartiflette over HTTP called tartiflette-aiohttp.

Overview

pip install tartiflette-aiohttp
from aiohttp import web
from tartiflette_aiohttp import register_graphql_handlers

sdl = """
    type Query {
        hello(name: String): String
    }
"""

ctx = {
    'user_service': user_service
}

web.run_app(
    register_graphql_handlers(
        app=web.Application(),
        engine_sdl=sdl,
        engine_schema_name="default",
        executor_context=ctx,
        executor_http_endpoint='/graphql',
        executor_http_methods=['POST', 'GET']
    )
)

Roadmaps

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.

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
make run-docs

Every change you will make in the /docs folder will be automatically hot reloaded. 🎉

Known issues

Badges

Quality gate Total alerts Language grade: Python

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].