-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
42 lines (34 loc) · 1006 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import String, Integer, Float, TEXT
# Database configuration
SQLALCHEMY_DATABASE_URI = 'sqlite:///books.db'
SQLALCHEMY_TRACK_MODIFICATIONS = False
IMAGE_DIR = 'static/images/covers'
INDEX_PAGE_TITLE = "Mrunal's Book Tracker"
INDEX_PAGE_HEADER = "Mrunal's Books"
# Google Books API key
with open("googlebooksapikey", "r") as f:
GOOGLE_API_KEY = f.read().strip()
BOOK_STATUSES = {
'Currently Reading': 'Currently Reading',
'Planning to Read': 'Planning to Read',
'Read': 'Read'
}
DISABLED = ['intro_vid']
# Initialize SQLAlchemy instance
db = SQLAlchemy()
# Fields to capture
FIELDS = {
"title": String(150),
"authors": String(150),
"cover": String(400),
"cover_path": String(400),
"status": String(50),
"current_page": Integer,
"pageCount": Integer,
"averageRating": Float,
"industryIdentifiers": TEXT,
"is_favorite": Integer,
"is_enabled": Integer,
"description": String(500)
}