otaku_info_bot.db package¶
Submodules¶
otaku_info_bot.db.AnilistEntry module¶
-
class
otaku_info_bot.db.AnilistEntry.
AnilistEntry
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
Models an anilist entry
-
__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.
-
anilist_id
¶ The anilist ID of the entry
-
property
anilist_url
¶ - Returns
The URL to the anilist page
-
completed
¶ Whether or not the series is already completed
-
id
¶ The ID of the entry
-
latest
¶ The most recently released episode/chapter
-
media_type
¶ The media type of the entry
-
name
¶ The name of the series
-
releasing
¶ Whether or not the series is currently being released
-
otaku_info_bot.db.MangaChapterGuess module¶
-
class
otaku_info_bot.db.MangaChapterGuess.
MangaChapterGuess
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
Models a manga chapter guess
-
__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 anilist ID of the guess
-
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
-
otaku_info_bot.db.Notification module¶
-
class
otaku_info_bot.db.Notification.
Notification
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
Models a generic Notification
-
__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
-
property
diff
¶ The difference between the last update and the current entry value :return: The difference
-
entry
¶ The associated anilist entry
-
entry_id
¶ The ID of the associated anilist entry
-
id
¶ The ID of the notification
-
last_update
¶ The last notification update
-
property
user_diff
¶ - Returns
The difference between the user’s progress and the latest entry value
-
user_progress
¶ The user’s current progress
-
user_score
¶ Score that the user gave the entry
-
otaku_info_bot.db.RankedModeSetting module¶
-
class
otaku_info_bot.db.RankedModeSetting.
RankedModeSetting
(**kwargs)¶ Bases:
sqlalchemy.ext.declarative.api.Base
Stores a user’s preference for ranked mode
-
__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 setting
-
value
¶ The current value of the setting
-
otaku_info_bot.db.config module¶
-
class
otaku_info_bot.db.config.
AnimeNotificationConfig
(**kwargs)¶ Bases:
otaku_info_bot.db.config.NotificationConfig
,sqlalchemy.ext.declarative.api.Base
Configuration for anime updates
-
__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
-
anilist_username
¶
-
classmethod
default_list_name
() → str¶ - Returns
The default list name
-
id
¶
-
list_name
¶
-
classmethod
media_type
() → str¶ - Returns
The media type
-
-
class
otaku_info_bot.db.config.
MangaNotificationConfig
(**kwargs)¶ Bases:
otaku_info_bot.db.config.NotificationConfig
,sqlalchemy.ext.declarative.api.Base
Configuration for manga reminders
-
__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
-
anilist_username
¶
-
classmethod
default_list_name
() → str¶ - Returns
The default list name
-
id
¶
-
list_name
¶
-
classmethod
media_type
() → str¶ - Returns
The media type
-
-
class
otaku_info_bot.db.config.
NotificationConfig
¶ Bases:
object
Models generic anilist-related notification configurations
-
address
= <RelationshipProperty at 0x7f56830fa0c8; no key>¶
-
address_id
= Column(None, Integer(), ForeignKey('addressbook.id'), table=None)¶
-
anilist_username
= Column(None, String(length=255), table=None, nullable=False)¶ The anilist username to use
-
classmethod
default_list_name
() → str¶ - Returns
The default list name
-
id
= Column(None, Integer(), table=None, primary_key=True, nullable=False)¶ The ID of the config
-
list_name
= Column(None, String(length=255), table=None, nullable=False)¶ The anilist list
-
classmethod
media_type
() → str¶ - Returns
The media type
-