It's not that I'm so smart, it's just that I stay with problems longer. - A. Einstein
Hi Pythonistas, you heard of Daily Python Tip? It's a Twitter account that posts one python tip per day, run by @karlafej and @simecek. We partnered up with them and use their awesome collection of tips to build a web app (part 1) and a simple API (part 2).
If you built a web app for part 1 you could use its data / backend. If not just use the Daily Python Tip's backend. We want this challenge to be independent so API lovers are not required to build a web app first.
The goal is to make a simple API using Flask, Django Rest Framework of another (Python) framework. Something the guys at Daily Python Tip could actually use!
HTTP verbs / actions:
- GET -> here is their google spreadsheet
POST -> here is their Google form. "We are consenting adults" so we should prevent duplicates and bad data to be entered so you should add proper validation:
- no duplicate postings,
- max length of 140 characters (tips gets posted to Twitter),
- discard new tips that are too similar to existing (this might be complex but give it some thought ...)
If you took part 1 and are using your own DB / backend you could also implement:
- PUT (edit) -> for example make the Published boolean editable
- DELETE -> not sure if applicable but could be used to remove bad data
- Add Twitter login / authentication to your API so you can implement more actions:
- Only allow POST upon login
- Add your Twitter handle upon POSTing a new tip
- Make a user endpoint with likes, bookmarks, etc
- Be creative ...
- Host it to the cloud (Heroku, PythonAnywhere, ...)
For a beginner some of our challenges might be overwhelming. Another observation is that the process of doing these challenges is as interesting as the final result.
We are eager to expand our awesome PyBites community. For this reason we are opening up our private Slack for you to discuss our code challenges and let us know how you're progressing your Python skills. Send us an email if you want to join.
This way you get the unique opportunity to learn from other Pythonistas and share some of your own learning.
Our goal is to learn and teach you Python through practical exercises. Learning a programming language is way more fun as a community!
Keep Calm and Code in Python!
See an error in this post? Please submit a pull request on Github.