Coder Social home page Coder Social logo

saad0111 / books Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rezyaev/books

0.0 0.0 0.0 160 KB

This project is a Flask web application hosted on Heroku, used for finding information about books and add reviews for them.

Home Page: https://rezyayev-cs50w-project1.herokuapp.com/

Python 42.04% CSS 9.20% HTML 48.76%

books's Introduction

Project Overview

Hello and welcome! This project is a Flask web application hosted on Heroku, created using HTML, CSS, Bootstrap, Python, PostgreSQL and obviously Flask. You can find it online.

Overall, it is a service searching for information about books. When you access the website the first time, you will be asked to log in. You can create a new account and then search in a database with 5000 books. Book page consists of simple info about the book(title, author, publication year and ISBN number), user reviews and a rating from Goodreads.com, which I got using their API. Also, you can create get requests to /api/isbn, where ISBN is 10 or 13 digit number, and information about the book will be returned in JSON format.

Files

application.py - is a place with all server-side code. It creates a Flask app, sets up the database and adds several routes to be served.

import.py is used to import all information from book.csv to online database.

templates/ and static/ contain all HTML and CSS part of the web app.

All database commands were written with SQLalchemy module for python and raw SQL commands.

How to use Book's API

It's pretty simple. You just make GET request to this address - https://rezyayev-cs50w-project1.herokuapp.com/api/isbn, and use needed ISBN number. Example:

import requests

res = requests.get("https://rezyayev-cs50w-project1.herokuapp.com/api/1416949658")
return res.json()

This code will return JSON:

{
  'title': 'The Dark Is Rising',
  'author': 'Susan Cooper',
  'year': '1973',
  'isbn': '1416949658',
  'review_count': 47614,
  'average_score': '4.07'
}

books's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.