DEV Community

Cover image for Creating a Quote API With Python and Flask
Dadda Hicham
Dadda Hicham

Posted on

4 2

Creating a Quote API With Python and Flask

Introduction

Hi Every body I just created a quote API With CRUD operations and I Want To share it with you if You Want to Use It To Learn Asynchronous Programming or any things I Already Live And You Can Access it from Here : QuoteApi

Features

  • Authentication System (unique Username And Email)
  • Add and Delete Quote
  • Authorization ( You Can't Delete Others Quotes)
  • End Point Support
  • Created Using Python and flask and MySQL as the Database
  • Use Environment Variables ### Project Repo :

Github Link

Use The API

  • Access All Quotes
https://quoteapibydaddasoft.herokuapp.com/api/quotes

Returned Data Structure :
"author": "",
"body": "",
"category": "",
"createdAt": "",
"id": "",
"updatedAt": ""
Enter fullscreen mode Exit fullscreen mode
  • Pagination ( with some Helpful information )
https://quoteapibydaddasoft.herokuapp.com/api/quotes?page=1
{
"data": [
{
"author": "",
"body": "",
"category": "",
"createdAt": "",
"id": "",
"updatedAt": ""
}],
"pagination": {
"currentPage": 1,
"nextpage": 2,
"pages": 8,
"prevPage": null
}
}
Enter fullscreen mode Exit fullscreen mode
  • Get a Random Quotes
https://quoteapibydaddasoft.herokuapp.com/api/quotes/random

{
"author": "",
"body": "",
"category": "",
"createdAt": "",
"id": "",
"updatedAt": ""
}
Enter fullscreen mode Exit fullscreen mode

Screenshot

Alt Text

Alt Text

Alt Text

Alt Text

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

The best way to debug slow web pages cover image

The best way to debug slow web pages

Tools like Page Speed Insights and Google Lighthouse are great for providing advice for front end performance issues. But what these tools can’t do, is evaluate performance across your entire stack of distributed services and applications.

Watch video

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay