Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You've been given data on passengers of the Titanic in a SQLite file, and you want to create an API that will serve the data
You've been given data on passengers of the Titanic in a SQLite file, and you want to create an API that will serve the data in a JSON format. You've created a bare-bones Flask app that connects to the SQLite database and serves a welcome page. Eventually, you will add two endpoints: one that returns a list of all passenger names, and a more detailed endpoint that returns a list of all passengers, including their name, age, and sex. But first, you need a reference to the passenger table in the SQLite database. On line 11, what does Passenger need to have assigned to it so that it will refer to the passenger table in the SQLite database? passenger Base.classes.passenger sqlite: ///titanic.sqlite/passengers Base.tables.passenger
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started