Objective: Get experience writing data to and reading data from a database
Can use the CLI for DuckDB (and other databases):
You'll pair in your Lab group. Work on branches and submit pull requests for the chunks of work — you decide what the "chunks" are.
You'll be changing your API over to use DuckDB.
- Install the Python client.
- Create a SQL script to take data from your CSV file and write it to a persistent database.
- Update your API to read from the database.
- Add a table named "users" to your persistent database.
- The table should have three columns: username, age, and country
- Add a POST method to add a new user to the table through your API
- Use this method to add several made-up users
- Add a GET method to get the number of users, the average age, and the three countries with the most users.
- Submit via CourseWorks:
- Links to the pull request(s)
- A screenshot showing data in your database