#100DaysOfWeb in Python Transcripts
Chapter: Days 9-12: API Star
Lecture: Day 3 & 4 - Your turn: build your own API

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Congratulations, you made it through day one and two watching all the lectures and I hope you learned a lot and got inspiration
0:10 to now build your own API. So in this module, day 3 and 4 is really for you to get practice. And for day 3 and 4, I suggest you go to a Mockaroo.
0:22 Look through the fake data you can get and see if there's any interesting data set you can come up with. If not, you can look for sites like Kaggle.
0:35 They have a lot of data sets. Or you can use our Marvel dataset which we used for code challenge some time ago.
0:46 So that's the Marvel character name, appearance, year and a bunch of data. And if you're not sure how to parse CSV we have code for that as well.
0:55 So you can just copy over this code to get it into a list of character multiples which makes it easy to work with. Whatever data set you come up with
1:04 then you're going to create a virtual environment and pip install apistar just as you saw me doing in a lesson.
1:09 And then you're going to build out the API. And here in demo, you have all the code that I used in this lesson so you can just define your object class
1:18 for the validators and then just copy these API methods over and fill them in however you want. I mean, the idea is to
1:27 even if you copy code, it doesn't really matter. If you practice, you retain so much more. And that's the goal of Day 3 and 4. Again, Day 4.
1:37 Take an extra day to really flesh out the API, implement GET, POST, PUT, DELETE. And if you have time left or you want to learn
1:46 a little bit about pytest, I suggest to also code some test and again in the demo sub directory. You have the test_app.py follow used in the lesson.
1:58 And you can just copy code from here and try it. Again, even if you just copy and paste and try to modify things, play with it.
2:06 You committed all to muscle memory and you might be doing this all from memory sooner than you realize. All right, so I think that's a good workout.
2:13 And at the end, we would love to hear what you come up with. So please do share out your progress. Use the #100DaysOfWeb hashtag
2:22 and feel free to include Talk Python and PyBites in your tweets. Again we are stoked when people put our lessons
2:30 and what they learned from us in practice and come up with cool projects. Learn a lot, and again, API is are very relevant today.
2:37 It's one of the best web skills you can learn. So really make use of this opportunity. Good luck.


Talk Python's Mastodon Michael Kennedy's Mastodon