Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Flask REST API!
You have completed Flask REST API!
Preview
With resources defined and everything connected with Blueprints, it's time to handle incoming arguments. Flask-RESTful provides a solid tool known as Reqparse for specifying and validating submitted data.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
like a title and URL for the courses, and
also what those pieces of data should be.
0:00
Title should be strings, for example.
0:04
If we were doing this with models and
0:07
views, we'd use a form or
some other sort of validation library.
0:08
Flask restful actually provides
a validation library for
0:12
us that works really well,
it's called reqparse, and it's for
0:15
parsing requests,
let's go see how to use it.
0:18
So once I get reqparse set up,
0:22
I'm gonna be using Postman to
test the API that I'm building.
0:24
This is a good time for you to go and
get it installed though, there is both
0:28
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up