├── .flake8 ├── .github └── workflows │ └── algolia-scraper.yml ├── .gitignore ├── .gitmodules ├── .python-version ├── .templates ├── lecture.md └── section.md ├── CONTRIBUTING.md ├── Course Links.xlsx ├── README.md ├── Section 12 └── resources │ ├── REST_S12-01-send-emails-python-mailgun-section-start-code.zip │ └── REST_S12-07-deploy-to-render-section-end-code.zip ├── Section 3 └── resources │ └── REST-S03-08_get_store_and_items-app.py ├── Section 5 └── resources │ ├── REST-S05_02-data-model-improvements-start.zip │ └── REST-S05_09-decorating-responses-marshmallow-section-end-code.zip ├── Section 6 └── resources │ ├── REST-S06_02-creating-sqlalchemy-models-section-start-code.zip │ └── REST-S06_10-cascading-deletes-section-end-code.zip ├── Section 7 └── resources │ ├── REST-S07_02-tags-and-stores-section-start-code.zip │ └── REST-S07_03-tags-and-items-section-end-code.zip ├── Section 8 └── resources │ ├── REST-S08_03-how-jwts-are-used-section-start-code.zip │ └── REST-S08_12-token_refreshing-section-end-code.zip ├── Section 9 └── resources │ ├── REST-S09_02-add-flask-migrate-flask-section-start-code.zip │ └── REST-S09_04-change-models-and-migrate-section-end-code.zip ├── assets ├── course-image.png └── download-repo-zip.png ├── dependabot.yml ├── docs ├── .gitignore ├── README.md ├── algolia.config.json ├── babel.config.js ├── docs │ ├── 01_course_intro │ │ ├── 01_curriculum_overview │ │ │ └── README.md │ │ ├── 02_how_to_install_python │ │ │ └── README.md │ │ ├── 03_how_to_install_ide │ │ │ └── README.md │ │ ├── 04_what_is_rest_api │ │ │ └── README.md │ │ ├── _category_.json │ │ └── index.md │ ├── 02_python_refresher │ │ ├── _category_.json │ │ └── index.md │ ├── 03_first_rest_api │ │ ├── 01_project_overview │ │ │ └── README.md │ │ ├── 02_getting_set_up │ │ │ └── README.md │ │ ├── 03_first_rest_api_endpoint │ │ │ └── README.md │ │ ├── 04_what_is_json │ │ │ └── README.md │ │ ├── 05_make_request_to_rest_api │ │ │ ├── README.md │ │ │ └── assets │ │ │ │ ├── after-pressing-send.png │ │ │ │ ├── before-setting-url.png │ │ │ │ ├── creating-project.png │ │ │ │ ├── making-request-collection.png │ │ │ │ ├── making-request.png │ │ │ │ ├── set-request-name-and-method.png │ │ │ │ └── url-set.png │ │ ├── 06_creating_stores │ │ │ └── README.md │ │ ├── 07_creating_items │ │ │ └── README.md │ │ ├── 08_return_data_from_rest_api │ │ │ └── README.md │ │ ├── 09_final_code │ │ │ ├── README.md │ │ │ └── end │ │ │ │ └── app.py │ │ ├── Insomnia_section3.json │ │ └── _category_.json │ ├── 04_docker_intro │ │ ├── 01_what_is_docker_container │ │ │ ├── README.md │ │ │ ├── assets │ │ │ │ ├── docker-linux.drawio.png │ │ │ │ └── vm.drawio.png │ │ │ └── docker-presentation.key │ │ ├── 02_run_docker_container │ │ │ ├── README.md │ │ │ ├── assets │ │ │ │ └── running-app-docker.png │ │ │ ├── end │ │ │ │ ├── Dockerfile │ │ │ │ └── app.py │ │ │ └── start │ │ │ │ └── app.py │ │ ├── 02_what_is_docker_image │ │ │ └── README.md │ │ ├── 03_in_depth_docker_tutorial │ │ │ └── README.md │ │ ├── 03_run_docker_container │ │ │ ├── README.md │ │ │ └── assets │ │ │ │ └── running-app-docker.png │ │ ├── 04_in_depth_docker_tutorial │ │ │ └── README.md │ │ ├── 04_run_with_docker_compose │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ └── docker-compose.yml │ │ │ └── start │ │ │ │ ├── Dockerfile │ │ │ │ └── app.py │ │ ├── README.md │ │ └── _category_.json │ ├── 05_flask_smorest │ │ ├── 01_why_flask_smorest │ │ │ └── README.md │ │ ├── 02_data_model_improvements │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ └── requirements.txt │ │ │ └── start │ │ │ │ ├── Dockerfile │ │ │ │ └── app.py │ │ ├── 03_improvements_on_first_rest_api │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ └── requirements.txt │ │ │ └── start │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ └── requirements.txt │ │ ├── 04_new_endpoints_for_api │ │ │ ├── README.md │ │ │ ├── assets │ │ │ │ └── build-with-without-volume.png │ │ │ ├── end │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ └── requirements.txt │ │ │ └── start │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ └── requirements.txt │ │ ├── 05_reload_api_docker_container │ │ │ ├── README.md │ │ │ ├── assets │ │ │ │ └── build-with-without-volume.png │ │ │ ├── end │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ └── requirements.txt │ │ │ └── start │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ └── requirements.txt │ │ ├── 06_api_with_method_views │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── requirements.txt │ │ │ │ └── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ └── start │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ └── requirements.txt │ │ ├── 07_marshmallow_schemas │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── requirements.txt │ │ │ │ └── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ ├── 08_validation_with_marshmallow │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ ├── 09_decorating_responses │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ ├── Insomnia_section5_Docker.json │ │ ├── Insomnia_section5_before_Docker.json │ │ └── _category_.json │ ├── 06_sql_storage_sqlalchemy │ │ ├── 01_project_overview_sqlalchemy │ │ │ └── README.md │ │ ├── 02_create_simple_sqlalchemy_model │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ ├── 03_one_to_many_relationships_sqlalchemy │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ ├── 04_configure_flask_sqlalchemy │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ ├── 05_insert_models_sqlalchemy │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ ├── 06_get_models_or_404 │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ ├── 07_updating_models_sqlalchemy │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ ├── 08_retrieve_list_all_models │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ ├── 09_delete_models_sqlalchemy │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ ├── 10_delete_related_models_sqlalchemy │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ ├── 11_conclusion │ │ │ └── README.md │ │ ├── Insomnia_section6.json │ │ └── _category_.json │ ├── 07_sqlalchemy_many_to_many │ │ ├── 01_section_changes │ │ │ ├── README.md │ │ │ └── assets │ │ │ │ └── db_model.drawio.png │ │ ├── 02_one_to_many_review │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ └── tag.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ └── tag.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ └── store.py │ │ │ │ └── schemas.py │ │ ├── 03_many_to_many_relationships │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── conftest.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ └── tag.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ └── tag.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ └── tag.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ └── tag.py │ │ │ │ └── schemas.py │ │ ├── Insomnia_section7.json │ │ └── _category_.json │ ├── 08_flask_jwt_extended │ │ ├── 01_section_changes │ │ │ └── README.md │ │ ├── 02_what_is_a_jwt │ │ │ └── README.md │ │ ├── 03_how_is_jwt_used │ │ │ ├── README.md │ │ │ ├── assets │ │ │ │ ├── access-token-flow.drawio.png │ │ │ │ └── my-info-flow.drawio.png │ │ │ └── how-are-jwts-used.key │ │ ├── 04_flask_jwt_extended_setup │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flake8 │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── conftest.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ └── tag.py │ │ │ │ ├── requirements-dev.txt │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __tests__ │ │ │ │ │ │ ├── conftest.py │ │ │ │ │ │ ├── test_item.py │ │ │ │ │ │ ├── test_store.py │ │ │ │ │ │ └── test_tag.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ └── tag.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flake8 │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── conftest.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── item_tags.py │ │ │ │ ├── store.py │ │ │ │ └── tag.py │ │ │ │ ├── requirements-dev.txt │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── __tests__ │ │ │ │ │ ├── conftest.py │ │ │ │ │ ├── test_item.py │ │ │ │ │ ├── test_store.py │ │ │ │ │ └── test_tag.py │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ └── tag.py │ │ │ │ └── schemas.py │ │ ├── 05_user_model_and_schema │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flake8 │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── conftest.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── requirements-dev.txt │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __tests__ │ │ │ │ │ │ ├── conftest.py │ │ │ │ │ │ ├── test_item.py │ │ │ │ │ │ ├── test_store.py │ │ │ │ │ │ └── test_tag.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ └── tag.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flake8 │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── conftest.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── item_tags.py │ │ │ │ ├── store.py │ │ │ │ └── tag.py │ │ │ │ ├── requirements-dev.txt │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── __tests__ │ │ │ │ │ ├── conftest.py │ │ │ │ │ ├── test_item.py │ │ │ │ │ ├── test_store.py │ │ │ │ │ └── test_tag.py │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ └── tag.py │ │ │ │ └── schemas.py │ │ ├── 06_registering_users_rest_api │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flake8 │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── conftest.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── requirements-dev.txt │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __tests__ │ │ │ │ │ │ ├── conftest.py │ │ │ │ │ │ ├── test_item.py │ │ │ │ │ │ ├── test_store.py │ │ │ │ │ │ ├── test_tag.py │ │ │ │ │ │ └── test_user.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flake8 │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── conftest.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── item_tags.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ ├── requirements-dev.txt │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── __tests__ │ │ │ │ │ ├── conftest.py │ │ │ │ │ ├── test_item.py │ │ │ │ │ ├── test_store.py │ │ │ │ │ └── test_tag.py │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ └── tag.py │ │ │ │ └── schemas.py │ │ ├── 07_login_users_rest_api │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flake8 │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── conftest.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── requirements-dev.txt │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __tests__ │ │ │ │ │ │ ├── conftest.py │ │ │ │ │ │ ├── test_item.py │ │ │ │ │ │ ├── test_store.py │ │ │ │ │ │ ├── test_tag.py │ │ │ │ │ │ └── test_user.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flake8 │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── conftest.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── item_tags.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ ├── requirements-dev.txt │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── __tests__ │ │ │ │ │ ├── conftest.py │ │ │ │ │ ├── test_item.py │ │ │ │ │ ├── test_store.py │ │ │ │ │ ├── test_tag.py │ │ │ │ │ └── test_user.py │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ ├── 08_protect_resources_with_jwt_required │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flake8 │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── conftest.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── requirements-dev.txt │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __tests__ │ │ │ │ │ │ ├── conftest.py │ │ │ │ │ │ ├── test_item.py │ │ │ │ │ │ ├── test_store.py │ │ │ │ │ │ ├── test_tag.py │ │ │ │ │ │ └── test_user.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flake8 │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── conftest.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── item_tags.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ ├── requirements-dev.txt │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── __tests__ │ │ │ │ │ ├── conftest.py │ │ │ │ │ ├── test_item.py │ │ │ │ │ ├── test_store.py │ │ │ │ │ ├── test_tag.py │ │ │ │ │ └── test_user.py │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ ├── 09_jwt_claims_and_authorization │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flake8 │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── conftest.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── requirements-dev.txt │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __tests__ │ │ │ │ │ │ ├── conftest.py │ │ │ │ │ │ ├── test_item.py │ │ │ │ │ │ ├── test_store.py │ │ │ │ │ │ ├── test_tag.py │ │ │ │ │ │ └── test_user.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flake8 │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── conftest.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── item_tags.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ ├── requirements-dev.txt │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── __tests__ │ │ │ │ │ ├── conftest.py │ │ │ │ │ ├── test_item.py │ │ │ │ │ ├── test_store.py │ │ │ │ │ ├── test_tag.py │ │ │ │ │ └── test_user.py │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ ├── 10_logout_users_rest_api │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flake8 │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── conftest.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── requirements-dev.txt │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __tests__ │ │ │ │ │ │ ├── conftest.py │ │ │ │ │ │ ├── test_item.py │ │ │ │ │ │ ├── test_store.py │ │ │ │ │ │ ├── test_tag.py │ │ │ │ │ │ └── test_user.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flake8 │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── conftest.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── item_tags.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ ├── requirements-dev.txt │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── __tests__ │ │ │ │ │ ├── conftest.py │ │ │ │ │ ├── test_item.py │ │ │ │ │ ├── test_store.py │ │ │ │ │ ├── test_tag.py │ │ │ │ │ └── test_user.py │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ ├── 11_insomnia_request_chaining │ │ │ ├── README.md │ │ │ └── assets │ │ │ │ ├── attributes.png │ │ │ │ ├── base_environment.png │ │ │ │ ├── bearer_token.png │ │ │ │ ├── environment.png │ │ │ │ ├── error.png │ │ │ │ ├── filled_out.png │ │ │ │ ├── modal.png │ │ │ │ ├── result.png │ │ │ │ └── token.png │ │ ├── 12_token_refreshing_flask_jwt_extended │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flake8 │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── conftest.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── requirements-dev.txt │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __tests__ │ │ │ │ │ │ ├── conftest.py │ │ │ │ │ │ ├── test_item.py │ │ │ │ │ │ ├── test_store.py │ │ │ │ │ │ ├── test_tag.py │ │ │ │ │ │ └── test_user.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ │ ├── end_video │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flake8 │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── conftest.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── item_tags.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ ├── requirements-dev.txt │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── __tests__ │ │ │ │ │ ├── conftest.py │ │ │ │ │ ├── test_item.py │ │ │ │ │ ├── test_store.py │ │ │ │ │ ├── test_tag.py │ │ │ │ │ └── test_user.py │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ ├── Insomnia_section8_before_chaining.json │ │ ├── Insomnia_section8_chaining.json │ │ └── _category_.json │ ├── 09_flask_migrate │ │ ├── 01_why_use_database_migrations │ │ │ └── README.md │ │ ├── 02_add_flask_migrate_to_app │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── item_tags.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ ├── 03_initialize_database_flask_db_init │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flaskenv │ │ │ │ ├── .python-version │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── migrations │ │ │ │ │ ├── README │ │ │ │ │ ├── alembic.ini │ │ │ │ │ ├── env.py │ │ │ │ │ ├── script.py.mako │ │ │ │ │ └── versions │ │ │ │ │ │ └── c575166f6192_.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flaskenv │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── item_tags.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ ├── 04_change_models_generate_alembic_migration │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flaskenv │ │ │ │ ├── .python-version │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── migrations │ │ │ │ │ ├── README │ │ │ │ │ ├── alembic.ini │ │ │ │ │ ├── env.py │ │ │ │ │ ├── script.py.mako │ │ │ │ │ └── versions │ │ │ │ │ │ ├── bcc005bc255c_.py │ │ │ │ │ │ └── c575166f6192_.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .dockerignore │ │ │ │ ├── .flaskenv │ │ │ │ ├── .python-version │ │ │ │ ├── Dockerfile │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── migrations │ │ │ │ ├── README │ │ │ │ ├── alembic.ini │ │ │ │ ├── env.py │ │ │ │ ├── script.py.mako │ │ │ │ └── versions │ │ │ │ │ └── c575166f6192_.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── item_tags.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ ├── 05_manually_review_modify_migrations │ │ │ └── README.md │ │ └── _category_.json │ ├── 10_git_crash_course │ │ ├── README.md │ │ └── _category_.json │ ├── 11_deploy_to_render │ │ ├── 01_section_overview │ │ │ └── README.md │ │ ├── 02_create_render_web_service │ │ │ ├── README.md │ │ │ └── assets │ │ │ │ ├── deploy-latest-commit.png │ │ │ │ ├── insomnia-test-prod.png │ │ │ │ ├── render-deploy-finished.png │ │ │ │ ├── render-deploy-screen.png │ │ │ │ ├── render-github-connect.png │ │ │ │ └── render-service-config.png │ │ ├── 03_docker_with_gunicorn │ │ │ └── README.md │ │ ├── 04_deploy_postgresql_database │ │ │ ├── README.md │ │ │ └── assets │ │ │ │ ├── copy-elephantsql-url.png │ │ │ │ └── select-plan-and-name-elephantsql.png │ │ ├── 05_environment_variables_and_migrations │ │ │ ├── README.md │ │ │ └── assets │ │ │ │ ├── render-add-env-var.png │ │ │ │ └── render-database-url-env-var.png │ │ ├── 06_run_everything_docker_compose │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .env.example │ │ │ │ ├── .flaskenv │ │ │ │ ├── .gitignore │ │ │ │ ├── Dockerfile │ │ │ │ ├── README.md │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── docker-compose.yml │ │ │ │ ├── docker-entrypoint.sh │ │ │ │ ├── migrations │ │ │ │ │ ├── README │ │ │ │ │ ├── alembic.ini │ │ │ │ │ ├── env.py │ │ │ │ │ ├── script.py.mako │ │ │ │ │ └── versions │ │ │ │ │ │ ├── 07006e31e788_.py │ │ │ │ │ │ ├── 8ca023a4a4b0_.py │ │ │ │ │ │ └── bb5da1e68550_.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .env.example │ │ │ │ ├── .flaskenv │ │ │ │ ├── .gitignore │ │ │ │ ├── Dockerfile │ │ │ │ ├── README.md │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── docker-entrypoint.sh │ │ │ │ ├── migrations │ │ │ │ ├── README │ │ │ │ ├── alembic.ini │ │ │ │ ├── env.py │ │ │ │ ├── script.py.mako │ │ │ │ └── versions │ │ │ │ │ ├── 07006e31e788_.py │ │ │ │ │ ├── 8ca023a4a4b0_.py │ │ │ │ │ └── bb5da1e68550_.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── item_tags.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ ├── Insomnia_section11.json │ │ └── _category_.json │ ├── 12_task_queues_emails │ │ ├── 01_send_emails_python_mailgun │ │ │ ├── README.md │ │ │ ├── assets │ │ │ │ └── mailgun-api-key.png │ │ │ ├── end │ │ │ │ ├── .env.example │ │ │ │ ├── .flaskenv │ │ │ │ ├── .gitignore │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── Dockerfile │ │ │ │ ├── README.md │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── docker-entrypoint.sh │ │ │ │ ├── migrations │ │ │ │ │ ├── README │ │ │ │ │ ├── alembic.ini │ │ │ │ │ ├── env.py │ │ │ │ │ ├── script.py.mako │ │ │ │ │ └── versions │ │ │ │ │ │ ├── 07006e31e788_.py │ │ │ │ │ │ ├── 8ca023a4a4b0_.py │ │ │ │ │ │ └── bb5da1e68550_.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .env.example │ │ │ │ ├── .flaskenv │ │ │ │ ├── .gitignore │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── Dockerfile │ │ │ │ ├── README.md │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── docker-entrypoint.sh │ │ │ │ ├── migrations │ │ │ │ ├── README │ │ │ │ ├── alembic.ini │ │ │ │ ├── env.py │ │ │ │ ├── script.py.mako │ │ │ │ └── versions │ │ │ │ │ ├── 07006e31e788_.py │ │ │ │ │ ├── 8ca023a4a4b0_.py │ │ │ │ │ └── bb5da1e68550_.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── item_tags.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ ├── 02_send_email_user_registration │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .env.example │ │ │ │ ├── .flaskenv │ │ │ │ ├── .gitignore │ │ │ │ ├── .python-version │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── Dockerfile │ │ │ │ ├── README.md │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── docker-entrypoint.sh │ │ │ │ ├── migrations │ │ │ │ │ ├── README │ │ │ │ │ ├── alembic.ini │ │ │ │ │ ├── env.py │ │ │ │ │ ├── script.py.mako │ │ │ │ │ └── versions │ │ │ │ │ │ ├── 07006e31e788_.py │ │ │ │ │ │ ├── 8ca023a4a4b0_.py │ │ │ │ │ │ ├── bb5da1e68550_.py │ │ │ │ │ │ └── d8e0f80631fb_.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ │ └── start │ │ │ │ ├── .env.example │ │ │ │ ├── .flaskenv │ │ │ │ ├── .gitignore │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── Dockerfile │ │ │ │ ├── README.md │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── docker-entrypoint.sh │ │ │ │ ├── migrations │ │ │ │ ├── README │ │ │ │ ├── alembic.ini │ │ │ │ ├── env.py │ │ │ │ ├── script.py.mako │ │ │ │ └── versions │ │ │ │ │ ├── 07006e31e788_.py │ │ │ │ │ ├── 8ca023a4a4b0_.py │ │ │ │ │ └── bb5da1e68550_.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── item_tags.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ ├── 03_what_is_task_queue │ │ │ ├── README.md │ │ │ └── assets │ │ │ │ ├── queues.drawio.png │ │ │ │ └── render-redis-allowing-outside.png │ │ ├── 04_populate_rq_task_queue │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .env.example │ │ │ │ ├── .flaskenv │ │ │ │ ├── .gitignore │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── Dockerfile │ │ │ │ ├── README.md │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── docker-entrypoint.sh │ │ │ │ ├── migrations │ │ │ │ │ ├── README │ │ │ │ │ ├── alembic.ini │ │ │ │ │ ├── env.py │ │ │ │ │ ├── script.py.mako │ │ │ │ │ └── versions │ │ │ │ │ │ ├── 07006e31e788_.py │ │ │ │ │ │ ├── 8ca023a4a4b0_.py │ │ │ │ │ │ ├── bb5da1e68550_.py │ │ │ │ │ │ └── d8e0f80631fb_.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── schemas.py │ │ │ │ └── tasks.py │ │ │ └── start │ │ │ │ ├── .env.example │ │ │ │ ├── .flaskenv │ │ │ │ ├── .gitignore │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── Dockerfile │ │ │ │ ├── README.md │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── docker-entrypoint.sh │ │ │ │ ├── migrations │ │ │ │ ├── README │ │ │ │ ├── alembic.ini │ │ │ │ ├── env.py │ │ │ │ ├── script.py.mako │ │ │ │ └── versions │ │ │ │ │ ├── 07006e31e788_.py │ │ │ │ │ ├── 8ca023a4a4b0_.py │ │ │ │ │ ├── bb5da1e68550_.py │ │ │ │ │ └── d8e0f80631fb_.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── item_tags.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ └── schemas.py │ │ ├── 05_rq_background_worker │ │ │ ├── README.md │ │ │ ├── end │ │ │ │ ├── .env.example │ │ │ │ ├── .flaskenv │ │ │ │ ├── .gitignore │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── Dockerfile │ │ │ │ ├── README.md │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── docker-entrypoint.sh │ │ │ │ ├── migrations │ │ │ │ │ ├── README │ │ │ │ │ ├── alembic.ini │ │ │ │ │ ├── env.py │ │ │ │ │ ├── script.py.mako │ │ │ │ │ └── versions │ │ │ │ │ │ ├── 07006e31e788_.py │ │ │ │ │ │ ├── 8ca023a4a4b0_.py │ │ │ │ │ │ ├── bb5da1e68550_.py │ │ │ │ │ │ └── d8e0f80631fb_.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── schemas.py │ │ │ │ └── tasks.py │ │ │ └── start │ │ │ │ ├── .env.example │ │ │ │ ├── .flaskenv │ │ │ │ ├── .gitignore │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── Dockerfile │ │ │ │ ├── README.md │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── docker-entrypoint.sh │ │ │ │ ├── migrations │ │ │ │ ├── README │ │ │ │ ├── alembic.ini │ │ │ │ ├── env.py │ │ │ │ ├── script.py.mako │ │ │ │ └── versions │ │ │ │ │ ├── 07006e31e788_.py │ │ │ │ │ ├── 8ca023a4a4b0_.py │ │ │ │ │ ├── bb5da1e68550_.py │ │ │ │ │ └── d8e0f80631fb_.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── item_tags.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ ├── schemas.py │ │ │ │ └── tasks.py │ │ ├── 06_sending_html_emails │ │ │ ├── README.md │ │ │ ├── assets │ │ │ │ └── html-email.png │ │ │ ├── end │ │ │ │ ├── .env.example │ │ │ │ ├── .flaskenv │ │ │ │ ├── .gitignore │ │ │ │ ├── .python-version │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── Dockerfile │ │ │ │ ├── README.md │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── docker-entrypoint.sh │ │ │ │ ├── migrations │ │ │ │ │ ├── README │ │ │ │ │ ├── alembic.ini │ │ │ │ │ ├── env.py │ │ │ │ │ ├── script.py.mako │ │ │ │ │ └── versions │ │ │ │ │ │ ├── 07006e31e788_.py │ │ │ │ │ │ ├── 8ca023a4a4b0_.py │ │ │ │ │ │ ├── bb5da1e68550_.py │ │ │ │ │ │ └── d8e0f80631fb_.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── schemas.py │ │ │ │ ├── tasks.py │ │ │ │ └── templates │ │ │ │ │ └── email │ │ │ │ │ ├── action.html │ │ │ │ │ ├── action.original.html │ │ │ │ │ ├── registration.html │ │ │ │ │ └── registration.original.html │ │ │ └── start │ │ │ │ ├── .env.example │ │ │ │ ├── .flaskenv │ │ │ │ ├── .gitignore │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── Dockerfile │ │ │ │ ├── README.md │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── docker-entrypoint.sh │ │ │ │ ├── migrations │ │ │ │ ├── README │ │ │ │ ├── alembic.ini │ │ │ │ ├── env.py │ │ │ │ ├── script.py.mako │ │ │ │ └── versions │ │ │ │ │ ├── 07006e31e788_.py │ │ │ │ │ ├── 8ca023a4a4b0_.py │ │ │ │ │ ├── bb5da1e68550_.py │ │ │ │ │ └── d8e0f80631fb_.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── item_tags.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ ├── schemas.py │ │ │ │ └── tasks.py │ │ ├── 07_deploy_background_worker_render │ │ │ ├── README.md │ │ │ ├── assets │ │ │ │ ├── render-bg-worker-basic-settings.png │ │ │ │ ├── render-bg-worker-docker-command.png │ │ │ │ ├── render-bg-worker-env-vars.png │ │ │ │ └── render-create-bg-worker.png │ │ │ ├── end │ │ │ │ ├── .env.example │ │ │ │ ├── .flaskenv │ │ │ │ ├── .gitignore │ │ │ │ ├── .python-version │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── Dockerfile │ │ │ │ ├── README.md │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── docker-entrypoint.sh │ │ │ │ ├── migrations │ │ │ │ │ ├── README │ │ │ │ │ ├── alembic.ini │ │ │ │ │ ├── env.py │ │ │ │ │ ├── script.py.mako │ │ │ │ │ └── versions │ │ │ │ │ │ ├── 07006e31e788_.py │ │ │ │ │ │ ├── 8ca023a4a4b0_.py │ │ │ │ │ │ ├── bb5da1e68550_.py │ │ │ │ │ │ └── d8e0f80631fb_.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── item.py │ │ │ │ │ ├── item_tags.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ │ ├── item.py │ │ │ │ │ ├── store.py │ │ │ │ │ ├── tag.py │ │ │ │ │ └── user.py │ │ │ │ ├── schemas.py │ │ │ │ ├── settings.py │ │ │ │ ├── tasks.py │ │ │ │ └── templates │ │ │ │ │ └── email │ │ │ │ │ ├── action.html │ │ │ │ │ ├── action.original.html │ │ │ │ │ ├── registration.html │ │ │ │ │ └── registration.original.html │ │ │ └── start │ │ │ │ ├── .env.example │ │ │ │ ├── .flaskenv │ │ │ │ ├── .gitignore │ │ │ │ ├── .python-version │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── Dockerfile │ │ │ │ ├── README.md │ │ │ │ ├── app.py │ │ │ │ ├── blocklist.py │ │ │ │ ├── db.py │ │ │ │ ├── docker-entrypoint.sh │ │ │ │ ├── migrations │ │ │ │ ├── README │ │ │ │ ├── alembic.ini │ │ │ │ ├── env.py │ │ │ │ ├── script.py.mako │ │ │ │ └── versions │ │ │ │ │ ├── 07006e31e788_.py │ │ │ │ │ ├── 8ca023a4a4b0_.py │ │ │ │ │ ├── bb5da1e68550_.py │ │ │ │ │ └── d8e0f80631fb_.py │ │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── item.py │ │ │ │ ├── item_tags.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ ├── requirements.txt │ │ │ │ ├── resources │ │ │ │ ├── item.py │ │ │ │ ├── store.py │ │ │ │ ├── tag.py │ │ │ │ └── user.py │ │ │ │ ├── schemas.py │ │ │ │ ├── tasks.py │ │ │ │ └── templates │ │ │ │ └── email │ │ │ │ ├── action.html │ │ │ │ ├── action.original.html │ │ │ │ ├── registration.html │ │ │ │ └── registration.original.html │ │ ├── Insomnia_section12.json │ │ └── _category_.json │ └── Insomnia_all_sections.json ├── docusaurus.config.js ├── package-lock.json ├── package.json ├── sidebars.js ├── src │ ├── components │ │ ├── HomepageFeatures │ │ │ ├── index.js │ │ │ └── styles.module.css │ │ ├── LockedVideoEmbed │ │ │ ├── background.png │ │ │ └── index.js │ │ └── VideoEmbed │ │ │ └── index.js │ ├── css │ │ └── custom.css │ └── pages │ │ ├── assets │ │ ├── in-import-all-sections-file-select.png │ │ ├── in-import-all-sections-success.png │ │ ├── in-import-file-select.png │ │ ├── in-import-file.png │ │ ├── in-import-success.png │ │ └── in-section-import-s03.png │ │ ├── index.js │ │ ├── index.module.css │ │ └── insomnia-files.md └── static │ └── img │ ├── cloud-download.svg │ ├── favicon.ico │ ├── folder-closed.svg │ ├── folder-open.svg │ ├── product-dev.svg │ ├── robot-coding.svg │ ├── undraw_docusaurus_mountain.svg │ ├── undraw_docusaurus_react.svg │ └── undraw_docusaurus_tree.svg ├── package-lock.json └── project ├── 01-first-rest-api └── app.py ├── 02-first-rest-api-docker ├── Dockerfile └── app.py ├── 03-items-stores-smorest ├── .flaskenv ├── Dockerfile ├── app.py ├── db.py ├── requirements.txt ├── resources │ ├── __init__.py │ ├── item.py │ └── store.py └── schemas.py ├── 04-items-stores-smorest-sqlalchemy ├── .flaskenv ├── Dockerfile ├── app.py ├── db.py ├── models │ ├── __init__.py │ ├── item.py │ └── store.py ├── requirements.txt ├── resources │ ├── __init__.py │ ├── item.py │ └── store.py └── schemas.py ├── 05-add-many-to-many ├── .flaskenv ├── Dockerfile ├── app.py ├── conftest.py ├── db.py ├── models │ ├── __init__.py │ ├── item.py │ ├── item_tags.py │ ├── store.py │ └── tag.py ├── requirements.txt ├── resources │ ├── __init__.py │ ├── __tests__ │ │ ├── conftest.py │ │ ├── test_item.py │ │ ├── test_store.py │ │ └── test_tag.py │ ├── item.py │ ├── store.py │ └── tag.py └── schemas.py ├── 06-add-db-migrations ├── .flaskenv ├── .python-version ├── Dockerfile ├── app.py ├── conftest.py ├── db.py ├── migrations │ ├── README │ ├── alembic.ini │ ├── env.py │ ├── script.py.mako │ └── versions │ │ ├── 5acd69659946_.py │ │ └── a40bdfbd7a9d_.py ├── models │ ├── __init__.py │ ├── item.py │ ├── item_tags.py │ ├── store.py │ └── tag.py ├── requirements.txt ├── resources │ ├── __init__.py │ ├── __tests__ │ │ ├── conftest.py │ │ ├── test_item.py │ │ ├── test_store.py │ │ └── test_tag.py │ ├── item.py │ ├── store.py │ └── tag.py └── schemas.py ├── using-flask-restful ├── .flaskenv ├── Flask-JWT-Extended.postman_collection.json ├── Stores_REST_API_2022-01-14.json ├── app.py ├── blocklist.py ├── db.py ├── models │ ├── __init__.py │ ├── item.py │ ├── item_tags.py │ ├── store.py │ ├── tag.py │ └── user.py ├── requirements.txt └── resources │ ├── __init__.py │ ├── item.py │ ├── store.py │ ├── tag.py │ └── user.py ├── using-flask-restx ├── .flaskenv ├── Flask-JWT-Extended.postman_collection.json ├── Stores_REST_API_2022-01-14.json ├── app.py ├── blocklist.py ├── db.py ├── models │ ├── __init__.py │ ├── item.py │ ├── item_tags.py │ ├── store.py │ ├── tag.py │ └── user.py ├── requirements.txt └── resources │ ├── __init__.py │ ├── item.py │ ├── store.py │ ├── tag.py │ └── user.py └── using-flask-smorest ├── .flaskenv ├── Flask-JWT-Extended.postman_collection.json ├── Stores_REST_API_2022-01-14.json ├── app.py ├── blocklist.py ├── db.py ├── models ├── __init__.py ├── item.py ├── item_tags.py ├── store.py ├── tag.py └── user.py ├── requirements.txt ├── resources ├── __init__.py ├── item.py ├── store.py ├── tag.py └── user.py └── schemas.py /.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length = 88 3 | exclude = .git,__pycache__ 4 | max-complexity = 10 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/ 2 | *.pyc 3 | .idea/ 4 | __pycache__/ 5 | *.db 6 | .DS_Store 7 | venv/ 8 | .venv/ 9 | docs/docs/.nota/config.ini 10 | section-start-code.zip 11 | section-end-code.zip -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Flask-Smorest Docker"] 2 | path = project/using-flask-smorest-docker 3 | url = https://github.com/tecladocode/rest-api-smorest-docker -------------------------------------------------------------------------------- /.python-version: -------------------------------------------------------------------------------- 1 | 3.10.0 2 | -------------------------------------------------------------------------------- /.templates/section.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "Section name here" 3 | --- 4 | 5 | # Section name here 6 | 7 | Description of the section goes here. -------------------------------------------------------------------------------- /Course Links.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/Course Links.xlsx -------------------------------------------------------------------------------- /Section 12/resources/REST_S12-01-send-emails-python-mailgun-section-start-code.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/Section 12/resources/REST_S12-01-send-emails-python-mailgun-section-start-code.zip -------------------------------------------------------------------------------- /Section 12/resources/REST_S12-07-deploy-to-render-section-end-code.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/Section 12/resources/REST_S12-07-deploy-to-render-section-end-code.zip -------------------------------------------------------------------------------- /Section 5/resources/REST-S05_02-data-model-improvements-start.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/Section 5/resources/REST-S05_02-data-model-improvements-start.zip -------------------------------------------------------------------------------- /Section 5/resources/REST-S05_09-decorating-responses-marshmallow-section-end-code.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/Section 5/resources/REST-S05_09-decorating-responses-marshmallow-section-end-code.zip -------------------------------------------------------------------------------- /Section 6/resources/REST-S06_02-creating-sqlalchemy-models-section-start-code.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/Section 6/resources/REST-S06_02-creating-sqlalchemy-models-section-start-code.zip -------------------------------------------------------------------------------- /Section 6/resources/REST-S06_10-cascading-deletes-section-end-code.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/Section 6/resources/REST-S06_10-cascading-deletes-section-end-code.zip -------------------------------------------------------------------------------- /Section 7/resources/REST-S07_02-tags-and-stores-section-start-code.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/Section 7/resources/REST-S07_02-tags-and-stores-section-start-code.zip -------------------------------------------------------------------------------- /Section 7/resources/REST-S07_03-tags-and-items-section-end-code.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/Section 7/resources/REST-S07_03-tags-and-items-section-end-code.zip -------------------------------------------------------------------------------- /Section 8/resources/REST-S08_03-how-jwts-are-used-section-start-code.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/Section 8/resources/REST-S08_03-how-jwts-are-used-section-start-code.zip -------------------------------------------------------------------------------- /Section 8/resources/REST-S08_12-token_refreshing-section-end-code.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/Section 8/resources/REST-S08_12-token_refreshing-section-end-code.zip -------------------------------------------------------------------------------- /Section 9/resources/REST-S09_02-add-flask-migrate-flask-section-start-code.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/Section 9/resources/REST-S09_02-add-flask-migrate-flask-section-start-code.zip -------------------------------------------------------------------------------- /Section 9/resources/REST-S09_04-change-models-and-migrate-section-end-code.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/Section 9/resources/REST-S09_04-change-models-and-migrate-section-end-code.zip -------------------------------------------------------------------------------- /assets/course-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/assets/course-image.png -------------------------------------------------------------------------------- /assets/download-repo-zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/assets/download-repo-zip.png -------------------------------------------------------------------------------- /docs/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')], 3 | }; 4 | -------------------------------------------------------------------------------- /docs/docs/01_course_intro/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Course Introduction", 3 | "position": 1 4 | } 5 | -------------------------------------------------------------------------------- /docs/docs/02_python_refresher/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Python Refresher", 3 | "position": 2 4 | } 5 | -------------------------------------------------------------------------------- /docs/docs/03_first_rest_api/05_make_request_to_rest_api/assets/after-pressing-send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/03_first_rest_api/05_make_request_to_rest_api/assets/after-pressing-send.png -------------------------------------------------------------------------------- /docs/docs/03_first_rest_api/05_make_request_to_rest_api/assets/before-setting-url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/03_first_rest_api/05_make_request_to_rest_api/assets/before-setting-url.png -------------------------------------------------------------------------------- /docs/docs/03_first_rest_api/05_make_request_to_rest_api/assets/creating-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/03_first_rest_api/05_make_request_to_rest_api/assets/creating-project.png -------------------------------------------------------------------------------- /docs/docs/03_first_rest_api/05_make_request_to_rest_api/assets/making-request-collection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/03_first_rest_api/05_make_request_to_rest_api/assets/making-request-collection.png -------------------------------------------------------------------------------- /docs/docs/03_first_rest_api/05_make_request_to_rest_api/assets/making-request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/03_first_rest_api/05_make_request_to_rest_api/assets/making-request.png -------------------------------------------------------------------------------- /docs/docs/03_first_rest_api/05_make_request_to_rest_api/assets/set-request-name-and-method.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/03_first_rest_api/05_make_request_to_rest_api/assets/set-request-name-and-method.png -------------------------------------------------------------------------------- /docs/docs/03_first_rest_api/05_make_request_to_rest_api/assets/url-set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/03_first_rest_api/05_make_request_to_rest_api/assets/url-set.png -------------------------------------------------------------------------------- /docs/docs/03_first_rest_api/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Your First REST API", 3 | "position": 3 4 | } 5 | -------------------------------------------------------------------------------- /docs/docs/04_docker_intro/01_what_is_docker_container/assets/docker-linux.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/04_docker_intro/01_what_is_docker_container/assets/docker-linux.drawio.png -------------------------------------------------------------------------------- /docs/docs/04_docker_intro/01_what_is_docker_container/assets/vm.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/04_docker_intro/01_what_is_docker_container/assets/vm.drawio.png -------------------------------------------------------------------------------- /docs/docs/04_docker_intro/01_what_is_docker_container/docker-presentation.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/04_docker_intro/01_what_is_docker_container/docker-presentation.key -------------------------------------------------------------------------------- /docs/docs/04_docker_intro/02_run_docker_container/assets/running-app-docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/04_docker_intro/02_run_docker_container/assets/running-app-docker.png -------------------------------------------------------------------------------- /docs/docs/04_docker_intro/02_run_docker_container/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | RUN pip install flask 5 | COPY . . 6 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/04_docker_intro/03_run_docker_container/assets/running-app-docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/04_docker_intro/03_run_docker_container/assets/running-app-docker.png -------------------------------------------------------------------------------- /docs/docs/04_docker_intro/04_run_with_docker_compose/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | RUN pip install flask 5 | COPY . . 6 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/04_docker_intro/04_run_with_docker_compose/end/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | web: 4 | build: . 5 | ports: 6 | - "5000:5000" 7 | volumes: 8 | - .:/app -------------------------------------------------------------------------------- /docs/docs/04_docker_intro/04_run_with_docker_compose/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | RUN pip install flask 5 | COPY . . 6 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/04_docker_intro/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Introduction to Docker", 3 | "position": 4 4 | } 5 | -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/02_data_model_improvements/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/02_data_model_improvements/end/Dockerfile: -------------------------------------------------------------------------------- 1 | # In the course we run the app outside Docker 2 | # until lecture 5. 3 | FROM python:3.10 4 | EXPOSE 5000 5 | WORKDIR /app 6 | RUN pip install flask 7 | COPY . . 8 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/02_data_model_improvements/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-smorest 3 | python-dotenv -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/02_data_model_improvements/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | RUN pip install flask 5 | COPY . . 6 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/03_improvements_on_first_rest_api/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/03_improvements_on_first_rest_api/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | RUN pip install flask 5 | COPY . . 6 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/03_improvements_on_first_rest_api/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-smorest 3 | python-dotenv -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/03_improvements_on_first_rest_api/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/03_improvements_on_first_rest_api/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | RUN pip install flask 5 | COPY . . 6 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/03_improvements_on_first_rest_api/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-smorest 3 | python-dotenv -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/04_new_endpoints_for_api/assets/build-with-without-volume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/05_flask_smorest/04_new_endpoints_for_api/assets/build-with-without-volume.png -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/04_new_endpoints_for_api/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/04_new_endpoints_for_api/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | RUN pip install flask 5 | COPY . . 6 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/04_new_endpoints_for_api/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-smorest 3 | python-dotenv -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/04_new_endpoints_for_api/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/04_new_endpoints_for_api/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | RUN pip install flask 5 | COPY . . 6 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/04_new_endpoints_for_api/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-smorest 3 | python-dotenv -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/05_reload_api_docker_container/assets/build-with-without-volume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/05_flask_smorest/05_reload_api_docker_container/assets/build-with-without-volume.png -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/05_reload_api_docker_container/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/05_reload_api_docker_container/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/05_reload_api_docker_container/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-smorest 3 | python-dotenv -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/05_reload_api_docker_container/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/05_reload_api_docker_container/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | RUN pip install flask 5 | COPY . . 6 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/05_reload_api_docker_container/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-smorest 3 | python-dotenv -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/06_api_with_method_views/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/06_api_with_method_views/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/06_api_with_method_views/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-smorest 3 | python-dotenv -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/06_api_with_method_views/end/resources/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/06_api_with_method_views/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/06_api_with_method_views/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/06_api_with_method_views/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | python-dotenv -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/07_marshmallow_schemas/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/07_marshmallow_schemas/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/07_marshmallow_schemas/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-smorest 3 | python-dotenv 4 | marshmallow -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/07_marshmallow_schemas/end/resources/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/07_marshmallow_schemas/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/07_marshmallow_schemas/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/07_marshmallow_schemas/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-smorest 3 | python-dotenv -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/07_marshmallow_schemas/start/resources/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/08_validation_with_marshmallow/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/08_validation_with_marshmallow/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/08_validation_with_marshmallow/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-smorest 3 | python-dotenv 4 | marshmallow -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/08_validation_with_marshmallow/end/resources/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/08_validation_with_marshmallow/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/08_validation_with_marshmallow/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/08_validation_with_marshmallow/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-smorest 3 | python-dotenv 4 | marshmallow -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/08_validation_with_marshmallow/start/resources/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/09_decorating_responses/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/09_decorating_responses/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/09_decorating_responses/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-smorest 3 | python-dotenv 4 | marshmallow -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/09_decorating_responses/end/resources/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/09_decorating_responses/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/09_decorating_responses/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/09_decorating_responses/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-smorest 3 | python-dotenv 4 | marshmallow -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/09_decorating_responses/start/resources/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/docs/05_flask_smorest/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Flask-Smorest for More Efficient Development", 3 | "position": 5 4 | } 5 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/02_create_simple_sqlalchemy_model/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/02_create_simple_sqlalchemy_model/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/02_create_simple_sqlalchemy_model/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/02_create_simple_sqlalchemy_model/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.store import StoreModel 3 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/02_create_simple_sqlalchemy_model/end/models/store.py: -------------------------------------------------------------------------------- 1 | from db import db 2 | 3 | 4 | class StoreModel(db.Model): 5 | __tablename__ = "stores" 6 | 7 | id = db.Column(db.Integer, primary_key=True) 8 | name = db.Column(db.String(80), unique=True, nullable=False) 9 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/02_create_simple_sqlalchemy_model/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-sqlalchemy 3 | flask-smorest 4 | python-dotenv 5 | marshmallow -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/02_create_simple_sqlalchemy_model/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/06_sql_storage_sqlalchemy/02_create_simple_sqlalchemy_model/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/02_create_simple_sqlalchemy_model/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/02_create_simple_sqlalchemy_model/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/02_create_simple_sqlalchemy_model/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/02_create_simple_sqlalchemy_model/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-smorest 3 | python-dotenv 4 | marshmallow -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/02_create_simple_sqlalchemy_model/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/06_sql_storage_sqlalchemy/02_create_simple_sqlalchemy_model/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/03_one_to_many_relationships_sqlalchemy/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/03_one_to_many_relationships_sqlalchemy/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/03_one_to_many_relationships_sqlalchemy/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/03_one_to_many_relationships_sqlalchemy/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.store import StoreModel 3 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/03_one_to_many_relationships_sqlalchemy/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-sqlalchemy 3 | flask-smorest 4 | python-dotenv 5 | marshmallow -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/03_one_to_many_relationships_sqlalchemy/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/06_sql_storage_sqlalchemy/03_one_to_many_relationships_sqlalchemy/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/03_one_to_many_relationships_sqlalchemy/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/03_one_to_many_relationships_sqlalchemy/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/03_one_to_many_relationships_sqlalchemy/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/03_one_to_many_relationships_sqlalchemy/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.store import StoreModel 3 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/03_one_to_many_relationships_sqlalchemy/start/models/store.py: -------------------------------------------------------------------------------- 1 | from db import db 2 | 3 | 4 | class StoreModel(db.Model): 5 | __tablename__ = "stores" 6 | 7 | id = db.Column(db.Integer, primary_key=True) 8 | name = db.Column(db.String(80), unique=True, nullable=False) 9 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/03_one_to_many_relationships_sqlalchemy/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-sqlalchemy 3 | flask-smorest 4 | python-dotenv 5 | marshmallow -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/04_configure_flask_sqlalchemy/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/04_configure_flask_sqlalchemy/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/04_configure_flask_sqlalchemy/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/04_configure_flask_sqlalchemy/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.store import StoreModel 3 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/04_configure_flask_sqlalchemy/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-sqlalchemy 3 | flask-smorest 4 | python-dotenv 5 | marshmallow -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/04_configure_flask_sqlalchemy/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/06_sql_storage_sqlalchemy/04_configure_flask_sqlalchemy/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/04_configure_flask_sqlalchemy/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/04_configure_flask_sqlalchemy/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/04_configure_flask_sqlalchemy/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/04_configure_flask_sqlalchemy/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.store import StoreModel 3 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/04_configure_flask_sqlalchemy/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-sqlalchemy 3 | flask-smorest 4 | python-dotenv 5 | marshmallow -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/04_configure_flask_sqlalchemy/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/06_sql_storage_sqlalchemy/04_configure_flask_sqlalchemy/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/05_insert_models_sqlalchemy/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/05_insert_models_sqlalchemy/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/05_insert_models_sqlalchemy/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/05_insert_models_sqlalchemy/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.store import StoreModel 3 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/05_insert_models_sqlalchemy/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-sqlalchemy 3 | flask-smorest 4 | python-dotenv 5 | marshmallow -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/05_insert_models_sqlalchemy/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/06_sql_storage_sqlalchemy/05_insert_models_sqlalchemy/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/05_insert_models_sqlalchemy/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/05_insert_models_sqlalchemy/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/05_insert_models_sqlalchemy/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/05_insert_models_sqlalchemy/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.store import StoreModel 3 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/05_insert_models_sqlalchemy/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-sqlalchemy 3 | flask-smorest 4 | python-dotenv 5 | marshmallow -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/05_insert_models_sqlalchemy/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/06_sql_storage_sqlalchemy/05_insert_models_sqlalchemy/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/06_get_models_or_404/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/06_get_models_or_404/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/06_get_models_or_404/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/06_get_models_or_404/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.store import StoreModel 3 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/06_get_models_or_404/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-sqlalchemy 3 | flask-smorest 4 | python-dotenv 5 | marshmallow -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/06_get_models_or_404/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/06_sql_storage_sqlalchemy/06_get_models_or_404/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/06_get_models_or_404/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/06_get_models_or_404/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/06_get_models_or_404/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/06_get_models_or_404/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.store import StoreModel 3 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/06_get_models_or_404/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-sqlalchemy 3 | flask-smorest 4 | python-dotenv 5 | marshmallow -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/06_get_models_or_404/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/06_sql_storage_sqlalchemy/06_get_models_or_404/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/07_updating_models_sqlalchemy/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/07_updating_models_sqlalchemy/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/07_updating_models_sqlalchemy/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/07_updating_models_sqlalchemy/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.store import StoreModel 3 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/07_updating_models_sqlalchemy/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-sqlalchemy 3 | flask-smorest 4 | python-dotenv 5 | marshmallow -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/07_updating_models_sqlalchemy/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/06_sql_storage_sqlalchemy/07_updating_models_sqlalchemy/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/07_updating_models_sqlalchemy/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/07_updating_models_sqlalchemy/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/07_updating_models_sqlalchemy/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/07_updating_models_sqlalchemy/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.store import StoreModel 3 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/07_updating_models_sqlalchemy/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-sqlalchemy 3 | flask-smorest 4 | python-dotenv 5 | marshmallow -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/07_updating_models_sqlalchemy/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/06_sql_storage_sqlalchemy/07_updating_models_sqlalchemy/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/08_retrieve_list_all_models/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/08_retrieve_list_all_models/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/08_retrieve_list_all_models/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/08_retrieve_list_all_models/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.store import StoreModel 3 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/08_retrieve_list_all_models/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-sqlalchemy 3 | flask-smorest 4 | python-dotenv 5 | marshmallow -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/08_retrieve_list_all_models/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/06_sql_storage_sqlalchemy/08_retrieve_list_all_models/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/08_retrieve_list_all_models/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/08_retrieve_list_all_models/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/08_retrieve_list_all_models/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/08_retrieve_list_all_models/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.store import StoreModel 3 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/08_retrieve_list_all_models/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-sqlalchemy 3 | flask-smorest 4 | python-dotenv 5 | marshmallow -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/08_retrieve_list_all_models/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/06_sql_storage_sqlalchemy/08_retrieve_list_all_models/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/09_delete_models_sqlalchemy/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/09_delete_models_sqlalchemy/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/09_delete_models_sqlalchemy/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/09_delete_models_sqlalchemy/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.store import StoreModel 3 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/09_delete_models_sqlalchemy/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-sqlalchemy 3 | flask-smorest 4 | python-dotenv 5 | marshmallow -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/09_delete_models_sqlalchemy/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/06_sql_storage_sqlalchemy/09_delete_models_sqlalchemy/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/09_delete_models_sqlalchemy/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/09_delete_models_sqlalchemy/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/09_delete_models_sqlalchemy/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/09_delete_models_sqlalchemy/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/09_delete_models_sqlalchemy/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-sqlalchemy 3 | flask-smorest 4 | python-dotenv 5 | marshmallow -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/09_delete_models_sqlalchemy/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/06_sql_storage_sqlalchemy/09_delete_models_sqlalchemy/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/10_delete_related_models_sqlalchemy/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/10_delete_related_models_sqlalchemy/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/10_delete_related_models_sqlalchemy/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/10_delete_related_models_sqlalchemy/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.store import StoreModel 3 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/10_delete_related_models_sqlalchemy/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-sqlalchemy 3 | flask-smorest 4 | python-dotenv 5 | marshmallow -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/10_delete_related_models_sqlalchemy/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/06_sql_storage_sqlalchemy/10_delete_related_models_sqlalchemy/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/10_delete_related_models_sqlalchemy/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/10_delete_related_models_sqlalchemy/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/10_delete_related_models_sqlalchemy/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/10_delete_related_models_sqlalchemy/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.store import StoreModel 3 | -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/10_delete_related_models_sqlalchemy/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-sqlalchemy 3 | flask-smorest 4 | python-dotenv 5 | marshmallow -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/10_delete_related_models_sqlalchemy/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/06_sql_storage_sqlalchemy/10_delete_related_models_sqlalchemy/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/06_sql_storage_sqlalchemy/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "SQL Storage with Flask-SQLAlchemy", 3 | "position": 6 4 | } 5 | -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/01_section_changes/assets/db_model.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/07_sqlalchemy_many_to_many/01_section_changes/assets/db_model.drawio.png -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/02_one_to_many_review/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/02_one_to_many_review/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/02_one_to_many_review/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/02_one_to_many_review/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.tag import TagModel 3 | from models.store import StoreModel 4 | from models.item_tags import ItemsTags 5 | -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/02_one_to_many_review/end/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/02_one_to_many_review/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/07_sqlalchemy_many_to_many/02_one_to_many_review/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/02_one_to_many_review/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/02_one_to_many_review/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/02_one_to_many_review/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/02_one_to_many_review/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.tag import TagModel 3 | from models.store import StoreModel 4 | from models.item_tags import ItemsTags 5 | -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/02_one_to_many_review/start/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/02_one_to_many_review/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/07_sqlalchemy_many_to_many/02_one_to_many_review/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/03_many_to_many_relationships/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/03_many_to_many_relationships/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/03_many_to_many_relationships/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/03_many_to_many_relationships/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.tag import TagModel 3 | from models.store import StoreModel 4 | from models.item_tags import ItemsTags 5 | -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/03_many_to_many_relationships/end/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/03_many_to_many_relationships/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/07_sqlalchemy_many_to_many/03_many_to_many_relationships/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/03_many_to_many_relationships/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/03_many_to_many_relationships/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/03_many_to_many_relationships/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/03_many_to_many_relationships/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.tag import TagModel 3 | from models.store import StoreModel 4 | from models.item_tags import ItemsTags 5 | -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/03_many_to_many_relationships/start/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/03_many_to_many_relationships/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/07_sqlalchemy_many_to_many/03_many_to_many_relationships/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/07_sqlalchemy_many_to_many/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Many-to-many relationships with SQLAlchemy", 3 | "position": 7 4 | } 5 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/03_how_is_jwt_used/assets/access-token-flow.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/03_how_is_jwt_used/assets/access-token-flow.drawio.png -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/03_how_is_jwt_used/assets/my-info-flow.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/03_how_is_jwt_used/assets/my-info-flow.drawio.png -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/03_how_is_jwt_used/how-are-jwts-used.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/03_how_is_jwt_used/how-are-jwts-used.key -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/end/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/end/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | per-file-ignores = __init__.py:F401 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.tag import TagModel 3 | from models.store import StoreModel 4 | from models.item_tags import ItemsTags 5 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/end/requirements-dev.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | black 3 | flake8 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/end/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/start/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/start/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | per-file-ignores = __init__.py:F401 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.tag import TagModel 3 | from models.store import StoreModel 4 | from models.item_tags import ItemsTags 5 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/start/requirements-dev.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | black 3 | flake8 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/start/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/04_flask_jwt_extended_setup/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/05_user_model_and_schema/end/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/05_user_model_and_schema/end/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | per-file-ignores = __init__.py:F401 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/05_user_model_and_schema/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/05_user_model_and_schema/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/05_user_model_and_schema/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/05_user_model_and_schema/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/05_user_model_and_schema/end/requirements-dev.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | black 3 | flake8 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/05_user_model_and_schema/end/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/05_user_model_and_schema/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/05_user_model_and_schema/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/05_user_model_and_schema/start/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/05_user_model_and_schema/start/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | per-file-ignores = __init__.py:F401 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/05_user_model_and_schema/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/05_user_model_and_schema/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/05_user_model_and_schema/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/05_user_model_and_schema/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.tag import TagModel 3 | from models.store import StoreModel 4 | from models.item_tags import ItemsTags 5 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/05_user_model_and_schema/start/requirements-dev.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | black 3 | flake8 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/05_user_model_and_schema/start/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/05_user_model_and_schema/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/05_user_model_and_schema/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/end/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/end/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | per-file-ignores = __init__.py:F401 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/end/requirements-dev.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | black 3 | flake8 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/end/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/start/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/start/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | per-file-ignores = __init__.py:F401 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/start/requirements-dev.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | black 3 | flake8 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/start/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/06_registering_users_rest_api/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/07_login_users_rest_api/end/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/07_login_users_rest_api/end/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | per-file-ignores = __init__.py:F401 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/07_login_users_rest_api/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/07_login_users_rest_api/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/07_login_users_rest_api/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/07_login_users_rest_api/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/07_login_users_rest_api/end/requirements-dev.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | black 3 | flake8 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/07_login_users_rest_api/end/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/07_login_users_rest_api/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/07_login_users_rest_api/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/07_login_users_rest_api/start/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/07_login_users_rest_api/start/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | per-file-ignores = __init__.py:F401 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/07_login_users_rest_api/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/07_login_users_rest_api/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/07_login_users_rest_api/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/07_login_users_rest_api/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/07_login_users_rest_api/start/requirements-dev.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | black 3 | flake8 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/07_login_users_rest_api/start/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/07_login_users_rest_api/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/07_login_users_rest_api/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/end/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/end/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | per-file-ignores = __init__.py:F401 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/end/requirements-dev.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | black 3 | flake8 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/end/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/start/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/start/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | per-file-ignores = __init__.py:F401 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/start/requirements-dev.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | black 3 | flake8 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/start/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/08_protect_resources_with_jwt_required/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/end/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/end/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | per-file-ignores = __init__.py:F401 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/end/requirements-dev.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | black 3 | flake8 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/end/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/start/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/start/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | per-file-ignores = __init__.py:F401 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/start/requirements-dev.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | black 3 | flake8 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/start/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/09_jwt_claims_and_authorization/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/end/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/end/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | per-file-ignores = __init__.py:F401 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/end/requirements-dev.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | black 3 | flake8 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/end/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/start/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/start/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | per-file-ignores = __init__.py:F401 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/start/requirements-dev.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | black 3 | flake8 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/start/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/10_logout_users_rest_api/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/11_insomnia_request_chaining/assets/attributes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/11_insomnia_request_chaining/assets/attributes.png -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/11_insomnia_request_chaining/assets/base_environment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/11_insomnia_request_chaining/assets/base_environment.png -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/11_insomnia_request_chaining/assets/bearer_token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/11_insomnia_request_chaining/assets/bearer_token.png -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/11_insomnia_request_chaining/assets/environment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/11_insomnia_request_chaining/assets/environment.png -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/11_insomnia_request_chaining/assets/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/11_insomnia_request_chaining/assets/error.png -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/11_insomnia_request_chaining/assets/filled_out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/11_insomnia_request_chaining/assets/filled_out.png -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/11_insomnia_request_chaining/assets/modal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/11_insomnia_request_chaining/assets/modal.png -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/11_insomnia_request_chaining/assets/result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/11_insomnia_request_chaining/assets/result.png -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/11_insomnia_request_chaining/assets/token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/11_insomnia_request_chaining/assets/token.png -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/end/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/end/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | per-file-ignores = __init__.py:F401 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/end/requirements-dev.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | black 3 | flake8 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/end/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/end_video/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/end_video/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/end_video/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/end_video/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/end_video/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/end_video/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/start/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/start/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | per-file-ignores = __init__.py:F401 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/start/requirements-dev.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | black 3 | flake8 -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/start/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/08_flask_jwt_extended/12_token_refreshing_flask_jwt_extended/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/08_flask_jwt_extended/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "User Authentication with Flask-JWT-Extended", 3 | "position": 8 4 | } 5 | -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/end/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/end/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn 8 | Flask-Migrate -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/start/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/start/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/09_flask_migrate/02_add_flask_migrate_to_app/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/03_initialize_database_flask_db_init/end/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/03_initialize_database_flask_db_init/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/03_initialize_database_flask_db_init/end/.python-version: -------------------------------------------------------------------------------- 1 | 3.11 2 | -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/03_initialize_database_flask_db_init/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/03_initialize_database_flask_db_init/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/03_initialize_database_flask_db_init/end/migrations/README: -------------------------------------------------------------------------------- 1 | Single-database configuration for Flask. 2 | -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/03_initialize_database_flask_db_init/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/03_initialize_database_flask_db_init/end/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn 8 | Flask-Migrate -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/03_initialize_database_flask_db_init/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/09_flask_migrate/03_initialize_database_flask_db_init/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/03_initialize_database_flask_db_init/start/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/03_initialize_database_flask_db_init/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/03_initialize_database_flask_db_init/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/03_initialize_database_flask_db_init/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/03_initialize_database_flask_db_init/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/03_initialize_database_flask_db_init/start/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn 8 | Flask-Migrate -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/03_initialize_database_flask_db_init/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/09_flask_migrate/03_initialize_database_flask_db_init/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/end/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/end/.python-version: -------------------------------------------------------------------------------- 1 | 3.11 2 | -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/end/migrations/README: -------------------------------------------------------------------------------- 1 | Single-database configuration for Flask. 2 | -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/end/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn 8 | Flask-Migrate -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/end/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/end/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/start/.dockerignore: -------------------------------------------------------------------------------- 1 | .venv 2 | *.pyc 3 | __pycache__ 4 | data.db -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/start/.python-version: -------------------------------------------------------------------------------- 1 | 3.11 2 | -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/start/migrations/README: -------------------------------------------------------------------------------- 1 | Single-database configuration for Flask. 2 | -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/start/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn 8 | Flask-Migrate -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/start/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/09_flask_migrate/04_change_models_generate_alembic_migration/start/resources/__init__.py -------------------------------------------------------------------------------- /docs/docs/09_flask_migrate/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Database migrations with Alembic and Flask-Migrate", 3 | "position": 9 4 | } 5 | -------------------------------------------------------------------------------- /docs/docs/10_git_crash_course/README.md: -------------------------------------------------------------------------------- 1 | # Git Crash Course 2 | 3 | The Git Crash Course e-book is hosted in a different page because it is used in multiple courses. 4 | 5 | Read the Git Crash Course e-book here: [https://git-workshop.tecladocode.com/](https://git-workshop.tecladocode.com/) -------------------------------------------------------------------------------- /docs/docs/10_git_crash_course/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Git Crash Course", 3 | "position": 10 4 | } 5 | -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/02_create_render_web_service/assets/deploy-latest-commit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/11_deploy_to_render/02_create_render_web_service/assets/deploy-latest-commit.png -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/02_create_render_web_service/assets/insomnia-test-prod.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/11_deploy_to_render/02_create_render_web_service/assets/insomnia-test-prod.png -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/02_create_render_web_service/assets/render-deploy-finished.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/11_deploy_to_render/02_create_render_web_service/assets/render-deploy-finished.png -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/02_create_render_web_service/assets/render-deploy-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/11_deploy_to_render/02_create_render_web_service/assets/render-deploy-screen.png -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/02_create_render_web_service/assets/render-github-connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/11_deploy_to_render/02_create_render_web_service/assets/render-github-connect.png -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/02_create_render_web_service/assets/render-service-config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/11_deploy_to_render/02_create_render_web_service/assets/render-service-config.png -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/04_deploy_postgresql_database/assets/copy-elephantsql-url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/11_deploy_to_render/04_deploy_postgresql_database/assets/copy-elephantsql-url.png -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/05_environment_variables_and_migrations/assets/render-add-env-var.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/11_deploy_to_render/05_environment_variables_and_migrations/assets/render-add-env-var.png -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/end/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL= -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/end/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | .venv 3 | .vscode 4 | __pycache__ 5 | data.db 6 | *.pyc 7 | .DS_Store -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | WORKDIR /app 3 | COPY requirements.txt . 4 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 5 | COPY . . 6 | CMD ["/bin/bash", "docker-entrypoint.sh"] -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/end/README.md: -------------------------------------------------------------------------------- 1 | # REST APIs Recording Project 2 | 3 | Nothing here yet! 4 | -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/end/blocklist.py: -------------------------------------------------------------------------------- 1 | """ 2 | blocklist.py 3 | 4 | This file just contains the blocklist of the JWT tokens. It will be imported by 5 | app and the logout resource so that tokens can be added to the blocklist when the 6 | user logs out. 7 | """ 8 | 9 | BLOCKLIST = set() -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/end/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | flask db upgrade 4 | 5 | exec gunicorn --bind 0.0.0.0:80 "app:create_app()" -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/end/migrations/README: -------------------------------------------------------------------------------- 1 | Single-database configuration for Flask. 2 | -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.store import StoreModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.item_tags import ItemTags 5 | from models.user import UserModel -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask==2.3.2 2 | flask-smorest 3 | python-dotenv 4 | sqlalchemy 5 | flask-sqlalchemy 6 | flask-jwt-extended 7 | passlib 8 | flask-migrate 9 | gunicorn 10 | psycopg2 -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/start/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL= -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/start/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | .venv 3 | .vscode 4 | __pycache__ 5 | data.db 6 | *.pyc 7 | .DS_Store -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | WORKDIR /app 3 | COPY requirements.txt . 4 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 5 | COPY . . 6 | CMD ["/bin/bash", "docker-entrypoint.sh"] -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/start/README.md: -------------------------------------------------------------------------------- 1 | # REST APIs Recording Project 2 | 3 | Nothing here yet! 4 | -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/start/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | flask db upgrade 4 | 5 | exec gunicorn --bind 0.0.0.0:80 "app:create_app()" -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/start/migrations/README: -------------------------------------------------------------------------------- 1 | Single-database configuration for Flask. 2 | -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.store import StoreModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.item_tags import ItemTags 5 | from models.user import UserModel -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/06_run_everything_docker_compose/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask==2.3.2 2 | flask-smorest 3 | python-dotenv 4 | sqlalchemy 5 | flask-sqlalchemy 6 | flask-jwt-extended 7 | passlib 8 | flask-migrate 9 | gunicorn 10 | psycopg2 -------------------------------------------------------------------------------- /docs/docs/11_deploy_to_render/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Deploy REST APIs to Render", 3 | "position": 11 4 | } 5 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/assets/mailgun-api-key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/assets/mailgun-api-key.png -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/end/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL= 2 | MAILGUN_API_KEY= 3 | MAILGUN_DOMAIN= -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/end/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | .venv 3 | .vscode 4 | __pycache__ 5 | data.db 6 | *.pyc 7 | .DS_Store -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/end/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # CONTRIBUTING 2 | 3 | ## How to run the Dockerfile locally 4 | 5 | ``` 6 | docker run -dp 5000:5000 -w /app -v "$(pwd):/app" IMAGE_NAME sh -c "flask run" 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | WORKDIR /app 3 | COPY requirements.txt . 4 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 5 | COPY . . 6 | CMD ["/bin/bash", "docker-entrypoint.sh"] -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/end/README.md: -------------------------------------------------------------------------------- 1 | # REST APIs Recording Project 2 | 3 | Nothing here yet! 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/end/blocklist.py: -------------------------------------------------------------------------------- 1 | """ 2 | blocklist.py 3 | 4 | This file just contains the blocklist of the JWT tokens. It will be imported by 5 | app and the logout resource so that tokens can be added to the blocklist when the 6 | user logs out. 7 | """ 8 | 9 | BLOCKLIST = set() -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/end/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | flask db upgrade 4 | 5 | exec gunicorn --bind 0.0.0.0:80 "app:create_app()" -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/end/migrations/README: -------------------------------------------------------------------------------- 1 | Single-database configuration for Flask. 2 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.store import StoreModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.item_tags import ItemTags 5 | from models.user import UserModel -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask==2.3.2 2 | flask-smorest 3 | python-dotenv 4 | sqlalchemy 5 | flask-sqlalchemy 6 | flask-jwt-extended 7 | passlib 8 | flask-migrate 9 | gunicorn 10 | psycopg2 11 | requests -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/start/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL= -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/start/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | .venv 3 | .vscode 4 | __pycache__ 5 | data.db 6 | *.pyc 7 | .DS_Store -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/start/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # CONTRIBUTING 2 | 3 | ## How to run the Dockerfile locally 4 | 5 | ``` 6 | docker run -dp 5000:5000 -w /app -v "$(pwd):/app" IMAGE_NAME sh -c "flask run" 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | WORKDIR /app 3 | COPY requirements.txt . 4 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 5 | COPY . . 6 | CMD ["/bin/bash", "docker-entrypoint.sh"] -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/start/README.md: -------------------------------------------------------------------------------- 1 | # REST APIs Recording Project 2 | 3 | Nothing here yet! 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/start/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | flask db upgrade 4 | 5 | exec gunicorn --bind 0.0.0.0:80 "app:create_app()" -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/start/migrations/README: -------------------------------------------------------------------------------- 1 | Single-database configuration for Flask. 2 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.store import StoreModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.item_tags import ItemTags 5 | from models.user import UserModel -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/01_send_emails_python_mailgun/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask==2.3.2 2 | flask-smorest 3 | python-dotenv 4 | sqlalchemy 5 | flask-sqlalchemy 6 | flask-jwt-extended 7 | passlib 8 | flask-migrate 9 | gunicorn 10 | psycopg2 -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/end/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL= 2 | MAILGUN_API_KEY= 3 | MAILGUN_DOMAIN= -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/end/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | .venv 3 | .vscode 4 | __pycache__ 5 | data.db 6 | *.pyc 7 | .DS_Store -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/end/.python-version: -------------------------------------------------------------------------------- 1 | 3.10.6 2 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/end/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # CONTRIBUTING 2 | 3 | ## How to run the Dockerfile locally 4 | 5 | ``` 6 | docker run -dp 5000:5000 -w /app -v "$(pwd):/app" IMAGE_NAME sh -c "flask run" 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | WORKDIR /app 3 | COPY requirements.txt . 4 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 5 | COPY . . 6 | CMD ["/bin/bash", "docker-entrypoint.sh"] -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/end/README.md: -------------------------------------------------------------------------------- 1 | # REST APIs Recording Project 2 | 3 | Nothing here yet! 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/end/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | flask db upgrade 4 | 5 | exec gunicorn --bind 0.0.0.0:80 "app:create_app()" -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/end/migrations/README: -------------------------------------------------------------------------------- 1 | Single-database configuration for Flask. 2 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.store import StoreModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.item_tags import ItemTags 5 | from models.user import UserModel -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask==2.3.2 2 | flask-smorest 3 | python-dotenv 4 | sqlalchemy 5 | flask-sqlalchemy 6 | flask-jwt-extended 7 | passlib 8 | flask-migrate 9 | gunicorn 10 | psycopg2 11 | requests -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/start/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL= 2 | MAILGUN_API_KEY= 3 | MAILGUN_DOMAIN= -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/start/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | .venv 3 | .vscode 4 | __pycache__ 5 | data.db 6 | *.pyc 7 | .DS_Store -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/start/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # CONTRIBUTING 2 | 3 | ## How to run the Dockerfile locally 4 | 5 | ``` 6 | docker run -dp 5000:5000 -w /app -v "$(pwd):/app" IMAGE_NAME sh -c "flask run" 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | WORKDIR /app 3 | COPY requirements.txt . 4 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 5 | COPY . . 6 | CMD ["/bin/bash", "docker-entrypoint.sh"] -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/start/README.md: -------------------------------------------------------------------------------- 1 | # REST APIs Recording Project 2 | 3 | Nothing here yet! 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/start/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | flask db upgrade 4 | 5 | exec gunicorn --bind 0.0.0.0:80 "app:create_app()" -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/start/migrations/README: -------------------------------------------------------------------------------- 1 | Single-database configuration for Flask. 2 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.store import StoreModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.item_tags import ItemTags 5 | from models.user import UserModel -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/02_send_email_user_registration/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask==2.3.2 2 | flask-smorest 3 | python-dotenv 4 | sqlalchemy 5 | flask-sqlalchemy 6 | flask-jwt-extended 7 | passlib 8 | flask-migrate 9 | gunicorn 10 | psycopg2 11 | requests -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/03_what_is_task_queue/assets/queues.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/12_task_queues_emails/03_what_is_task_queue/assets/queues.drawio.png -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/03_what_is_task_queue/assets/render-redis-allowing-outside.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/12_task_queues_emails/03_what_is_task_queue/assets/render-redis-allowing-outside.png -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/end/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL= 2 | MAILGUN_API_KEY= 3 | MAILGUN_DOMAIN= 4 | REDIS_URL= -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/end/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | .venv 3 | .vscode 4 | __pycache__ 5 | data.db 6 | *.pyc 7 | .DS_Store -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/end/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # CONTRIBUTING 2 | 3 | ## How to run the Dockerfile locally 4 | 5 | ``` 6 | docker run -dp 5000:5000 -w /app -v "$(pwd):/app" IMAGE_NAME sh -c "flask run" 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | WORKDIR /app 3 | COPY requirements.txt . 4 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 5 | COPY . . 6 | CMD ["/bin/bash", "docker-entrypoint.sh"] -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/end/README.md: -------------------------------------------------------------------------------- 1 | # REST APIs Recording Project 2 | 3 | Nothing here yet! 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/end/blocklist.py: -------------------------------------------------------------------------------- 1 | """ 2 | blocklist.py 3 | 4 | This file just contains the blocklist of the JWT tokens. It will be imported by 5 | app and the logout resource so that tokens can be added to the blocklist when the 6 | user logs out. 7 | """ 8 | 9 | BLOCKLIST = set() -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/end/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | flask db upgrade 4 | 5 | exec gunicorn --bind 0.0.0.0:80 "app:create_app()" -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/end/migrations/README: -------------------------------------------------------------------------------- 1 | Single-database configuration for Flask. 2 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.store import StoreModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.item_tags import ItemTags 5 | from models.user import UserModel -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask==2.3.2 2 | flask-smorest 3 | python-dotenv 4 | sqlalchemy 5 | flask-sqlalchemy 6 | flask-jwt-extended 7 | passlib 8 | flask-migrate 9 | gunicorn 10 | psycopg2 11 | requests 12 | redis 13 | rq -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/start/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL= 2 | MAILGUN_API_KEY= 3 | MAILGUN_DOMAIN= -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/start/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | .venv 3 | .vscode 4 | __pycache__ 5 | data.db 6 | *.pyc 7 | .DS_Store -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/start/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # CONTRIBUTING 2 | 3 | ## How to run the Dockerfile locally 4 | 5 | ``` 6 | docker run -dp 5000:5000 -w /app -v "$(pwd):/app" IMAGE_NAME sh -c "flask run" 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | WORKDIR /app 3 | COPY requirements.txt . 4 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 5 | COPY . . 6 | CMD ["/bin/bash", "docker-entrypoint.sh"] -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/start/README.md: -------------------------------------------------------------------------------- 1 | # REST APIs Recording Project 2 | 3 | Nothing here yet! 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/start/blocklist.py: -------------------------------------------------------------------------------- 1 | """ 2 | blocklist.py 3 | 4 | This file just contains the blocklist of the JWT tokens. It will be imported by 5 | app and the logout resource so that tokens can be added to the blocklist when the 6 | user logs out. 7 | """ 8 | 9 | BLOCKLIST = set() -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/start/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | flask db upgrade 4 | 5 | exec gunicorn --bind 0.0.0.0:80 "app:create_app()" -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/start/migrations/README: -------------------------------------------------------------------------------- 1 | Single-database configuration for Flask. 2 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.store import StoreModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.item_tags import ItemTags 5 | from models.user import UserModel -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/04_populate_rq_task_queue/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask==2.3.2 2 | flask-smorest 3 | python-dotenv 4 | sqlalchemy 5 | flask-sqlalchemy 6 | flask-jwt-extended 7 | passlib 8 | flask-migrate 9 | gunicorn 10 | psycopg2 11 | requests -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/end/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL= 2 | MAILGUN_API_KEY= 3 | MAILGUN_DOMAIN= 4 | REDIS_URL= -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/end/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | .venv 3 | .vscode 4 | __pycache__ 5 | data.db 6 | *.pyc 7 | .DS_Store -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/end/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # CONTRIBUTING 2 | 3 | ## How to run the Dockerfile locally 4 | 5 | ``` 6 | docker run -dp 5000:5000 -w /app -v "$(pwd):/app" IMAGE_NAME sh -c "flask run" 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | WORKDIR /app 3 | COPY requirements.txt . 4 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 5 | COPY . . 6 | CMD ["/bin/bash", "docker-entrypoint.sh"] -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/end/README.md: -------------------------------------------------------------------------------- 1 | # REST APIs Recording Project 2 | 3 | Nothing here yet! 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/end/blocklist.py: -------------------------------------------------------------------------------- 1 | """ 2 | blocklist.py 3 | 4 | This file just contains the blocklist of the JWT tokens. It will be imported by 5 | app and the logout resource so that tokens can be added to the blocklist when the 6 | user logs out. 7 | """ 8 | 9 | BLOCKLIST = set() -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/end/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | flask db upgrade 4 | 5 | exec gunicorn --bind 0.0.0.0:80 "app:create_app()" -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/end/migrations/README: -------------------------------------------------------------------------------- 1 | Single-database configuration for Flask. 2 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.store import StoreModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.item_tags import ItemTags 5 | from models.user import UserModel -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask==2.3.2 2 | flask-smorest 3 | python-dotenv 4 | sqlalchemy 5 | flask-sqlalchemy 6 | flask-jwt-extended 7 | passlib 8 | flask-migrate 9 | gunicorn 10 | psycopg2 11 | requests 12 | redis 13 | rq -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/start/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL= 2 | MAILGUN_API_KEY= 3 | MAILGUN_DOMAIN= 4 | REDIS_URL= -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/start/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | .venv 3 | .vscode 4 | __pycache__ 5 | data.db 6 | *.pyc 7 | .DS_Store -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/start/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # CONTRIBUTING 2 | 3 | ## How to run the Dockerfile locally 4 | 5 | ``` 6 | docker run -dp 5000:5000 -w /app -v "$(pwd):/app" IMAGE_NAME sh -c "flask run" 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | WORKDIR /app 3 | COPY requirements.txt . 4 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 5 | COPY . . 6 | CMD ["/bin/bash", "docker-entrypoint.sh"] -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/start/README.md: -------------------------------------------------------------------------------- 1 | # REST APIs Recording Project 2 | 3 | Nothing here yet! 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/start/blocklist.py: -------------------------------------------------------------------------------- 1 | """ 2 | blocklist.py 3 | 4 | This file just contains the blocklist of the JWT tokens. It will be imported by 5 | app and the logout resource so that tokens can be added to the blocklist when the 6 | user logs out. 7 | """ 8 | 9 | BLOCKLIST = set() -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/start/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | flask db upgrade 4 | 5 | exec gunicorn --bind 0.0.0.0:80 "app:create_app()" -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/start/migrations/README: -------------------------------------------------------------------------------- 1 | Single-database configuration for Flask. 2 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.store import StoreModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.item_tags import ItemTags 5 | from models.user import UserModel -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/05_rq_background_worker/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask==2.3.2 2 | flask-smorest 3 | python-dotenv 4 | sqlalchemy 5 | flask-sqlalchemy 6 | flask-jwt-extended 7 | passlib 8 | flask-migrate 9 | gunicorn 10 | psycopg2 11 | requests 12 | redis 13 | rq -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/assets/html-email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/docs/12_task_queues_emails/06_sending_html_emails/assets/html-email.png -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/end/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL= 2 | MAILGUN_API_KEY= 3 | MAILGUN_DOMAIN= 4 | REDIS_URL= -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/end/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | .venv 3 | .vscode 4 | __pycache__ 5 | data.db 6 | *.pyc 7 | .DS_Store -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/end/.python-version: -------------------------------------------------------------------------------- 1 | 3.10.6 2 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/end/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # CONTRIBUTING 2 | 3 | ## How to run the Dockerfile locally 4 | 5 | ``` 6 | docker run -dp 5000:5000 -w /app -v "$(pwd):/app" IMAGE_NAME sh -c "flask run" 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | WORKDIR /app 3 | COPY requirements.txt . 4 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 5 | COPY . . 6 | CMD ["/bin/bash", "docker-entrypoint.sh"] -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/end/README.md: -------------------------------------------------------------------------------- 1 | # REST APIs Recording Project 2 | 3 | Nothing here yet! 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/end/blocklist.py: -------------------------------------------------------------------------------- 1 | """ 2 | blocklist.py 3 | 4 | This file just contains the blocklist of the JWT tokens. It will be imported by 5 | app and the logout resource so that tokens can be added to the blocklist when the 6 | user logs out. 7 | """ 8 | 9 | BLOCKLIST = set() -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/end/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | flask db upgrade 4 | 5 | exec gunicorn --bind 0.0.0.0:80 "app:create_app()" -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/end/migrations/README: -------------------------------------------------------------------------------- 1 | Single-database configuration for Flask. 2 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.store import StoreModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.item_tags import ItemTags 5 | from models.user import UserModel -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask==2.3.2 2 | flask-smorest 3 | python-dotenv 4 | sqlalchemy 5 | flask-sqlalchemy 6 | flask-jwt-extended 7 | passlib 8 | flask-migrate 9 | gunicorn 10 | psycopg2 11 | requests 12 | redis 13 | rq -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/start/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL= 2 | MAILGUN_API_KEY= 3 | MAILGUN_DOMAIN= 4 | REDIS_URL= -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/start/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | .venv 3 | .vscode 4 | __pycache__ 5 | data.db 6 | *.pyc 7 | .DS_Store -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/start/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # CONTRIBUTING 2 | 3 | ## How to run the Dockerfile locally 4 | 5 | ``` 6 | docker run -dp 5000:5000 -w /app -v "$(pwd):/app" IMAGE_NAME sh -c "flask run" 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | WORKDIR /app 3 | COPY requirements.txt . 4 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 5 | COPY . . 6 | CMD ["/bin/bash", "docker-entrypoint.sh"] -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/start/README.md: -------------------------------------------------------------------------------- 1 | # REST APIs Recording Project 2 | 3 | Nothing here yet! 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/start/blocklist.py: -------------------------------------------------------------------------------- 1 | """ 2 | blocklist.py 3 | 4 | This file just contains the blocklist of the JWT tokens. It will be imported by 5 | app and the logout resource so that tokens can be added to the blocklist when the 6 | user logs out. 7 | """ 8 | 9 | BLOCKLIST = set() -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/start/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | flask db upgrade 4 | 5 | exec gunicorn --bind 0.0.0.0:80 "app:create_app()" -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/start/migrations/README: -------------------------------------------------------------------------------- 1 | Single-database configuration for Flask. 2 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.store import StoreModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.item_tags import ItemTags 5 | from models.user import UserModel -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/06_sending_html_emails/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask==2.3.2 2 | flask-smorest 3 | python-dotenv 4 | sqlalchemy 5 | flask-sqlalchemy 6 | flask-jwt-extended 7 | passlib 8 | flask-migrate 9 | gunicorn 10 | psycopg2 11 | requests 12 | redis 13 | rq -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/end/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL= 2 | MAILGUN_API_KEY= 3 | MAILGUN_DOMAIN= 4 | REDIS_URL= -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/end/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/end/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | .venv 3 | .vscode 4 | __pycache__ 5 | data.db 6 | *.pyc 7 | .DS_Store -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/end/.python-version: -------------------------------------------------------------------------------- 1 | 3.10.6 2 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/end/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # CONTRIBUTING 2 | 3 | ## How to run the Dockerfile locally 4 | 5 | ``` 6 | docker run -dp 5000:5000 -w /app -v "$(pwd):/app" IMAGE_NAME sh -c "flask run" 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/end/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | WORKDIR /app 3 | COPY requirements.txt . 4 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 5 | COPY . . 6 | CMD ["/bin/bash", "docker-entrypoint.sh"] -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/end/README.md: -------------------------------------------------------------------------------- 1 | # REST APIs Recording Project 2 | 3 | Nothing here yet! 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/end/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/end/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | flask db upgrade 4 | 5 | exec gunicorn --bind 0.0.0.0:80 "app:create_app()" -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/end/migrations/README: -------------------------------------------------------------------------------- 1 | Single-database configuration for Flask. 2 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/end/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.store import StoreModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.item_tags import ItemTags 5 | from models.user import UserModel -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/end/requirements.txt: -------------------------------------------------------------------------------- 1 | flask==2.3.2 2 | flask-smorest 3 | python-dotenv 4 | sqlalchemy 5 | flask-sqlalchemy 6 | flask-jwt-extended 7 | passlib 8 | flask-migrate 9 | gunicorn 10 | psycopg2 11 | requests 12 | redis 13 | rq -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/end/settings.py: -------------------------------------------------------------------------------- 1 | import os 2 | from dotenv import load_dotenv 3 | 4 | load_dotenv() 5 | 6 | REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379") 7 | QUEUES = ["emails", "default"] 8 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/start/.env.example: -------------------------------------------------------------------------------- 1 | DATABASE_URL= 2 | MAILGUN_API_KEY= 3 | MAILGUN_DOMAIN= 4 | REDIS_URL= -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/start/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/start/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | .venv 3 | .vscode 4 | __pycache__ 5 | data.db 6 | *.pyc 7 | .DS_Store -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/start/.python-version: -------------------------------------------------------------------------------- 1 | 3.10.6 2 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/start/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # CONTRIBUTING 2 | 3 | ## How to run the Dockerfile locally 4 | 5 | ``` 6 | docker run -dp 5000:5000 -w /app -v "$(pwd):/app" IMAGE_NAME sh -c "flask run" 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/start/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | WORKDIR /app 3 | COPY requirements.txt . 4 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 5 | COPY . . 6 | CMD ["/bin/bash", "docker-entrypoint.sh"] -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/start/README.md: -------------------------------------------------------------------------------- 1 | # REST APIs Recording Project 2 | 3 | Nothing here yet! 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/start/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/start/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | flask db upgrade 4 | 5 | exec gunicorn --bind 0.0.0.0:80 "app:create_app()" -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/start/migrations/README: -------------------------------------------------------------------------------- 1 | Single-database configuration for Flask. 2 | -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/start/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.store import StoreModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.item_tags import ItemTags 5 | from models.user import UserModel -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/07_deploy_background_worker_render/start/requirements.txt: -------------------------------------------------------------------------------- 1 | flask==2.3.2 2 | flask-smorest 3 | python-dotenv 4 | sqlalchemy 5 | flask-sqlalchemy 6 | flask-jwt-extended 7 | passlib 8 | flask-migrate 9 | gunicorn 10 | psycopg2 11 | requests 12 | redis 13 | rq -------------------------------------------------------------------------------- /docs/docs/12_task_queues_emails/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Task queues with rq and e-mail sending", 3 | "position": 12 4 | } 5 | -------------------------------------------------------------------------------- /docs/src/components/HomepageFeatures/styles.module.css: -------------------------------------------------------------------------------- 1 | .features { 2 | display: flex; 3 | align-items: center; 4 | padding: 2rem 0; 5 | width: 100%; 6 | } 7 | 8 | .featureSvg { 9 | height: 200px; 10 | width: 200px; 11 | } 12 | -------------------------------------------------------------------------------- /docs/src/components/LockedVideoEmbed/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/src/components/LockedVideoEmbed/background.png -------------------------------------------------------------------------------- /docs/src/pages/assets/in-import-all-sections-file-select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/src/pages/assets/in-import-all-sections-file-select.png -------------------------------------------------------------------------------- /docs/src/pages/assets/in-import-all-sections-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/src/pages/assets/in-import-all-sections-success.png -------------------------------------------------------------------------------- /docs/src/pages/assets/in-import-file-select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/src/pages/assets/in-import-file-select.png -------------------------------------------------------------------------------- /docs/src/pages/assets/in-import-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/src/pages/assets/in-import-file.png -------------------------------------------------------------------------------- /docs/src/pages/assets/in-import-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/src/pages/assets/in-import-success.png -------------------------------------------------------------------------------- /docs/src/pages/assets/in-section-import-s03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/src/pages/assets/in-section-import-s03.png -------------------------------------------------------------------------------- /docs/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/docs/static/img/favicon.ico -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "REST APIs with Flask and Python", 3 | "lockfileVersion": 2, 4 | "requires": true, 5 | "packages": {} 6 | } 7 | -------------------------------------------------------------------------------- /project/02-first-rest-api-docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | RUN pip install flask 5 | COPY . . 6 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /project/03-items-stores-smorest/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /project/03-items-stores-smorest/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /project/03-items-stores-smorest/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-smorest 3 | python-dotenv 4 | marshmallow -------------------------------------------------------------------------------- /project/03-items-stores-smorest/resources/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /project/04-items-stores-smorest-sqlalchemy/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /project/04-items-stores-smorest-sqlalchemy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /project/04-items-stores-smorest-sqlalchemy/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /project/04-items-stores-smorest-sqlalchemy/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.store import StoreModel 3 | -------------------------------------------------------------------------------- /project/04-items-stores-smorest-sqlalchemy/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | flask-smorest 3 | python-dotenv 4 | marshmallow 5 | sqlalchemy 6 | flask-sqlalchemy -------------------------------------------------------------------------------- /project/04-items-stores-smorest-sqlalchemy/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/project/04-items-stores-smorest-sqlalchemy/resources/__init__.py -------------------------------------------------------------------------------- /project/05-add-many-to-many/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /project/05-add-many-to-many/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /project/05-add-many-to-many/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /project/05-add-many-to-many/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.tag import TagModel 3 | from models.store import StoreModel 4 | from models.item_tags import ItemsTags 5 | -------------------------------------------------------------------------------- /project/05-add-many-to-many/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv 7 | gunicorn -------------------------------------------------------------------------------- /project/05-add-many-to-many/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/project/05-add-many-to-many/resources/__init__.py -------------------------------------------------------------------------------- /project/06-add-db-migrations/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /project/06-add-db-migrations/.python-version: -------------------------------------------------------------------------------- 1 | 3.10.4 2 | -------------------------------------------------------------------------------- /project/06-add-db-migrations/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10 2 | EXPOSE 5000 3 | WORKDIR /app 4 | COPY ./requirements.txt requirements.txt 5 | RUN pip install --no-cache-dir --upgrade -r requirements.txt 6 | COPY . . 7 | CMD ["flask", "run", "--host", "0.0.0.0"] -------------------------------------------------------------------------------- /project/06-add-db-migrations/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /project/06-add-db-migrations/migrations/README: -------------------------------------------------------------------------------- 1 | Single-database configuration for Flask. 2 | -------------------------------------------------------------------------------- /project/06-add-db-migrations/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.item import ItemModel 2 | from models.tag import TagModel 3 | from models.store import StoreModel 4 | from models.item_tags import ItemsTags 5 | -------------------------------------------------------------------------------- /project/06-add-db-migrations/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | Flask-Migrate 5 | passlib 6 | marshmallow 7 | python-dotenv 8 | gunicorn -------------------------------------------------------------------------------- /project/06-add-db-migrations/resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/REST-APIs-with-Flask-and-Python-in-2023/837e9203a4c25c4522068ad09280c048ffda0fbc/project/06-add-db-migrations/resources/__init__.py -------------------------------------------------------------------------------- /project/using-flask-restful/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /project/using-flask-restful/blocklist.py: -------------------------------------------------------------------------------- 1 | """ 2 | blacklist.py 3 | 4 | This file just contains the blacklist of the JWT tokens. It will be imported by 5 | app and the logout resource so that tokens can be added to the blacklist when the 6 | user logs out. 7 | """ 8 | 9 | BLOCKLIST = set() 10 | -------------------------------------------------------------------------------- /project/using-flask-restful/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /project/using-flask-restful/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /project/using-flask-restful/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-RESTful 3 | Flask-SQLAlchemy 4 | passlib 5 | python-dotenv 6 | -------------------------------------------------------------------------------- /project/using-flask-restful/resources/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /project/using-flask-restx/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /project/using-flask-restx/blocklist.py: -------------------------------------------------------------------------------- 1 | """ 2 | blacklist.py 3 | 4 | This file just contains the blacklist of the JWT tokens. It will be imported by 5 | app and the logout resource so that tokens can be added to the blacklist when the 6 | user logs out. 7 | """ 8 | 9 | BLOCKLIST = set() 10 | -------------------------------------------------------------------------------- /project/using-flask-restx/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /project/using-flask-restx/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /project/using-flask-restx/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-RESTX 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv -------------------------------------------------------------------------------- /project/using-flask-restx/resources/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /project/using-flask-smorest/.flaskenv: -------------------------------------------------------------------------------- 1 | FLASK_APP=app 2 | FLASK_DEBUG=True -------------------------------------------------------------------------------- /project/using-flask-smorest/blocklist.py: -------------------------------------------------------------------------------- 1 | """ 2 | blacklist.py 3 | 4 | This file just contains the blacklist of the JWT tokens. It will be imported by 5 | app and the logout resource so that tokens can be added to the blacklist when the 6 | user logs out. 7 | """ 8 | 9 | BLOCKLIST = set() 10 | -------------------------------------------------------------------------------- /project/using-flask-smorest/db.py: -------------------------------------------------------------------------------- 1 | from flask_sqlalchemy import SQLAlchemy 2 | 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /project/using-flask-smorest/models/__init__.py: -------------------------------------------------------------------------------- 1 | from models.user import UserModel 2 | from models.item import ItemModel 3 | from models.tag import TagModel 4 | from models.store import StoreModel 5 | from models.item_tags import ItemsTags 6 | -------------------------------------------------------------------------------- /project/using-flask-smorest/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask-JWT-Extended 2 | Flask-Smorest 3 | Flask-SQLAlchemy 4 | passlib 5 | marshmallow 6 | python-dotenv -------------------------------------------------------------------------------- /project/using-flask-smorest/resources/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | --------------------------------------------------------------------------------