music.model

Module contents

ORM layer containing the data model

model.config

class music.model.config.Config(*args, **kwargs)

Bases: fireo.models.model.Model

Service-level config data structure for app keys and settings

class Meta

Bases: object

collection_name = 'config'

Set correct path in Firestore

collection: fireo.managers.managers.Manager = <fireo.managers.managers.Manager object>
collection_name = 'config'
last_fm_client_id = None
playlist_cloud_operating_mode = None

Determines whether playlist and tag update operations are done by Cloud Tasks or Functions

secret_key = None
spotify_client_id = None
spotify_client_secret = None

model.playlist

class music.model.playlist.Playlist(*args, **kwargs)

Bases: fireo.models.model.Model

Smart playlist

Parameters

Model ([type]) – [description]

Returns

[description]

Return type

[type]

class Meta

Bases: object

collection_name = 'playlists'
add_last_month = None
add_this_month = None
chart_limit = None
chart_range = None
collection: fireo.managers.managers.Manager = <fireo.managers.managers.Manager object>
collection_name = 'playlists'
day_boundary = None
description_overwrite = None
description_suffix = None
include_library_tracks = None
include_recommendations = None
last_updated = None
lastfm_stat_album_count = None
lastfm_stat_album_percent = None
lastfm_stat_artist_count = None
lastfm_stat_artist_percent = None
lastfm_stat_count = None
lastfm_stat_last_refresh = None
lastfm_stat_percent = None
mutable_keys = ['type', 'include_recommendations', 'recommendation_sample', 'include_library_tracks', 'parts', 'playlist_references', 'shuffle', 'sort', 'description_overwrite', 'description_suffix', 'add_last_month', 'add_this_month', 'day_boundary', 'chart_range', 'chart_limit']
name = None
parts = None
playlist_references = None
recommendation_sample = None
shuffle = None
sort = None
to_dict()

Convert model into dict

type = None
uri = None
class music.model.playlist.Sort(value)

Bases: enum.Enum

An enumeration.

default = 1
release_date = 3
shuffle = 2

model.tag

class music.model.tag.Tag(*args, **kwargs)

Bases: fireo.models.model.Model

class Meta

Bases: object

collection_name = 'tags'
albums = None
artists = None
collection: fireo.managers.managers.Manager = <fireo.managers.managers.Manager object>
collection_name = 'tags'
count = None
last_updated = None
name = None
proportion = None
tag_id = None
time_objects = None
to_dict()

Convert model into dict

total_time = None
total_time_ms = None
total_user_scrobbles = None
tracks = None
username = None

model.user

class music.model.user.User(*args, **kwargs)

Bases: fireo.models.model.Model

class Meta

Bases: object

collection_name = 'spotify_users'
access_token = None
check_password(password)
collection: fireo.managers.managers.Manager = <fireo.managers.managers.Manager object>
collection_name = 'spotify_users'
email = None
last_login = None
last_refreshed = None
lastfm_username = None
locked = None
password = None
refresh_token = None
spotify_linked = None
to_dict()

Convert model into dict

token_expiry = None
type = None
username = None
validated = None