- Python
- Intermediate
About this Course
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!
What you'll learn
- ORMs
- Peewee
- OrderedDict
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.
7 stepsOur 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.
6 stepsGettin' 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!
8 stepsTeacher
-
Kenneth Love
Besides teaching Python, Kenneth Love is a husband and father. He created a few popular Python libraries, worked at most levels of the web stack, and was the Creative Director of a newspaper. He likes board games, whiskey, activism, and dry humor.