Life is about facing new challenges – Kostya Tszyu
Hi Pythonistas, a new week, a new ‘bite’ of Python programming! We love Django (#100DaysOfDjango) and Web APIs. Django REST framework combines the two. “Now is better than never.” – let’s jump right in and let’s use this week’s code challenge to build a simple API. In this article some ideas what we can build and links to resources to get started. Have fun and don’t forget to share (PR) your work, we can learn a lot from each other. Enjoy!
The Challenge
Building something is the best way to learn a new technology. We hope you find a longtime need for which DRF is a good fit. If you lack inspiration though here are some ideas:
-
Remember we did the House Inventory Tracker Challenge? We ended up building a simple API with Flask for that one. Maybe you want to give this a spin in DRF?
-
Another candidate we found in our challenge collection: Challenge Estimated Time API. Could be another one.
-
Some time ago we wrote an article / app: Simple API Part 2 – Building a Deep Work Logger with Flask, Slack and Google Docs. What if you use this concept with DRF instead of Google Docs?
-
Actually the Django app ideas we gave you for last week’s Django challenge could be used to build APIs as well.
-
A TODO list is cliche but could be a useful exercise to get the basics down. Here is an article that might be helpful. Or check out this tutorial.
-
Again, if you have better ideas or needs go for it! The goal is to build something using Django REST Framework. Surprise us and the community in your PR submissions 🙂
Bonus points:
- Add good test coverage.
- Get authentication right.
- Deploy your work to Heroku.
- Build a tool the PyBites community can actually use.
Resources
-
The quickstart guide is the fastest way to get up and running, and building APIs with REST framework.
-
Real Python has great coverage on the topic:
-
Some nice tutorials on Medium:
-
One more tutorial that just came out: Building a Web App From the Ground Up: Django Rest Framework API Development
-
Extra background: Talk Python had creator Tom Christie recently on: Episode #125: Django REST framework and a new API star is born
Get credit!
Take notice: the coolest working apps get a place under the #100DaysOfDjango project on our projects page!
See our INSTALL doc how to fork our challenges repo to get cracking.
This doc also provides you with instructions how you can submit your code to our community branch via a Pull Request (PR). We will feature your PRs in our start-of-the-week challenge review (previous editions).
Feedback
If you have ideas for a future challenge or find any issues, open a GH Issue or reach out directly.
Last but not least: there is no best solution, only learning more and better Python. Good luck!
Keep Calm and Code in Python!
— Bob and Julian