Flask Requirements

This flask has Python in it, not java!

  1. Do a simple Hello

  2. Do a simple math

  3. Use try/except in Flask

  4. How to change port number in Flask

  5. How to enable debugging in Flask

  6. How to add logger in Flask

  7. How to get environment variable in Flask

  8. How to return a dict in the Flask API

  9. Create two same API end points and see whether it works or not

  10. Try to accept only float in Request param

  11. Try to get city in the Flask request param

  12. Try to consume an API (https://reqres.in/api/users/2) in Flask API itself

  13. Come up with a small decorator to validate the reqeust parameters

  14. Create a post method in Flask with 2 inputs (name, city) and print them

  15. Create a simple Flask api to return the reversed string (when I input "hello", it should return "olleh")

  16. Return the current IP by using some IP utils in Flask API

  17. Translate any word from English to Spanish by using Googletrans python library in Flask API.

  18. Create a simple form in Jinja template and access them via Flask API

  19. Upload a simple text file in Flask API and Jinja

  20. Write one line file in a text file and upload them in Flask by using Jinja. Flask API has to return how many words in the text file.

  21. Have some city names in a text file (see below)

Chennai
Toronto
Montreal
Madurai
Chennai
Montreal
Toronto

You need to upload the file via Jinja and then it should return the unique cities as a list like below:

{
    "result" : [
        "Chennai",
        "Toronto",
        "Montreal",
        "Madurai"
    ]
}

22. abd

23. abc

Last updated