Wrapping up

To test the APIs, you can use the Swagger documentation available on the / route, or you can use Postman. Let's run the server and test it.

In this tutorial, we learned how to scrape data from a website using requests and Beautiful Soup. Then we created an API using Flask and Flask-RESTX.

If you wish to learn how to interact with APIs using Python, check out this guide.

I hope you enjoyed it – and thanks for reading!

Code for the tutorial: https://github.com/ashutoshkrris/Horoscope-API

Discussion
@ashutoshkrris Hi ! I Is there any way I can contact you for help. The DM of commudle is not working from my side.

You can DM me on Twitter @ashutoshkrris

I am trying to do the same but I am getting this error "Import "decouple" could not be resolvedPylancereportMissingImports" and I install every package properly

Hi Priyanka Is your code pushed somewhere so that I can see? Are you sure, you've installed python-decouple in your virtual environment?

This is super amazing Ashutosh! You are awesome :)

1

5

3