Review DELETE implementation in Python.
- [Instructor] The functionality for delete…isn't too challenging but it should have helped…with understanding the overall formatting of the engine.…I hope you had the chance to delete an existing quote…in the database using your code to test it out.…Did it work? Excellent.…Let's go over it just to clarify the pieces.…Scroll down to the quote class.…As I've mentioned, delete should happen…at the individual item level, not at the list.…First, it's going to be called like other operations…on the individual quotes.…
Self is the quote object and quote ID…is the ID we're getting from the path.…We've got a try except here to catch any errors.…The call to mongo needs to be done at the collection level.…So mongo.db.quotes.remove and then the object is placed…in the call to describe which objects to act on.…If there's an exception, the code throws a 400 error…and sends back the string.…Otherwise you get a 204 no content.…That sums up the exercises for Python.…I hope I helped you to get a feel…for the language and how it works.…
- Why become a polyglot programmer?
- Exploring Node.js, Python, Perl, and Ruby code
- Building on prior knowledge to learn new programming languages
- Learning API read and write functionality in Node.js, Python, Perl, and Ruby
- Implementing API functionality in Node.js, Python, Perl, and Ruby
Skill Level Intermediate
Building APIs Using Hapi in Node.jswith Kirsten Hunter2h 23m Intermediate
1. Becoming a Polyglot
Next steps1m 19s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.