xkcd_bot.db package

Submodules

xkcd_bot.db.Comic module

class xkcd_bot.db.Comic.Comic(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base

Models an XKCD comic

__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.

alt_text

The comic’s alt text

id

The ID of the comic (same as on the website itself)

image_data

The image’s data

image_url

The URL of the image for this comic

title

The comic’s title

xkcd_bot.db.Subscription module

class xkcd_bot.db.Subscription.Subscription(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base

Models a subscription for new XKCD comics

__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.

address

The associated address

address_id

The ID of the associated address

id

The ID of the subscription

last_comic

The last subscription comic to be sent to the user

last_comic_id

The ID of the last subscription comic to be sent to the user

Module contents