stockstert.db package

Submodules

stockstert.db.MangaChapterGuess module

class stockstert.db.MangaChapterGuess.MangaChapterGuess(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Model

__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

guess

The current guess value

id

The ID is the primary key of the table and increments automatically

last_check

Indicates when the last check was

update() → bool

Updates the current value if more than an hour has elapsed since the last update :return: Whether or not the value was updated

stockstert.db.ModelMixin module

class stockstert.db.ModelMixin.ModelMixin

Bases: object

A mixin class that specifies a couple of methods all database models should implement

id = Column(None, Integer(), table=None, primary_key=True, nullable=False)

The ID is the primary key of the table and increments automatically

stockstert.db.models module

stockstert.db.models.create_tables(app: flask.app.Flask, db: flask_sqlalchemy.SQLAlchemy)

Module contents