This repository holds the code for part one of the Real Python Python REST APIs With Flask, Connexion, and SQLAlchemy tutorial series.
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, navigate into the rp_flask_api/ folder and start the development web server:
(venv) $ cd rp_flask_api
(venv) $ python app.pyTo see your home page, visit http://127.0.0.1:8000. You can find the Swagger UI API documentation on http://127.0.0.1:8000/api/ui.
You can find the Flask Starter files in the flask_starter/ folder.
To use the Flask Starter, copy the flask_starter/ folder and rename it to your Flask project name. Open the terminal inside of your project folder, and create a virtual environment:
$ python -m venv venv
$ source venv/bin/activateYou can then install Flask with pip:
(venv) $ python -m pip install flaskYou can start your Flask development server by running app.py as a script:
(venv) $ python app.pyTo see your home page, visit http://127.0.0.1:8000.
- Philipp Acsany, E-mail: philipp@realpython.com
Distributed under the MIT license. See LICENSE for more information.