dgt_wrk09 – The Accolli (Easter Egg)

Module Title: dgt_wrk09 – The Accolli (Easter Egg)

Description:

“dgt_wrk09 – The Accolli (Easter Egg)” covers the use of Flask, a Python web framework, to build projects for managing “Accogli” (accommodations or shelters). It is intended for those who build applications that handle data management and user interactions in settings such as hostels, shelters, or any accommodation service.

True to the Academy’s approach, no Python is typed by hand here. You learn how Flask routing, templates, SQLAlchemy models, sessions and REST APIs work; then you describe the application to the machine feature by feature (“a page listing the available beds, editable only by logged-in staff”), and you review what it writes: the routes, the models, the authentication checks. You run it, try to break it, and ask for corrections until the app behaves as specified.

Module Objectives:

  • Understand Flask Basics: Understand Flask’s core features, including routing, templates, forms, and sessions.
  • Database Integration: Learn how databases are integrated with SQLAlchemy to manage complex accommodation data, and how to check the models the machine proposes.
  • User Authentication: Understand secure authentication well enough to specify it precisely and verify that only authorized users can reach protected functionality.
  • RESTful API Development: Design RESTful APIs that connect front-end and back-end, have the machine implement them, and test that every endpoint behaves as intended.
  • Data Visualization: Direct the machine in using tools like Chart.js or Plotly to create visualizations of accommodation data.
  • Security Best Practices: Understand the security measures that protect user data and application integrity, and review the machine’s code against them.

Module Contents:

  1. Introduction to Flask
  2. Having the machine set up your development environment, and understanding what it installed
  3. Basic concepts: routes, views, and templates

  4. Building a CRUD Application

  5. Specifying how accommodation records are created, read, updated, and deleted, and verifying the result
  6. Integrating with databases using SQLAlchemy

  7. User Management

  8. Describing user registration and login, and reviewing how the machine implements them
  9. Managing sessions and cookies for authentication

  10. Developing RESTful APIs

  11. Designing API endpoints for CRUD operations
  12. Handling HTTP methods and status codes

  13. Enhancing User Experience

  14. Form validation and error handling
  15. Using AJAX for asynchronous data updates

  16. Data Visualization

  17. Integrating Chart.js or Plotly to display accommodation statistics
  18. Creating dynamic dashboards

  19. Security in Flask Applications

  20. Protecting against common web vulnerabilities, and spotting them in generated code
  21. HTTPS and secure cookies

  22. Deployment Strategies

  23. Preparing your application for production
  24. Instructing the machine to deploy on platforms like Heroku, AWS, or DigitalOcean, and checking the deployment

Target Audience:

  • Beginner to intermediate Python developers interested in web development.
  • People working in the hospitality sector who want custom solutions.
  • Developers who want to get better at building scalable, secure web applications by guiding the machine and reviewing its code.

Prerequisites:

  • Basic understanding of Python, enough to read the code the machine writes
  • Familiarity with HTML, CSS, and JavaScript is beneficial but not required

By the end of this module, participants will have the knowledge needed to describe, direct and verify Flask applications for managing accommodations.
The students can push their exercises to the Academy DevOps & SRE Git project. For this module, create a folder with your username as its name in the following subfolder: https://github.com/Garanti-Del-Talento/gdt_academy