Install Tartiflette package with pipenv
Tartiflette is available on pypi.org and you can install it with pip
or pipenv
. In this tutorial, we will use pipenv
as it embeds both the package management and the virtual environment.
Installation dependencies
As Tartiflette based its query parsing on libgraphqlparser
, you will need these following binaries in your environment to use the library: cmake
macOS:
brew install cmake
Ubuntu:
apt-get install cmake
Installation
Are you ready? We are now going to install Tartiflette!
In this tutorial, we want to expose our GraphQL API through HTTP. To build this API easily and quickly, we are going to use an HTTP integration of Tartiflette called tartiflette-aiohttp
.
# Create the virtual environment
pipenv --python 3.7
# Install tartiflette-aiohttp
pipenv install tartiflette-aiohttp
# Enter into the virtual environment
pipenv shell
It is now time to write your first Tartiflette code, the "Tartiflette recipes manager" is coming.