Install Tartiflette package from pipenv
Tartiflette is available on pypi.org and you can install it through pip or pipenv. In our tutorial, we would rather use "pipenv" as it embeds both the package management and the virtual environment management.
Installation dependencies
As Tartiflette based its executor engine on libgraphqlparser, you'll need these following binaries in your environment to use the library: cmake
, bison
and flex
.
MacOSX
brew install cmake flex bison
Ubuntu
apt-get install cmake flex bison
Installation
Are you ready? We are now going to install Tartiflette!
In our tutorial, we want to expose our GraphQL API through HTTP. To build this API easily and quickly, we're going to use the HTTP distribution of Tartiflette called tartiflette-aiohttp
.
# Create virtualenv
pipenv --python 3.7
# Install Tartiflette
pipenv install tartiflette-aiohttp
# Enter into the virtualenv
pipenv shell
It's now time to write your first Tartiflette code, the "Recipes Manager GraphQL API" is coming.