All Projects → omaralbeik → flaskbooks

omaralbeik / flaskbooks

Licence: MIT License
A very light social network & RESTful API for sharing books using flask!

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
CSS
56736 projects
Makefile
30231 projects

Projects that are alternatives of or similar to flaskbooks

Python crawler
It's designed to be a simple, tiny, pratical python crawler using json and sqlite instead of mysql or mongdb. The destination website is Zhihu.com.
Stars: ✭ 45 (+136.84%)
Mutual labels:  sqlalchemy, sqlite3
Choochoo
Training Diary
Stars: ✭ 186 (+878.95%)
Mutual labels:  sqlalchemy, sqlite3
Qb
The database toolkit for go
Stars: ✭ 524 (+2657.89%)
Mutual labels:  sqlalchemy, sqlite3
reactant
Generate code for "models, views, and urls" based on Python type annotations. Supports Django REST, SQLAlchemy, Peewee.
Stars: ✭ 14 (-26.32%)
Mutual labels:  sqlalchemy, jinja2
chm-documentation
chm documentation PostgreSQL pgadmin3 SQLAlchemy Django Flask jinja2 webpy doc chm compiled html help Postgres Postgre документация russian
Stars: ✭ 17 (-10.53%)
Mutual labels:  sqlalchemy, jinja2
Statik
Multi-purpose static web site generator aimed at developers.
Stars: ✭ 249 (+1210.53%)
Mutual labels:  sqlalchemy, jinja2
Openimu
Open Source Analytics & Visualisation Software for Inertial Measurement Units
Stars: ✭ 133 (+600%)
Mutual labels:  sqlalchemy, sqlite3
roundup
un-official mirror of http://hg.code.sf.net/p/roundup/code -- used for CI. Please visit https://issues.roundup-tracker.org for finding starter issues or log new issues.
Stars: ✭ 20 (+5.26%)
Mutual labels:  jinja2, sqlite3
mara-db
Lightweight configuration and access to multiple databases in a single project
Stars: ✭ 36 (+89.47%)
Mutual labels:  sqlalchemy, backend
flask-tweeeter
A full-stack Twitter clone made using the Flask framework for Python 🐦
Stars: ✭ 28 (+47.37%)
Mutual labels:  sqlalchemy, jinja2
pyramid-cookiecutter-alchemy
[DEPRECATED - Please use https://github.com/pylons/pyramid-cookiecutter-starter instead] A Cookiecutter (project template) for creating a Pyramid project using SQLite for persistent storage, SQLAlchemy for an ORM, Alembic for database migrations, URL dispatch for routing, and Jinja2 for templating.
Stars: ✭ 39 (+105.26%)
Mutual labels:  sqlalchemy, jinja2
nim-gatabase
Connection-Pooling Compile-Time ORM for Nim
Stars: ✭ 103 (+442.11%)
Mutual labels:  sqlalchemy, sqlite3
coAST
Universal and language-independent abstract syntax tree
Stars: ✭ 30 (+57.89%)
Mutual labels:  jinja2
inspect
Source Code that Powers the CSGOFloat Inspect Link API
Stars: ✭ 220 (+1057.89%)
Mutual labels:  backend
buscaimoveis
Agregador de anúncios de imóveis a venda
Stars: ✭ 15 (-21.05%)
Mutual labels:  jinja2
hyper2web
Super Fast Backend Framework (Educational Purpose)
Stars: ✭ 28 (+47.37%)
Mutual labels:  backend
lego
LEGO Backend
Stars: ✭ 48 (+152.63%)
Mutual labels:  backend
HashExploit
HashExpoit is Great Tool For Cracking Hash
Stars: ✭ 17 (-10.53%)
Mutual labels:  sqlite3
mathesar
Web application providing an intuitive user experience to databases.
Stars: ✭ 95 (+400%)
Mutual labels:  sqlalchemy
Systemizer
A system design tool that allows you to simulate data flow of distributed systems.
Stars: ✭ 1,219 (+6315.79%)
Mutual labels:  backend

A very light social network for sharing books built using Flask and Python 3

Main Features

Web Endpoints

  • /books: All books (homepage).
  • /books/new: Create a new book.
  • /book/book_id: Book page.
  • /book/book_id/edit: Edit book.
  • /book/book_id/delete: Delete book.
  • /genres: All genres.
  • /genres/new: Create a new genre.
  • /genre/genre_id: Genre page.
  • /genre/genre_id/edit: Edit genre.
  • /genre/genre_id/delete: Delete genre.
  • /users: All users.
  • /user/user_id: User page.
  • /user/user_id/edit: Update user info.
  • /auth: Login page.

RESTful Endpoints

  • /books/JSON: All books JSON.
  • /book/book_id/JSON: Book JSON.
  • /genres/JSON: All genres JSON.
  • /genre/genre_id/JSON: Genre JSON.
  • /users/JSON: All users JSON.
  • /user/user_id/JSON: User JSON.

How to Run

Setup a Google+ authentication app

  1. go to https://console.developers.google.com/project and login with your Google account.
  2. Create a new project
  3. Select "API's and Auth -> Credentials -> Create a new OAuth client ID" from the project menu
  4. Select Web Application
  5. On the consent screen, type in a product name and save.
  6. In Authorized javascript origins add: http://0.0.0.0:5000 and http://localhost:5000
  7. Click create client ID
  8. Click download JSON and save it into the root director of this project.
  9. Rename the JSON file "client_secret.json"
  10. Replace the old client_secret.json file with yours

Run on a Vagrant virtual machine:

Please ensure you have Python, Vagrant and VirtualBox installed. This project uses a pre-congfigured Vagrant virtual machine which has all required packages installed.

  1. In the root directory, use the command vagrant up, this will install the vagrant machine.
  2. Once it's complete, type vagrant ssh to login to the VM.
  3. In the vm, cd /vagrant/flaskbooks
  4. type make to install dependencies and setup the database
  5. type python3 application.py to start the server.

Run on your Linux server:

  1. Use this tutorial from digitalocean to set up your Nginx and run the application on Ubuntu 16.04
  2. type make to install dependencies and setup the database

Open in your browser

Now you can open in a webpage by going to either: http://0.0.0.0:5000, http://localhost:5000, or your set domain

Project Structure

Data Model

flask-books stores data using SQLite3 and SQLAlchemy for object mapping.

Model objects:

  • User
  • Book
  • Genre
  • Like

Model Diagram

model.py

Support the project

Please star the project to let me know you liked it!

Get involved:

Your feedback is always appreciated and welcomed. Please send me an email to [email protected] if you have any questions, or fork the project and get your hand dirty with the code and submit a Pull Request :)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].