otaku_info_web.db package¶
Submodules¶
otaku_info_web.db.MangaChapterGuess module¶
-
class
otaku_info_web.db.MangaChapterGuess.
MangaChapterGuess
(*args, **kwargs)¶ Bases:
puffotter.flask.db.ModelMixin.ModelMixin
,sqlalchemy.ext.declarative.api.Model
Database model that keeps track of manga chapter guesses.
-
__init__
(*args, **kwargs)¶ Initializes the Model :param args: The constructor arguments :param kwargs: The constructor keyword arguments
-
guess
¶ The actual guess for the most current chapter of the manga series
-
id
¶
-
last_update
¶ Timestamp from when the guess was last updated
-
media_id
¶ The media ID referenced by this manga chapter guess
-
media_id_id
¶ The ID of the media ID referenced by this manga chapter guess
-
update
()¶ Updates the manga chapter guess (if the latest guess is older than an hour) :return: None
-
otaku_info_web.db.MediaId module¶
-
class
otaku_info_web.db.MediaId.
MediaId
(*args, **kwargs)¶ Bases:
puffotter.flask.db.ModelMixin.ModelMixin
,sqlalchemy.ext.declarative.api.Model
Database model for media IDs. These are used to map media items to their corresponding external IDS on external sites.
-
__init__
(*args, **kwargs)¶ Initializes the Model :param args: The constructor arguments :param kwargs: The constructor keyword arguments
-
id
¶
-
manga_chapter_guesses
¶
-
media_item
¶ The media item referenced by this ID
-
media_item_id
¶ The ID of the media item referenced by this ID
-
media_user_states
¶
-
service
¶ The service for which this object represents an ID
-
property
service_icon
¶ - Returns
The path to the service’s icon file
-
service_id
¶ The ID of the media item on the external service
-
property
service_url
¶ - Returns
The URL to the series for the given service
-
otaku_info_web.db.MediaItem module¶
-
class
otaku_info_web.db.MediaItem.
MediaItem
(*args, **kwargs)¶ Bases:
puffotter.flask.db.ModelMixin.ModelMixin
,sqlalchemy.ext.declarative.api.Model
Database model for media items. These model a generic, site-agnostic representation of a series.
-
__init__
(*args, **kwargs)¶ Initializes the Model :param args: The constructor arguments :param kwargs: The constructor keyword arguments
-
cover_url
¶ An URL to a cover image of the media item
-
english_title
¶ The English title of the media item
-
id
¶
-
latest_release
¶ The latest release chapter/episode for this media item
-
media_ids
¶
-
media_subtype
¶ The subtype (for example, TV short, movie oneshot etc)
-
media_type
¶ The media type of the list item
-
releasing_state
¶ The current releasing state of the media item
-
romaji_title
¶ The Japanese title of the media item written in Romaji
-
property
title
¶ - Returns
The default title for the media item.
-
otaku_info_web.db.MediaList module¶
-
class
otaku_info_web.db.MediaList.
MediaList
(*args, **kwargs)¶ Bases:
puffotter.flask.db.ModelMixin.ModelMixin
,sqlalchemy.ext.declarative.api.Model
Database model for user-specific media lists.
-
__init__
(*args, **kwargs)¶ Initializes the Model :param args: The constructor arguments :param kwargs: The constructor keyword arguments
-
id
¶
-
media_list_items
¶
-
media_type
¶ The media type for this list
-
name
¶ The name of this list
-
service
¶ The service for which this list applies to
-
user
¶ The user associated with this list
-
user_id
¶ The ID of the user associated with this list
-
otaku_info_web.db.MediaListItem module¶
-
class
otaku_info_web.db.MediaListItem.
MediaListItem
(*args, **kwargs)¶ Bases:
puffotter.flask.db.ModelMixin.ModelMixin
,sqlalchemy.ext.declarative.api.Model
Database model for media list items. This model maps MediaLists and MediaUserStates
-
__init__
(*args, **kwargs)¶ Initializes the Model :param args: The constructor arguments :param kwargs: The constructor keyword arguments
-
id
¶
-
media_list
¶ The media list this list item is a part of
-
media_list_id
¶ The ID of the media list this list item is a part of
-
media_user_state
¶ The media user state this list item references
-
media_user_state_id
¶ The ID of the media user state this list item references
-
otaku_info_web.db.MediaNotification module¶
-
class
otaku_info_web.db.MediaNotification.
MediaNotification
(*args, **kwargs)¶ Bases:
puffotter.flask.db.ModelMixin.ModelMixin
,sqlalchemy.ext.declarative.api.Model
Database model that stores a media notification for a user
-
__init__
(*args, **kwargs)¶ Initializes the Model :param args: The constructor arguments :param kwargs: The constructor keyword arguments
-
id
¶
-
last_update
¶ The last update value sent to the user
-
media_user_state
¶ The media user state this notification references
-
media_user_state_id
¶ The ID of the media user state this notification references
-
otaku_info_web.db.MediaRelation module¶
otaku_info_web.db.MediaUserState module¶
-
class
otaku_info_web.db.MediaUserState.
MediaUserState
(*args, **kwargs)¶ Bases:
puffotter.flask.db.ModelMixin.ModelMixin
,sqlalchemy.ext.declarative.api.Model
Database model that keeps track of a user’s entries on external services for a media item
-
__init__
(*args, **kwargs)¶ Initializes the Model :param args: The constructor arguments :param kwargs: The constructor keyword arguments
-
consuming_state
¶ The current consuming state of the user for this media item
-
id
¶
-
media_id
¶ The media ID referenced by this user state
-
media_id_id
¶ The ID of the media ID referenced by this user state
-
media_list_items
¶
-
media_notifications
¶
-
progress
¶ The user’s current progress consuming the media item
-
score
¶ The user’s score for the references media item
-
user
¶ The user associated with this user state
-
user_id
¶ The ID of the user associated with this user state
-
otaku_info_web.db.NotificationSetting module¶
-
class
otaku_info_web.db.NotificationSetting.
NotificationSetting
(*args, **kwargs)¶ Bases:
puffotter.flask.db.ModelMixin.ModelMixin
,sqlalchemy.ext.declarative.api.Model
Database model that stores notification settings for a user
-
__init__
(*args, **kwargs)¶ Initializes the Model :param args: The constructor arguments :param kwargs: The constructor keyword arguments
-
id
¶
-
notification_type
¶ The notification type
-
user
¶ The user associated with this notification setting
-
user_id
¶ The ID of the user associated with this notification setting
-
value
¶ Whether or not the notification is active or not
-
otaku_info_web.db.ServiceUsername module¶
-
class
otaku_info_web.db.ServiceUsername.
ServiceUsername
(*args, **kwargs)¶ Bases:
puffotter.flask.db.ModelMixin.ModelMixin
,sqlalchemy.ext.declarative.api.Model
Database model that stores an external service username for a user
-
__init__
(*args, **kwargs)¶ Initializes the Model :param args: The constructor arguments :param kwargs: The constructor keyword arguments
-
id
¶
-
service
¶ The external service this item is a username for
-
user
¶ The user associated with this service username
-
user_id
¶ The ID of the user associated with this service username
-
username
¶ The service username
-
otaku_info_web.db.TelegramChatId module¶
-
class
otaku_info_web.db.TelegramChatId.
TelegramChatId
(*args, **kwargs)¶ Bases:
puffotter.flask.db.ModelMixin.ModelMixin
,sqlalchemy.ext.declarative.api.Model
Database model that stores a telegram chat ID for a user
-
__init__
(*args, **kwargs)¶ Initializes the Model :param args: The constructor arguments :param kwargs: The constructor keyword arguments
-
chat_id
¶ The telegram chat ID
-
id
¶
-
send_message
(text: str)¶ Sends a message to the chat ID :param text: The text to send :return: None
-
user
¶ The user associated with this telegram chat ID
-
user_id
¶ The ID of the user associated with this telegram chat ID
-
Module contents¶
-
otaku_info_web.db.
models
: List[sqlalchemy.ext.declarative.api.Model] = [<class 'otaku_info_web.db.MangaChapterGuess.MangaChapterGuess'>, <class 'otaku_info_web.db.MediaId.MediaId'>, <class 'otaku_info_web.db.MediaItem.MediaItem'>, <class 'otaku_info_web.db.MediaList.MediaList'>, <class 'otaku_info_web.db.MediaListItem.MediaListItem'>, <class 'otaku_info_web.db.MediaUserState.MediaUserState'>, <class 'otaku_info_web.db.ServiceUsername.ServiceUsername'>, <class 'otaku_info_web.db.TelegramChatId.TelegramChatId'>, <class 'otaku_info_web.db.MediaNotification.MediaNotification'>, <class 'otaku_info_web.db.NotificationSetting.NotificationSetting'>]¶ The database models of the application