A repository that contains all the examples that go with Mastering the Art of Data: FreshStream's Leap from REST to GraphQL
-
Install Poetry: Poetry is a Python dependency management tool. It handles setting up virtual environments and managing dependencies in Python projects. To install Poetry, you can use the following command in your terminal:
curl -sSL https://install.python-poetry.org | python -
For Windows users, you can use PowerShell to install Poetry:
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
First, clone this repository to your local machine using git clone.
Change your current working directory to the cloned repository's location.
Now you can install the dependencies for this project using Poetry. In the project's root directory, run:
poetry install
This command reads the pyproject.toml file included in the project, which contains all the dependencies that the project needs. Poetry will set up a new virtual environment and install everything automatically.
Activate the Poetry Shell: Once the dependencies are installed, activate the virtual environment that Poetry has created for your project:
poetry shell
Your prompt should change to indicate that you are in a new shell that Poetry has set up with the correct Python version and all the dependencies.
You're now ready to run the main Python scripts in the app directory.
cd app
python main.py