Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/danpoynor/python-book-database

Exercise creating an SQL database including model creation and CRUD using SQLAlchemy
https://github.com/danpoynor/python-book-database

console-app crud demo-app python sqlalchemy-orm

Last synced: about 4 hours ago
JSON representation

Exercise creating an SQL database including model creation and CRUD using SQLAlchemy

Awesome Lists containing this project

README

        

# Python Book Database

Exercise creating an SQLite database including model creation and CRUD using [SQLAlchemy](https://www.sqlalchemy.org/) (a Python Object Relational Mapper).

- Create a Book database model
- Interact with a database using CRUD (create, read, update, and delete)
- Use `session.query()` to access specific information and analyze data

---

## How To Run

`cd python-book-database/`

and

`pip install -r requirements.txt`

then

`python app.py`

---

## Screenshot

Screen Shot 2023-11-14 at 2 40 37 PM

---

## Potential TODOs

- [ ] Dive into [SQLAlchemy tutorials](https://docs.sqlalchemy.org/en/14/) and integrate more features
- [ ] Add [docstrings](https://teamtreehouse.com/library/docstrings) to each function
- [ ] Add [type hinting](https://teamtreehouse.com/library/python-type-hinting)
- [ ] Try creating pagination for the books so you only see 5 books at a time when viewing them
- [ ] Try giving the user options for searching for a book (besides searching by id)
- [ ] Try adding other columns to your database like topic area, difficulty level, number of pages, etc.