Intro to Flask

Welcome to the world of Flask and full-stack development! Flask helps build a web application which can lead to APIs, and Full-Stack Development. This is considered an ideal application framework for the CollegeBoard Create Performance Task (CPT), which is the project portion of the AP exam.

Flask Framework

Flask is a lightweight and versatile web framework for Python. It allows you to quickly build web applications that are support APIs and Data/Databases. Flask’s simplicity of code and its flexibility make it a popular choice for both beginners and experienced developers.

APIs (Application Programming Interfaces)

APIs are the backbone of modern web development, enabling applications to communicate and interact with each other. In Flask, APIs are commonly used to expose data and functionality to external systems or client-side applications.

Full-Stack Development

Full-stack development involves working on both the front-end (client-side) and back-end (server-side) parts of web applications. Flask encompasses everything from designing user interfaces to building server logic and database interactions.

In our Teaching we will explore the Flask Jinja2 server side frontend, but we will be more focused on how to have a GitHub Pages Javascript frontend work with a Flask API and database backend.

Key Concepts to Explore

  • CRUD Functions: Learn how to Create, Read, Update, and Delete data within your Flask applications. This forms the basis of interacting with databases and managing application state.

  • JWT Tokens: JSON Web Tokens (JWT) are a secure way to transmit information between parties as a JSON object. They are commonly used for authentication and authorization in web applications.

  • Agile/Scrum Methodology: Agile is a project management approach that emphasizes iterative development, collaboration, and flexibility. It’s widely used in software development to adapt to changing requirements and deliver value quickly. Scrum is the most popular technique to work in the Agile Methodlogy

Getting Started with Your Project

  1. Setup Flask Environment: Download VS Code and install dependencies, including flask.

  2. Explore CRUD Operations: Create a simple database-driven application by forking/generating a template using the teacher’s backend(flask_2025) Use Flask Restful API to add CRUD operations. Test with Postman.

  3. Implement JWT Authentication: Secure your Flask application using JWT tokens for user authentication and authorization.

  4. Adopt Agile Practices: Begin your project with an Agile mindset, breaking down tasks into manageable iterations, establishing roles for teammates, being flexible and understanding, etc.

Explore the home page and experiment with logging in, profile creating, etc. Here are some sample questions to guide you: Can you create the same user twice? Do you get an error, and if so, what type of error do you get? What happens if you enter the wrong username or password for logging in? By experimenting and taking a look at the code, you can be prepared to start your trimester project, and use this knowledge in your Collegeboard Create Performance Task.

Happy coding!