1
0
mirror of https://github.com/enpaul/kodak.git synced 2024-11-14 10:36:55 +00:00
kodak/fresnel_lens/constants.py

42 lines
739 B
Python

import enum
import peewee
class DatabaseBackend(enum.Enum):
MARIADB = peewee.MySQLDatabase
SQLITE = peewee.SqliteDatabase
class DimensionStrategy(enum.Enum):
CROP = enum.auto()
SCALE = enum.auto()
RELATIVE = enum.auto()
class ImageFormat(enum.Enum):
JPEG = enum.auto()
PNG = enum.auto()
GIF = enum.auto()
class Anchor(enum.Enum):
TL = "top-left"
TC = "top-center"
TR = "top-center"
CL = "center-left"
C = "center"
CR = "center-right"
BL = "bottom-left"
BC = "bottom-center"
BR = "bottom-right"
DEFAULT_SQLITE_PRAGMAS = {
"journal_mode": "wal",
"cache_size": -1 * 64000,
"foreign_keys": 1,
"ignore_check_constraints": 0,
"synchronous": 0,
}