Final Flashcards

1
Q

What are the 2 HTTP methods that are NOT part of a CRUD API?

A

PATCH & OPTIONS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What command did you run to start the Django built-in server?

A

python manage.py runserver

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The data used to import the book data into the books_book database was in what format?

A

JSON

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What Pandas command was frequently used in our labs to read a CSV file into a DataFrame?

A

pd.read_csv()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When you create a new repository on GitHub, what is the default branch name for the new repository?

A

main

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Once your books Django web application code is complete and the server is started, what is the result if you open this URL in your browser?
http://localhost:8000/admin/books/book/

A

The Django administration page for Books is displayed showing the “Select book to change” page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

When working with code for your CSC221__GroupProject repository on GitHub, what command could you use to show modified files in your working directory?

A

git status

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What command line tool did you use in the Django REST framework lab to view your databases books_book table, schema, and contents?

A

sqlite3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Web crawlers are used to:

A

extract information from a web page, and use the links on each web page to go through every other page on a website

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What relatively new REST API framework has gained the most popularity in recent years?

A

FastAPI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

When converting the class_books file to the format required for the Django import data file, what key:value pairs were copied from the original file for each book entry?

A
  • rank
  • title
  • author
  • year
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Using the REST API created in Lab 11, the following HTTP command results in what behavior?

GIVEN: There are only 30 books in the database and no additional ID values have been generated.

http PUT “:8000/books/api/45/” rank=45 title=”David Copperfield” author=”Charles Dickens” year=1849

A

None of the above -
The book was not added to or updated in database, or removed from the database

The only book added was The Count of Monte Cristo, the book that was updated was also The Count of Monte Cristo

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What import statement was required to use a library helpful in parsing webpage HTML?

A

from bs4 import BeautifulSoup

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What command did you run to create a new Django app named books?

A

python manage.py startapp books

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Once your books Django web application code is complete and the server is started, what is the result if you open this URL in your browser?

http://localhost:8000/admin/

A

The “Classic Books List” page is displayed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What Matplotlib command is required to render the plots/graphs you created visible when using Jupyter Notebook?

A

show()

17
Q

The result of the Group Project PART 1 code was the creation of a file containing web scraped data. What type of file was created?

A

CSV

18
Q

The REST API created during Lab 11 supported all the CRUD requests. What HTTP request method matches the CRUD request specified?

A

Update = HTTP POST

19
Q

Using the REST API created in Lab 11, the following HTTP command results in what behavior?

GIVEN: There are only 30 books in the database and no additional ID values have been generated.

http POST “:8000/books/api/” rank=36 title=”Gullivers Travels” author=”Johnathan Swift” year=1726

A

The book was added to the database

20
Q

Using the REST API created in Lab 11, the following HTTP command will produce what result.

GIVEN: There are only 30 books in the database and no additional ID values have been generated.

http DELETE “:8000/books/api/16/

A

HTTP/1.1 204 No Content

21
Q

What browser features are helpful when trying to inspect a web page for web scraping?

A

Browser developer tools

22
Q

When testing your REST API interface, what protocol was used?

A

HTTP

23
Q

What type of repository did you create in GitHub?

A

Private

24
Q

When using GitHub, what git command has a parameter -m ?

A

git commit

25
Q

When creating your Classic Books application using Django, how was your model information propagated to the database?

A

makemigrations