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

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →