{"id":19644779,"url":"https://github.com/j-raghav/book-ratings","last_synced_at":"2026-05-04T15:41:10.663Z","repository":{"id":50167470,"uuid":"271234642","full_name":"J-Raghav/book-ratings","owner":"J-Raghav","description":"Book rating site made using Flask and Postgresql  database and data from Goodreads API","archived":false,"fork":false,"pushed_at":"2022-12-08T10:10:20.000Z","size":142,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-09T20:42:26.255Z","etag":null,"topics":["bootstrap4","flask","flask-application","flask-session","flask-sqlalchemy","jinja2-templates","login-system","pagination-support","postgresql","search-interface"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/J-Raghav.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-10T09:26:47.000Z","updated_at":"2020-07-16T18:30:01.000Z","dependencies_parsed_at":"2023-01-25T06:45:50.965Z","dependency_job_id":null,"html_url":"https://github.com/J-Raghav/book-ratings","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-Raghav%2Fbook-ratings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-Raghav%2Fbook-ratings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-Raghav%2Fbook-ratings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-Raghav%2Fbook-ratings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/J-Raghav","download_url":"https://codeload.github.com/J-Raghav/book-ratings/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240952925,"owners_count":19884019,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap4","flask","flask-application","flask-session","flask-sqlalchemy","jinja2-templates","login-system","pagination-support","postgresql","search-interface"],"created_at":"2024-11-11T14:29:56.884Z","updated_at":"2026-05-04T15:41:05.627Z","avatar_url":"https://github.com/J-Raghav.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Book Ratings\n\n##  **File: import.py**\n\n### functions\n\n- **create\\_tables**\n\n    - Input  : SCHEMA.sql ( for basic table structure )\n    - Output : Generate table present in SCHEMA.sql\n\n- **get\\_books\\_data** ( generator function)\n\n    - Input  : books.csv ( for list of isbn required for API request)\n    - Output : yields  information about books fetched from GOODREADS API  \n\n- **insert\\_books**\n\n    - Input  : Uses book data yielded by **get\\_books\\_data**\n    - Output : Inserts book data in Database at heroku\n\n## **File: application.py**\n\n### View\\_Functions\n\n- **index(page=1)**    :\n  - Path = [ _'/'_ ,  _'/page/\u003cint:page\u003e'_ ]  \n  - Returns  _index.html_  page.\n- **search(page=1)**   :\n  - Path = [ _'/search'_ , _'/search/page/\u003cint:page\u003e'_ ]\n  - Returns _search.html_ page or Redirects to _login_ view function.\n- **register()**         :\n  - Path = _'/register'_\n  - Returns _forms.html_ page or Redirects to _login_ view function.\n- **login()**            :\n  - Path = _'/login'_  \n  - Returns _forms.html_ page.\n- **logout()**           :\n  - Path =  _'/logout'_  \n  - Redirects to  _index_ view function.\n- **book(isbn)**       :\n  - Path =  _'/book/\u003cstring:isbn\u003e'_  \n  - Returns _book.html_ page.\n- **post\\_reviews()**    :\n  - Path =  _'/post'_  \n  - Redirects _book_ view function.\n- **book\\_info(isbn)** :\n  - Path = _'/api/\u003cstring:isbn\u003e'_  \n  - Returns **JSON response**.\n\n### Other Functions\n\n- **load\\_loggedin\\_user()** - loads logged in user if any. ( called before every request )\n- **login\\_required(view)**      - protects routes which require authorization. ( called before any protected view )\n  Protected Views - [ 'search', 'post_review' ]\n\n## **Dir: Templates**\n\n- **macros.html**        - Contains macros used as module only.\n  - _card(book, flag=True)_ : Used in **book.html**\n  - _form(title, hrefs, msg)_ : Used in **forms.html**\n  - _paginateBooks(endpoint, books, page, item=None)_ : Used in **search.html** and **index.html**\n\n- **layout.html**        - Contains basic layout used as base for all pages.   \n- **index.html**         - Home page\n- **forms.html**         - Register and Login pages  \n- **search.html**        - Search result page\n- **book.html**          - Book page\n- **error.html**         - Error page\n\n## **Dir: Static**\n\n- **master.css**         - Contains styles for all pages.\n\n\n## **Other Files**\n\n- **books.csv**          : Contains basic information about 5000 books used to get data about books in **import.py**.\n- **requirements.txt**  : Contains requirements of project meant o be installed by **pip install -r requirements.txt**.\n- **runtime.txt**       : Contains python runtime required for deployment to heroku.\n- **Procfile**          : Contains init info for deployment to heroku.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-raghav%2Fbook-ratings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj-raghav%2Fbook-ratings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-raghav%2Fbook-ratings/lists"}