This repository contains code related to the Real Python tutorial on building a front end for a REST API.
You should first create a virtual environment:
$ python -m venv venv
$ source venv/bin/activateInstall the pinned dependencies from requirements.txt:
(venv) $ python -m pip install -r requirements.txtThen you can navigate into the folder source_code_start/ and create a new database:
(venv) $ cd source_code_start
(venv) $ python init_database.pyThis will create or update the people.db database that you can use with your project.
After building the database, you can start the Flask server:
(venv) $ python app.pyWhen the Flask server is running, you can visit the front end on http://localhost:8000 and the API documentation on http://localhost:8000/api/ui.
- Philipp Acsany, E-mail: philipp@realpython.com
Distributed under the MIT license. See LICENSE for more information.