Using Databases in Python
Treehouse
Course Summary
When you want to store data from a program, you have two general choices: files or databases. In this course, we're going to explore using a database from within Python by using the excellent ORM Peewee. We'll build a command line diary application that stores our thoughts and notes in a SQLite database, lets us review and delete them, a
-
+
Course Description
When you want to store data from a program, you have two general choices: files or databases. In this course, we're going to explore using a database from within Python by using the excellent ORM Peewee. We'll build a command line diary application that stores our thoughts and notes in a SQLite database, lets us review and delete them, and even has a search feature!
Topics Covered
- Meet Peewee
One way of interacting with a database from Python is to use the Peewee ORM. An ORM, or Object Relational Mapping, turns database tables into Python objects and vice versa. Let's see how to create tables and manipulate data in them.- Our Diary App
Now that we understand Peewee, let's build the app that we're here to build. We want an application we can run from the command line that we can read, write, and delete entries through.- Gettin' CRUD-y With It
It's time to build the real core of our application. Let's capture entries and save them, show them, search them, and delete them!
-
+
Course Syllabus
â— Meet Peeweeâ—¦ Meet Peewee, Our ORMâ—¦ Modelingâ—¦ Queries Are Your Friendâ— Our Diary Appâ—¦ What We're Going To Doâ—¦ Doing Data Entryâ—¦ Switching It Upâ— Gettin' CRUD-y With Itâ—¦ Add An Entryâ—¦ View and Search Entriesâ—¦ Delete An Entryâ—¦ Clean Up