3. Manipulating a Database with SQLAlchemy
Learning Objectives
By the end of this chapter, you will be able to:
- Use the pgAdmin tool to manage a database
- Manipulate a database using SQLAlchemy
- Create database tables using Flask-Migrate
- Persist data into a database
- Hash confidential password data
This chapter covers using SQLAlchemy to access a database, including building a model, encrypting the password, ensuring each email is unique, and then saving the recipe data in the database.
Introduction
In the previous chapter, we were only storing our data in application memory. While it is easy to code that way, the data will be gone once the server restarts. That is obviously not ideal because we would expect the data to be persisted even ...
Get Python API Development Fundamentals now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.