This commit is contained in:
Sarsoo 2021-03-24 10:15:52 +00:00
parent a3b82dd616
commit 3bf7defaa1
32 changed files with 665 additions and 560 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
_images/Playlists.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View File

@ -14,12 +14,16 @@ Music Tools
src/music.model
src/music.tasks
Music Tools
-------------
`Music Tools <https://music.sarsoo.xyz>`_
----------------------------------------------
.. image:: https://github.com/sarsoo/music-tools/workflows/test%20and%20deploy/badge.svg
Music Tools is a web app for creating smart Spotify playlists.
Music Tools is a web app for creating smart Spotify playlists. The app is based on `spotframework <https://github.com/Sarsoo/spotframework>`_ and `fmframework <https://github.com/Sarsoo/pyfmframework>`_ for interfacing with Spotify and Last.fm. The app is currently hosted on Google's Cloud Platform.
The system is composed of a Flask web server with a Fireo ORM layer and longer tasks dispatched to Cloud Tasks or Functions.
.. image:: Playlists.png
Indices and tables

View File

@ -1,73 +1,6 @@
music.api package
music.api
=================
Submodules
----------
music.api.admin module
----------------------
.. automodule:: music.api.admin
:members:
:undoc-members:
:show-inheritance:
music.api.api module
--------------------
.. automodule:: music.api.api
:members:
:undoc-members:
:show-inheritance:
music.api.decorators module
---------------------------
.. automodule:: music.api.decorators
:members:
:undoc-members:
:show-inheritance:
music.api.fm module
-------------------
.. automodule:: music.api.fm
:members:
:undoc-members:
:show-inheritance:
music.api.player module
-----------------------
.. automodule:: music.api.player
:members:
:undoc-members:
:show-inheritance:
music.api.spotfm module
-----------------------
.. automodule:: music.api.spotfm
:members:
:undoc-members:
:show-inheritance:
music.api.spotify module
------------------------
.. automodule:: music.api.spotify
:members:
:undoc-members:
:show-inheritance:
music.api.tag module
--------------------
.. automodule:: music.api.tag
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
@ -75,3 +8,67 @@ Module contents
:members:
:undoc-members:
:show-inheritance:
api.admin
----------------------
.. automodule:: music.api.admin
:members:
:undoc-members:
:show-inheritance:
api.api
--------------------
.. automodule:: music.api.api
:members:
:undoc-members:
:show-inheritance:
api.decorators
---------------------------
.. automodule:: music.api.decorators
:members:
:undoc-members:
:show-inheritance:
api.fm
-------------------
.. automodule:: music.api.fm
:members:
:undoc-members:
:show-inheritance:
api.player
-----------------------
.. automodule:: music.api.player
:members:
:undoc-members:
:show-inheritance:
api.spotfm
-----------------------
.. automodule:: music.api.spotfm
:members:
:undoc-members:
:show-inheritance:
api.spotify
------------------------
.. automodule:: music.api.spotify
:members:
:undoc-members:
:show-inheritance:
api.tag
--------------------
.. automodule:: music.api.tag
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,17 +1,6 @@
music.auth package
music.auth
==================
Submodules
----------
music.auth.auth module
----------------------
.. automodule:: music.auth.auth
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
@ -19,3 +8,11 @@ Module contents
:members:
:undoc-members:
:show-inheritance:
auth.auth
----------------------
.. automodule:: music.auth.auth
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,25 +1,6 @@
music.cloud package
music.cloud
===================
Submodules
----------
music.cloud.function module
---------------------------
.. automodule:: music.cloud.function
:members:
:undoc-members:
:show-inheritance:
music.cloud.tasks module
------------------------
.. automodule:: music.cloud.tasks
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
@ -27,3 +8,19 @@ Module contents
:members:
:undoc-members:
:show-inheritance:
cloud.function
---------------------------
.. automodule:: music.cloud.function
:members:
:undoc-members:
:show-inheritance:
cloud.tasks
------------------------
.. automodule:: music.cloud.tasks
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,8 +1,13 @@
music.db package
music.db
================
Submodules
----------
Module contents
---------------
.. automodule:: music.db
:members:
:undoc-members:
:show-inheritance:
music.db.database module
------------------------
@ -19,11 +24,3 @@ music.db.part\_generator module
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: music.db
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,41 +1,6 @@
music.model package
music.model
===================
Submodules
----------
music.model.config module
-------------------------
.. automodule:: music.model.config
:members:
:undoc-members:
:show-inheritance:
music.model.playlist module
---------------------------
.. automodule:: music.model.playlist
:members:
:undoc-members:
:show-inheritance:
music.model.tag module
----------------------
.. automodule:: music.model.tag
:members:
:undoc-members:
:show-inheritance:
music.model.user module
-----------------------
.. automodule:: music.model.user
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
@ -43,3 +8,35 @@ Module contents
:members:
:undoc-members:
:show-inheritance:
model.config
-------------------------
.. automodule:: music.model.config
:members:
:undoc-members:
:show-inheritance:
model.playlist
---------------------------
.. automodule:: music.model.playlist
:members:
:undoc-members:
:show-inheritance:
model.tag
----------------------
.. automodule:: music.model.tag
:members:
:undoc-members:
:show-inheritance:
model.user
-----------------------
.. automodule:: music.model.user
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,4 +1,4 @@
music package
music
=============
Subpackages
@ -14,8 +14,13 @@ Subpackages
music.model
music.tasks
Submodules
----------
Module contents
---------------
.. automodule:: music
:members:
:undoc-members:
:show-inheritance:
music.music module
------------------
@ -24,11 +29,3 @@ music.music module
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: music
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,41 +1,6 @@
music.tasks package
music.tasks
===================
Submodules
----------
music.tasks.create\_playlist module
-----------------------------------
.. automodule:: music.tasks.create_playlist
:members:
:undoc-members:
:show-inheritance:
music.tasks.refresh\_lastfm\_stats module
-----------------------------------------
.. automodule:: music.tasks.refresh_lastfm_stats
:members:
:undoc-members:
:show-inheritance:
music.tasks.run\_user\_playlist module
--------------------------------------
.. automodule:: music.tasks.run_user_playlist
:members:
:undoc-members:
:show-inheritance:
music.tasks.update\_tag module
------------------------------
.. automodule:: music.tasks.update_tag
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
@ -43,3 +8,35 @@ Module contents
:members:
:undoc-members:
:show-inheritance:
tasks.create\_playlist
-----------------------------------
.. automodule:: music.tasks.create_playlist
:members:
:undoc-members:
:show-inheritance:
tasks.refresh\_lastfm\_stats
-----------------------------------------
.. automodule:: music.tasks.refresh_lastfm_stats
:members:
:undoc-members:
:show-inheritance:
tasks.run\_user\_playlist
--------------------------------------
.. automodule:: music.tasks.run_user_playlist
:members:
:undoc-members:
:show-inheritance:
tasks.update\_tag
------------------------------
.. automodule:: music.tasks.update_tag
:members:
:undoc-members:
:show-inheritance:

View File

@ -830,13 +830,13 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="src/modules.html">Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.html">music package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.api.html">music.api package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.auth.html">music.auth package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.cloud.html">music.cloud package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.db.html">music.db package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.model.html">music.model package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.tasks.html">music.tasks package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.html">music</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.api.html">music.api</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.auth.html">music.auth</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.cloud.html">music.cloud</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.db.html">music.db</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.model.html">music.model</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.tasks.html">music.tasks</a></li>
</ul>
<div class="relations">

View File

@ -37,18 +37,20 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="src/modules.html">Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.html">music package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.api.html">music.api package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.auth.html">music.auth package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.cloud.html">music.cloud package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.db.html">music.db package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.model.html">music.model package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.tasks.html">music.tasks package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.html">music</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.api.html">music.api</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.auth.html">music.auth</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.cloud.html">music.cloud</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.db.html">music.db</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.model.html">music.model</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.tasks.html">music.tasks</a></li>
</ul>
</div>
<div class="section" id="id1">
<h2>Music Tools<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h2>
<img alt="https://github.com/sarsoo/music-tools/workflows/test%20and%20deploy/badge.svg" src="https://github.com/sarsoo/music-tools/workflows/test%20and%20deploy/badge.svg" /><p>Music Tools is a web app for creating smart Spotify playlists.</p>
<div class="section" id="id2">
<h2><a class="reference external" href="https://music.sarsoo.xyz">Music Tools</a><a class="headerlink" href="#id2" title="Permalink to this headline"></a></h2>
<img alt="https://github.com/sarsoo/music-tools/workflows/test%20and%20deploy/badge.svg" src="https://github.com/sarsoo/music-tools/workflows/test%20and%20deploy/badge.svg" /><p>Music Tools is a web app for creating smart Spotify playlists. The app is based on <a class="reference external" href="https://github.com/Sarsoo/spotframework">spotframework</a> and <a class="reference external" href="https://github.com/Sarsoo/pyfmframework">fmframework</a> for interfacing with Spotify and Last.fm. The app is currently hosted on Googles Cloud Platform.</p>
<p>The system is composed of a Flask web server with a Fireo ORM layer and longer tasks dispatched to Cloud Tasks or Functions.</p>
<img alt="_images/Playlists.png" src="_images/Playlists.png" />
</div>
</div>
<div class="section" id="indices-and-tables">
@ -80,13 +82,13 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="src/modules.html">Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.html">music package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.api.html">music.api package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.auth.html">music.auth package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.cloud.html">music.cloud package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.db.html">music.db package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.model.html">music.model package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.tasks.html">music.tasks package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.html">music</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.api.html">music.api</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.auth.html">music.auth</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.cloud.html">music.cloud</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.db.html">music.db</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.model.html">music.model</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.tasks.html">music.tasks</a></li>
</ul>
<div class="relations">

Binary file not shown.

View File

@ -212,13 +212,13 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="src/modules.html">Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.html">music package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.api.html">music.api package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.auth.html">music.auth package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.cloud.html">music.cloud package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.db.html">music.db package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.model.html">music.model package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.tasks.html">music.tasks package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.html">music</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.api.html">music.api</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.auth.html">music.auth</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.cloud.html">music.cloud</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.db.html">music.db</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.model.html">music.model</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.tasks.html">music.tasks</a></li>
</ul>
<div class="relations">

View File

@ -77,13 +77,13 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="src/modules.html">Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.html">music package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.api.html">music.api package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.auth.html">music.auth package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.cloud.html">music.cloud package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.db.html">music.db package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.model.html">music.model package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.tasks.html">music.tasks package</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.html">music</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.api.html">music.api</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.auth.html">music.auth</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.cloud.html">music.cloud</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.db.html">music.db</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.model.html">music.model</a></li>
<li class="toctree-l1"><a class="reference internal" href="src/music.tasks.html">music.tasks</a></li>
</ul>
<div class="relations">

File diff suppressed because one or more lines are too long

View File

@ -14,7 +14,7 @@
<script src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="music package" href="music.html" />
<link rel="next" title="music" href="music.html" />
<link rel="prev" title="Music Tools" href="../index.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
@ -36,64 +36,57 @@
<h1>music<a class="headerlink" href="#music" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="music.html">music package</a><ul>
<li class="toctree-l1"><a class="reference internal" href="music.html">music</a><ul>
<li class="toctree-l2"><a class="reference internal" href="music.html#subpackages">Subpackages</a><ul>
<li class="toctree-l3"><a class="reference internal" href="music.api.html">music.api package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="music.api.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.api.html#module-music.api.admin">music.api.admin module</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.api.html#module-music.api.api">music.api.api module</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.api.html#module-music.api.decorators">music.api.decorators module</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.api.html#module-music.api.fm">music.api.fm module</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.api.html#module-music.api.player">music.api.player module</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.api.html#module-music.api.spotfm">music.api.spotfm module</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.api.html#module-music.api.spotify">music.api.spotify module</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.api.html#module-music.api.tag">music.api.tag module</a></li>
<li class="toctree-l3"><a class="reference internal" href="music.api.html">music.api</a><ul>
<li class="toctree-l4"><a class="reference internal" href="music.api.html#module-music.api">Module contents</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.api.html#module-music.api.admin">api.admin</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.api.html#module-music.api.api">api.api</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.api.html#module-music.api.decorators">api.decorators</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.api.html#module-music.api.fm">api.fm</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.api.html#module-music.api.player">api.player</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.api.html#module-music.api.spotfm">api.spotfm</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.api.html#module-music.api.spotify">api.spotify</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.api.html#module-music.api.tag">api.tag</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="music.auth.html">music.auth package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="music.auth.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.auth.html#module-music.auth.auth">music.auth.auth module</a></li>
<li class="toctree-l3"><a class="reference internal" href="music.auth.html">music.auth</a><ul>
<li class="toctree-l4"><a class="reference internal" href="music.auth.html#module-music.auth">Module contents</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.auth.html#module-music.auth.auth">auth.auth</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="music.cloud.html">music.cloud package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="music.cloud.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.cloud.html#module-music.cloud.function">music.cloud.function module</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.cloud.html#module-music.cloud.tasks">music.cloud.tasks module</a></li>
<li class="toctree-l3"><a class="reference internal" href="music.cloud.html">music.cloud</a><ul>
<li class="toctree-l4"><a class="reference internal" href="music.cloud.html#module-music.cloud">Module contents</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.cloud.html#module-music.cloud.function">cloud.function</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.cloud.html#module-music.cloud.tasks">cloud.tasks</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="music.db.html">music.db package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="music.db.html#submodules">Submodules</a></li>
<li class="toctree-l3"><a class="reference internal" href="music.db.html">music.db</a><ul>
<li class="toctree-l4"><a class="reference internal" href="music.db.html#module-music.db">Module contents</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.db.html#module-music.db.database">music.db.database module</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.db.html#module-music.db.part_generator">music.db.part_generator module</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.db.html#module-music.db">Module contents</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="music.model.html">music.model package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="music.model.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.model.html#module-music.model.config">music.model.config module</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.model.html#module-music.model.playlist">music.model.playlist module</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.model.html#module-music.model.tag">music.model.tag module</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.model.html#module-music.model.user">music.model.user module</a></li>
<li class="toctree-l3"><a class="reference internal" href="music.model.html">music.model</a><ul>
<li class="toctree-l4"><a class="reference internal" href="music.model.html#module-music.model">Module contents</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.model.html#module-music.model.config">model.config</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.model.html#module-music.model.playlist">model.playlist</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.model.html#module-music.model.tag">model.tag</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.model.html#module-music.model.user">model.user</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="music.tasks.html">music.tasks package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="music.tasks.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.tasks.html#module-music.tasks.create_playlist">music.tasks.create_playlist module</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.tasks.html#module-music.tasks.refresh_lastfm_stats">music.tasks.refresh_lastfm_stats module</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.tasks.html#module-music.tasks.run_user_playlist">music.tasks.run_user_playlist module</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.tasks.html#module-music.tasks.update_tag">music.tasks.update_tag module</a></li>
<li class="toctree-l3"><a class="reference internal" href="music.tasks.html">music.tasks</a><ul>
<li class="toctree-l4"><a class="reference internal" href="music.tasks.html#module-music.tasks">Module contents</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.tasks.html#module-music.tasks.create_playlist">tasks.create_playlist</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.tasks.html#module-music.tasks.refresh_lastfm_stats">tasks.refresh_lastfm_stats</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.tasks.html#module-music.tasks.run_user_playlist">tasks.run_user_playlist</a></li>
<li class="toctree-l4"><a class="reference internal" href="music.tasks.html#module-music.tasks.update_tag">tasks.update_tag</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="music.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.html#module-music.music">music.music module</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.html#module-music">Module contents</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.html#module-music.music">music.music module</a></li>
</ul>
</li>
</ul>
@ -120,13 +113,13 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.html">music package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.api.html">music.api package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.auth.html">music.auth package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.cloud.html">music.cloud package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.db.html">music.db package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.model.html">music.model package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.tasks.html">music.tasks package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.html">music</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.api.html">music.api</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.auth.html">music.auth</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.cloud.html">music.cloud</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.db.html">music.db</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.model.html">music.model</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.tasks.html">music.tasks</a></li>
</ul>
<div class="relations">
@ -134,7 +127,7 @@
<ul>
<li><a href="../index.html">Documentation overview</a><ul>
<li>Previous: <a href="../index.html" title="previous chapter">Music Tools</a></li>
<li>Next: <a href="music.html" title="next chapter">music package</a></li>
<li>Next: <a href="music.html" title="next chapter">music</a></li>
</ul></li>
</ul>
</div>

View File

@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>music.api package &#8212; Music Tools documentation</title>
<title>music.api &#8212; Music Tools documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
@ -14,8 +14,8 @@
<script src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="music.auth package" href="music.auth.html" />
<link rel="prev" title="music package" href="music.html" />
<link rel="next" title="music.auth" href="music.auth.html" />
<link rel="prev" title="music" href="music.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
@ -32,13 +32,14 @@
<div class="body" role="main">
<div class="section" id="music-api-package">
<h1>music.api package<a class="headerlink" href="#music-api-package" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
<div class="section" id="music-api">
<h1>music.api<a class="headerlink" href="#music-api" title="Permalink to this headline"></a></h1>
<div class="section" id="module-music.api">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-music.api" title="Permalink to this headline"></a></h2>
<p>Flask blueprints for loading the app endpoints</p>
</div>
<div class="section" id="module-music.api.admin">
<span id="music-api-admin-module"></span><h2>music.api.admin module<a class="headerlink" href="#module-music.api.admin" title="Permalink to this headline"></a></h2>
<span id="api-admin"></span><h2>api.admin<a class="headerlink" href="#module-music.api.admin" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt id="music.api.admin.get_tasks">
<code class="sig-prename descclassname"><span class="pre">music.api.admin.</span></code><code class="sig-name descname"><span class="pre">get_tasks</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.api.admin.get_tasks" title="Permalink to this definition"></a></dt>
@ -46,7 +47,7 @@
</div>
<div class="section" id="module-music.api.api">
<span id="music-api-api-module"></span><h2>music.api.api module<a class="headerlink" href="#module-music.api.api" title="Permalink to this headline"></a></h2>
<span id="api-api"></span><h2>api.api<a class="headerlink" href="#module-music.api.api" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt id="music.api.api.all_playlists_route">
<code class="sig-prename descclassname"><span class="pre">music.api.api.</span></code><code class="sig-name descname"><span class="pre">all_playlists_route</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.api.api.all_playlists_route" title="Permalink to this definition"></a></dt>
@ -121,7 +122,7 @@
</div>
<div class="section" id="module-music.api.decorators">
<span id="music-api-decorators-module"></span><h2>music.api.decorators module<a class="headerlink" href="#module-music.api.decorators" title="Permalink to this headline"></a></h2>
<span id="api-decorators"></span><h2>api.decorators<a class="headerlink" href="#module-music.api.decorators" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt id="music.api.decorators.admin_required">
<code class="sig-prename descclassname"><span class="pre">music.api.decorators.</span></code><code class="sig-name descname"><span class="pre">admin_required</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.api.decorators.admin_required" title="Permalink to this definition"></a></dt>
@ -184,7 +185,7 @@
</div>
<div class="section" id="module-music.api.fm">
<span id="music-api-fm-module"></span><h2>music.api.fm module<a class="headerlink" href="#module-music.api.fm" title="Permalink to this headline"></a></h2>
<span id="api-fm"></span><h2>api.fm<a class="headerlink" href="#module-music.api.fm" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt id="music.api.fm.daily_scrobbles">
<code class="sig-prename descclassname"><span class="pre">music.api.fm.</span></code><code class="sig-name descname"><span class="pre">daily_scrobbles</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.api.fm.daily_scrobbles" title="Permalink to this definition"></a></dt>
@ -192,7 +193,7 @@
</div>
<div class="section" id="module-music.api.player">
<span id="music-api-player-module"></span><h2>music.api.player module<a class="headerlink" href="#module-music.api.player" title="Permalink to this headline"></a></h2>
<span id="api-player"></span><h2>api.player<a class="headerlink" href="#module-music.api.player" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt id="music.api.player.next_track">
<code class="sig-prename descclassname"><span class="pre">music.api.player.</span></code><code class="sig-name descname"><span class="pre">next_track</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.api.player.next_track" title="Permalink to this definition"></a></dt>
@ -215,7 +216,7 @@
</div>
<div class="section" id="module-music.api.spotfm">
<span id="music-api-spotfm-module"></span><h2>music.api.spotfm module<a class="headerlink" href="#module-music.api.spotfm" title="Permalink to this headline"></a></h2>
<span id="api-spotfm"></span><h2>api.spotfm<a class="headerlink" href="#module-music.api.spotfm" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt id="music.api.spotfm.count">
<code class="sig-prename descclassname"><span class="pre">music.api.spotfm.</span></code><code class="sig-name descname"><span class="pre">count</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.api.spotfm.count" title="Permalink to this definition"></a></dt>
@ -258,7 +259,7 @@
</div>
<div class="section" id="module-music.api.spotify">
<span id="music-api-spotify-module"></span><h2>music.api.spotify module<a class="headerlink" href="#module-music.api.spotify" title="Permalink to this headline"></a></h2>
<span id="api-spotify"></span><h2>api.spotify<a class="headerlink" href="#module-music.api.spotify" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt id="music.api.spotify.sort">
<code class="sig-prename descclassname"><span class="pre">music.api.spotify.</span></code><code class="sig-name descname"><span class="pre">sort</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.api.spotify.sort" title="Permalink to this definition"></a></dt>
@ -266,7 +267,7 @@
</div>
<div class="section" id="module-music.api.tag">
<span id="music-api-tag-module"></span><h2>music.api.tag module<a class="headerlink" href="#module-music.api.tag" title="Permalink to this headline"></a></h2>
<span id="api-tag"></span><h2>api.tag<a class="headerlink" href="#module-music.api.tag" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt id="music.api.tag.delete_tag">
<code class="sig-prename descclassname"><span class="pre">music.api.tag.</span></code><code class="sig-name descname"><span class="pre">delete_tag</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tag_id</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">user</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.api.tag.delete_tag" title="Permalink to this definition"></a></dt>
@ -307,10 +308,6 @@
<code class="sig-prename descclassname"><span class="pre">music.api.tag.</span></code><code class="sig-name descname"><span class="pre">tags</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.api.tag.tags" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-music.api">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-music.api" title="Permalink to this headline"></a></h2>
<p>Flask blueprints for loading the app endpoints</p>
</div>
</div>
@ -334,13 +331,13 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">Modules</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="music.html">music package</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">music.api package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.auth.html">music.auth package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.cloud.html">music.cloud package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.db.html">music.db package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.model.html">music.model package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.tasks.html">music.tasks package</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="music.html">music</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">music.api</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.auth.html">music.auth</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.cloud.html">music.cloud</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.db.html">music.db</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.model.html">music.model</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.tasks.html">music.tasks</a></li>
</ul>
<div class="relations">
@ -348,9 +345,9 @@
<ul>
<li><a href="../index.html">Documentation overview</a><ul>
<li><a href="modules.html">music</a><ul>
<li><a href="music.html">music package</a><ul>
<li>Previous: <a href="music.html" title="previous chapter">music package</a></li>
<li>Next: <a href="music.auth.html" title="next chapter">music.auth package</a></li>
<li><a href="music.html">music</a><ul>
<li>Previous: <a href="music.html" title="previous chapter">music</a></li>
<li>Next: <a href="music.auth.html" title="next chapter">music.auth</a></li>
</ul></li>
</ul></li>
</ul></li>

View File

@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>music.auth package &#8212; Music Tools documentation</title>
<title>music.auth &#8212; Music Tools documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
@ -14,8 +14,8 @@
<script src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="music.cloud package" href="music.cloud.html" />
<link rel="prev" title="music.api package" href="music.api.html" />
<link rel="next" title="music.cloud" href="music.cloud.html" />
<link rel="prev" title="music.api" href="music.api.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
@ -32,13 +32,14 @@
<div class="body" role="main">
<div class="section" id="music-auth-package">
<h1>music.auth package<a class="headerlink" href="#music-auth-package" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
<div class="section" id="music-auth">
<h1>music.auth<a class="headerlink" href="#music-auth" title="Permalink to this headline"></a></h1>
<div class="section" id="module-music.auth">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-music.auth" title="Permalink to this headline"></a></h2>
<p>Security related endpoints including login/logout and reset password</p>
</div>
<div class="section" id="module-music.auth.auth">
<span id="music-auth-auth-module"></span><h2>music.auth.auth module<a class="headerlink" href="#module-music.auth.auth" title="Permalink to this headline"></a></h2>
<span id="auth-auth"></span><h2>auth.auth<a class="headerlink" href="#module-music.auth.auth" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt id="music.auth.auth.auth">
<code class="sig-prename descclassname"><span class="pre">music.auth.auth.</span></code><code class="sig-name descname"><span class="pre">auth</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#music.auth.auth.auth" title="Permalink to this definition"></a></dt>
@ -78,10 +79,6 @@
<code class="sig-prename descclassname"><span class="pre">music.auth.auth.</span></code><code class="sig-name descname"><span class="pre">token</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#music.auth.auth.token" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-music.auth">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-music.auth" title="Permalink to this headline"></a></h2>
<p>Security related endpoints including login/logout and reset password</p>
</div>
</div>
@ -105,13 +102,13 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">Modules</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="music.html">music package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.api.html">music.api package</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">music.auth package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.cloud.html">music.cloud package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.db.html">music.db package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.model.html">music.model package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.tasks.html">music.tasks package</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="music.html">music</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.api.html">music.api</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">music.auth</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.cloud.html">music.cloud</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.db.html">music.db</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.model.html">music.model</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.tasks.html">music.tasks</a></li>
</ul>
<div class="relations">
@ -119,9 +116,9 @@
<ul>
<li><a href="../index.html">Documentation overview</a><ul>
<li><a href="modules.html">music</a><ul>
<li><a href="music.html">music package</a><ul>
<li>Previous: <a href="music.api.html" title="previous chapter">music.api package</a></li>
<li>Next: <a href="music.cloud.html" title="next chapter">music.cloud package</a></li>
<li><a href="music.html">music</a><ul>
<li>Previous: <a href="music.api.html" title="previous chapter">music.api</a></li>
<li>Next: <a href="music.cloud.html" title="next chapter">music.cloud</a></li>
</ul></li>
</ul></li>
</ul></li>

View File

@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>music.cloud package &#8212; Music Tools documentation</title>
<title>music.cloud &#8212; Music Tools documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
@ -14,8 +14,8 @@
<script src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="music.db package" href="music.db.html" />
<link rel="prev" title="music.auth package" href="music.auth.html" />
<link rel="next" title="music.db" href="music.db.html" />
<link rel="prev" title="music.auth" href="music.auth.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
@ -32,77 +32,8 @@
<div class="body" role="main">
<div class="section" id="music-cloud-package">
<h1>music.cloud package<a class="headerlink" href="#music-cloud-package" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-music.cloud.function">
<span id="music-cloud-function-module"></span><h2>music.cloud.function module<a class="headerlink" href="#module-music.cloud.function" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt id="music.cloud.function.run_user_playlist_function">
<code class="sig-prename descclassname"><span class="pre">music.cloud.function.</span></code><code class="sig-name descname"><span class="pre">run_user_playlist_function</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">username</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">playlist_name</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.cloud.function.run_user_playlist_function" title="Permalink to this definition"></a></dt>
<dd><p>Queue serverless playlist update for user</p>
</dd></dl>
<dl class="py function">
<dt id="music.cloud.function.update_tag">
<code class="sig-prename descclassname"><span class="pre">music.cloud.function.</span></code><code class="sig-name descname"><span class="pre">update_tag</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">username</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tag_id</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.cloud.function.update_tag" title="Permalink to this definition"></a></dt>
<dd><p>Queue serverless tag update for user</p>
</dd></dl>
</div>
<div class="section" id="module-music.cloud.tasks">
<span id="music-cloud-tasks-module"></span><h2>music.cloud.tasks module<a class="headerlink" href="#module-music.cloud.tasks" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt id="music.cloud.tasks.refresh_all_user_playlist_stats">
<code class="sig-prename descclassname"><span class="pre">music.cloud.tasks.</span></code><code class="sig-name descname"><span class="pre">refresh_all_user_playlist_stats</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#music.cloud.tasks.refresh_all_user_playlist_stats" title="Permalink to this definition"></a></dt>
<dd><p>“Create user playlist stats refresh task for all users</p>
</dd></dl>
<dl class="py function">
<dt id="music.cloud.tasks.refresh_playlist_task">
<code class="sig-prename descclassname"><span class="pre">music.cloud.tasks.</span></code><code class="sig-name descname"><span class="pre">refresh_playlist_task</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">username</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">playlist_name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">delay</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.cloud.tasks.refresh_playlist_task" title="Permalink to this definition"></a></dt>
<dd><p>Create user playlist stats refresh tasks</p>
</dd></dl>
<dl class="py function">
<dt id="music.cloud.tasks.refresh_user_playlist_stats">
<code class="sig-prename descclassname"><span class="pre">music.cloud.tasks.</span></code><code class="sig-name descname"><span class="pre">refresh_user_playlist_stats</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">username</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.cloud.tasks.refresh_user_playlist_stats" title="Permalink to this definition"></a></dt>
<dd><p>Refresh all playlist stats for given user, environment dependent</p>
</dd></dl>
<dl class="py function">
<dt id="music.cloud.tasks.refresh_user_stats_task">
<code class="sig-prename descclassname"><span class="pre">music.cloud.tasks.</span></code><code class="sig-name descname"><span class="pre">refresh_user_stats_task</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">username</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">delay</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.cloud.tasks.refresh_user_stats_task" title="Permalink to this definition"></a></dt>
<dd><p>Create user playlist stats refresh task</p>
</dd></dl>
<dl class="py function">
<dt id="music.cloud.tasks.run_user_playlist_task">
<code class="sig-prename descclassname"><span class="pre">music.cloud.tasks.</span></code><code class="sig-name descname"><span class="pre">run_user_playlist_task</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">username</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">playlist_name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">delay</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.cloud.tasks.run_user_playlist_task" title="Permalink to this definition"></a></dt>
<dd><p>Create tasks for a users given playlist</p>
</dd></dl>
<dl class="py function">
<dt id="music.cloud.tasks.update_all_user_playlists">
<code class="sig-prename descclassname"><span class="pre">music.cloud.tasks.</span></code><code class="sig-name descname"><span class="pre">update_all_user_playlists</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#music.cloud.tasks.update_all_user_playlists" title="Permalink to this definition"></a></dt>
<dd><p>Create user playlist refresh task for all users</p>
</dd></dl>
<dl class="py function">
<dt id="music.cloud.tasks.update_all_user_tags">
<code class="sig-prename descclassname"><span class="pre">music.cloud.tasks.</span></code><code class="sig-name descname"><span class="pre">update_all_user_tags</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#music.cloud.tasks.update_all_user_tags" title="Permalink to this definition"></a></dt>
<dd><p>Create user tag refresh task sfor all users</p>
</dd></dl>
<dl class="py function">
<dt id="music.cloud.tasks.update_playlists">
<code class="sig-prename descclassname"><span class="pre">music.cloud.tasks.</span></code><code class="sig-name descname"><span class="pre">update_playlists</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">username</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.cloud.tasks.update_playlists" title="Permalink to this definition"></a></dt>
<dd><p>Refresh all playlists for given user, environment dependent</p>
</dd></dl>
</div>
<div class="section" id="music-cloud">
<h1>music.cloud<a class="headerlink" href="#music-cloud" title="Permalink to this headline"></a></h1>
<div class="section" id="module-music.cloud">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-music.cloud" title="Permalink to this headline"></a></h2>
<p>Infrastucture code include handing off tasks to Cloud Tasks or Cloud Functions</p>
@ -116,6 +47,125 @@
<code class="sig-prename descclassname"><span class="pre">music.cloud.</span></code><code class="sig-name descname"><span class="pre">queue_run_user_playlist</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">username</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">playlist_name</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.cloud.queue_run_user_playlist" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-music.cloud.function">
<span id="cloud-function"></span><h2>cloud.function<a class="headerlink" href="#module-music.cloud.function" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt id="music.cloud.function.run_user_playlist_function">
<code class="sig-prename descclassname"><span class="pre">music.cloud.function.</span></code><code class="sig-name descname"><span class="pre">run_user_playlist_function</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">username</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">playlist_name</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">None</span><a class="headerlink" href="#music.cloud.function.run_user_playlist_function" title="Permalink to this definition"></a></dt>
<dd><p>Queue serverless playlist update for user</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>username</strong> (<em>str</em>) Subject username</p></li>
<li><p><strong>playlist_name</strong> (<em>str</em>) Subject tag ID</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="music.cloud.function.update_tag">
<code class="sig-prename descclassname"><span class="pre">music.cloud.function.</span></code><code class="sig-name descname"><span class="pre">update_tag</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">username</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tag_id</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">None</span><a class="headerlink" href="#music.cloud.function.update_tag" title="Permalink to this definition"></a></dt>
<dd><p>Queue serverless tag update for user</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>username</strong> (<em>str</em>) Subject username</p></li>
<li><p><strong>tag_id</strong> (<em>str</em>) Subject tag ID</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-music.cloud.tasks">
<span id="cloud-tasks"></span><h2>cloud.tasks<a class="headerlink" href="#module-music.cloud.tasks" title="Permalink to this headline"></a></h2>
<p>Functions for creating GCP Cloud Tasks for long running operatings</p>
<dl class="py function">
<dt id="music.cloud.tasks.refresh_all_user_playlist_stats">
<code class="sig-prename descclassname"><span class="pre">music.cloud.tasks.</span></code><code class="sig-name descname"><span class="pre">refresh_all_user_playlist_stats</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#music.cloud.tasks.refresh_all_user_playlist_stats" title="Permalink to this definition"></a></dt>
<dd><p>“Create user playlist stats refresh task for all users</p>
</dd></dl>
<dl class="py function">
<dt id="music.cloud.tasks.refresh_playlist_task">
<code class="sig-prename descclassname"><span class="pre">music.cloud.tasks.</span></code><code class="sig-name descname"><span class="pre">refresh_playlist_task</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">username</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">playlist_name</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">delay</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.cloud.tasks.refresh_playlist_task" title="Permalink to this definition"></a></dt>
<dd><p>Create user playlist stats refresh tasks</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>username</strong> (<em>str</em>) Subject users username</p></li>
<li><p><strong>playlist_name</strong> (<em>str</em>) Subject playlist name</p></li>
<li><p><strong>delay</strong> (<em>int</em><em>, </em><em>optional</em>) Seconds to delay execution by. Defaults to 0.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="music.cloud.tasks.refresh_user_playlist_stats">
<code class="sig-prename descclassname"><span class="pre">music.cloud.tasks.</span></code><code class="sig-name descname"><span class="pre">refresh_user_playlist_stats</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">username</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.cloud.tasks.refresh_user_playlist_stats" title="Permalink to this definition"></a></dt>
<dd><p>Refresh all playlist stats for given user, environment dependent</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>username</strong> (<em>str</em>) Subject users username</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="music.cloud.tasks.refresh_user_stats_task">
<code class="sig-prename descclassname"><span class="pre">music.cloud.tasks.</span></code><code class="sig-name descname"><span class="pre">refresh_user_stats_task</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">username</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">delay</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.cloud.tasks.refresh_user_stats_task" title="Permalink to this definition"></a></dt>
<dd><p>Create user playlist stats refresh task</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>username</strong> (<em>str</em>) Subject users username</p></li>
<li><p><strong>delay</strong> (<em>int</em><em>, </em><em>optional</em>) Seconds to delay execution by. Defaults to 0.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="music.cloud.tasks.run_user_playlist_task">
<code class="sig-prename descclassname"><span class="pre">music.cloud.tasks.</span></code><code class="sig-name descname"><span class="pre">run_user_playlist_task</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">username</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">playlist_name</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">delay</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.cloud.tasks.run_user_playlist_task" title="Permalink to this definition"></a></dt>
<dd><p>Create tasks for a users given playlist</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>username</strong> (<em>str</em>) Subject users username</p></li>
<li><p><strong>playlist_name</strong> (<em>str</em>) Subject playlist name</p></li>
<li><p><strong>delay</strong> (<em>int</em><em>, </em><em>optional</em>) Seconds to delay execution by. Defaults to 0.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="music.cloud.tasks.update_all_user_playlists">
<code class="sig-prename descclassname"><span class="pre">music.cloud.tasks.</span></code><code class="sig-name descname"><span class="pre">update_all_user_playlists</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#music.cloud.tasks.update_all_user_playlists" title="Permalink to this definition"></a></dt>
<dd><p>Create user playlist refresh task for all users</p>
</dd></dl>
<dl class="py function">
<dt id="music.cloud.tasks.update_all_user_tags">
<code class="sig-prename descclassname"><span class="pre">music.cloud.tasks.</span></code><code class="sig-name descname"><span class="pre">update_all_user_tags</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#music.cloud.tasks.update_all_user_tags" title="Permalink to this definition"></a></dt>
<dd><p>Create user tag refresh task for all users</p>
</dd></dl>
<dl class="py function">
<dt id="music.cloud.tasks.update_playlists">
<code class="sig-prename descclassname"><span class="pre">music.cloud.tasks.</span></code><code class="sig-name descname"><span class="pre">update_playlists</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">username</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.cloud.tasks.update_playlists" title="Permalink to this definition"></a></dt>
<dd><p>Refresh all playlists for given user, environment dependent</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>username</strong> (<em>str</em>) Subject users username</p>
</dd>
</dl>
</dd></dl>
</div>
</div>
@ -139,13 +189,13 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">Modules</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="music.html">music package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.api.html">music.api package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.auth.html">music.auth package</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">music.cloud package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.db.html">music.db package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.model.html">music.model package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.tasks.html">music.tasks package</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="music.html">music</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.api.html">music.api</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.auth.html">music.auth</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">music.cloud</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.db.html">music.db</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.model.html">music.model</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.tasks.html">music.tasks</a></li>
</ul>
<div class="relations">
@ -153,9 +203,9 @@
<ul>
<li><a href="../index.html">Documentation overview</a><ul>
<li><a href="modules.html">music</a><ul>
<li><a href="music.html">music package</a><ul>
<li>Previous: <a href="music.auth.html" title="previous chapter">music.auth package</a></li>
<li>Next: <a href="music.db.html" title="next chapter">music.db package</a></li>
<li><a href="music.html">music</a><ul>
<li>Previous: <a href="music.auth.html" title="previous chapter">music.auth</a></li>
<li>Next: <a href="music.db.html" title="next chapter">music.db</a></li>
</ul></li>
</ul></li>
</ul></li>

View File

@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>music.db package &#8212; Music Tools documentation</title>
<title>music.db &#8212; Music Tools documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
@ -14,8 +14,8 @@
<script src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="music.model package" href="music.model.html" />
<link rel="prev" title="music.cloud package" href="music.cloud.html" />
<link rel="next" title="music.model" href="music.model.html" />
<link rel="prev" title="music.cloud" href="music.cloud.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
@ -32,10 +32,11 @@
<div class="body" role="main">
<div class="section" id="music-db-package">
<h1>music.db package<a class="headerlink" href="#music-db-package" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
<div class="section" id="music-db">
<h1>music.db<a class="headerlink" href="#music-db" title="Permalink to this headline"></a></h1>
<div class="section" id="module-music.db">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-music.db" title="Permalink to this headline"></a></h2>
<p>Database interfacing components aside from the music.model ORM layer</p>
</div>
<div class="section" id="module-music.db.database">
<span id="music-db-database-module"></span><h2>music.db.database module<a class="headerlink" href="#module-music.db.database" title="Permalink to this headline"></a></h2>
@ -43,7 +44,7 @@
<dt id="music.db.database.DatabaseUser">
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">music.db.database.</span></code><code class="sig-name descname"><span class="pre">DatabaseUser</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">client_id</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">client_secret</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">access_token</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">refresh_token</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">user_id</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.db.database.DatabaseUser" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">spotframework.net.user.NetworkUser</span></code></p>
<p>adding music tools username to spotframework network user</p>
<p>Adding Music Tools username to spotframework network user</p>
<dl class="py attribute">
<dt id="music.db.database.DatabaseUser.user_id">
<code class="sig-name descname"><span class="pre">user_id</span></code><em class="property"><span class="pre">:</span> <span class="pre">str</span></em><em class="property"> <span class="pre">=</span> <span class="pre">None</span></em><a class="headerlink" href="#music.db.database.DatabaseUser.user_id" title="Permalink to this definition"></a></dt>
@ -53,18 +54,49 @@
<dl class="py function">
<dt id="music.db.database.get_authed_lastfm_network">
<code class="sig-prename descclassname"><span class="pre">music.db.database.</span></code><code class="sig-name descname"><span class="pre">get_authed_lastfm_network</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.db.database.get_authed_lastfm_network" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<code class="sig-prename descclassname"><span class="pre">music.db.database.</span></code><code class="sig-name descname"><span class="pre">get_authed_lastfm_network</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="music.model.html#music.model.user.User" title="music.model.user.User"><span class="pre">music.model.user.User</span></a></span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">fmframework.net.network.Network</span><span class="p"><span class="pre">]</span></span><a class="headerlink" href="#music.db.database.get_authed_lastfm_network" title="Permalink to this definition"></a></dt>
<dd><p>Get an authenticated fmframework network for a given user</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>user</strong> (<a class="reference internal" href="music.model.html#music.model.user.User" title="music.model.user.User"><em>User</em></a>) Subject user to retrieve a network for</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Authenticated fmframework network</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Optional[FmNetwork]</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="music.db.database.get_authed_spotify_network">
<code class="sig-prename descclassname"><span class="pre">music.db.database.</span></code><code class="sig-name descname"><span class="pre">get_authed_spotify_network</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.db.database.get_authed_spotify_network" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<code class="sig-prename descclassname"><span class="pre">music.db.database.</span></code><code class="sig-name descname"><span class="pre">get_authed_spotify_network</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="music.model.html#music.model.user.User" title="music.model.user.User"><span class="pre">music.model.user.User</span></a></span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">spotframework.net.network.Network</span><span class="p"><span class="pre">]</span></span><a class="headerlink" href="#music.db.database.get_authed_spotify_network" title="Permalink to this definition"></a></dt>
<dd><p>Get an authenticated spotframework network for a given user</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>user</strong> (<a class="reference internal" href="music.model.html#music.model.user.User" title="music.model.user.User"><em>User</em></a>) Subject user to retrieve a network for</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Authenticated spotframework network</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Optional[SpotifyNetwork]</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="music.db.database.refresh_token_database_callback">
<code class="sig-prename descclassname"><span class="pre">music.db.database.</span></code><code class="sig-name descname"><span class="pre">refresh_token_database_callback</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.db.database.refresh_token_database_callback" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<code class="sig-prename descclassname"><span class="pre">music.db.database.</span></code><code class="sig-name descname"><span class="pre">refresh_token_database_callback</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="music.model.html#music.model.user.User" title="music.model.user.User"><span class="pre">music.model.user.User</span></a></span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">None</span><a class="headerlink" href="#music.db.database.refresh_token_database_callback" title="Permalink to this definition"></a></dt>
<dd><p>Callback for handling when a spotframework network updates user credemtials</p>
<p>Used to store newly authenticated credentials</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>user</strong> (<a class="reference internal" href="music.model.html#music.model.user.User" title="music.model.user.User"><em>User</em></a>) Subject user</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-music.db.part_generator">
@ -73,32 +105,54 @@
<dt id="music.db.part_generator.PartGenerator">
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">music.db.part_generator.</span></code><code class="sig-name descname"><span class="pre">PartGenerator</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="music.model.html#music.model.user.User" title="music.model.user.User"><span class="pre">music.model.user.User</span></a><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">username</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.db.part_generator.PartGenerator" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Resolve a playlists components from other referenced smart playlists</p>
<dl class="py method">
<dt id="music.db.part_generator.PartGenerator.get_recursive_parts">
<code class="sig-name descname"><span class="pre">get_recursive_parts</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.db.part_generator.PartGenerator.get_recursive_parts" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<code class="sig-name descname"><span class="pre">get_recursive_parts</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span><a class="headerlink" href="#music.db.part_generator.PartGenerator.get_recursive_parts" title="Permalink to this definition"></a></dt>
<dd><p>Resolve and return a playlists component Spotify playlist names</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>name</strong> (<em>str</em>) Subject smart playlist name</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Resolved list of component playlists</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>List[str]</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="music.db.part_generator.PartGenerator.process_reference_by_name">
<code class="sig-name descname"><span class="pre">process_reference_by_name</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.db.part_generator.PartGenerator.process_reference_by_name" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<code class="sig-name descname"><span class="pre">process_reference_by_name</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">None</span><a class="headerlink" href="#music.db.part_generator.PartGenerator.process_reference_by_name" title="Permalink to this definition"></a></dt>
<dd><p>Resolve a smart playlist by name, recurses into process_reference_by_reference</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>name</strong> (<em>str</em>) Subject playlist name</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="music.db.part_generator.PartGenerator.process_reference_by_reference">
<code class="sig-name descname"><span class="pre">process_reference_by_reference</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ref</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.db.part_generator.PartGenerator.process_reference_by_reference" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<code class="sig-name descname"><span class="pre">process_reference_by_reference</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ref</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">google.cloud.firestore_v1.document.DocumentReference</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.db.part_generator.PartGenerator.process_reference_by_reference" title="Permalink to this definition"></a></dt>
<dd><p>Recursive resolution function for walking a playlists dependencies by DocumentReference</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>ref</strong> (<em>DocumentReference</em>) Subject Firestore document for resolving</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="music.db.part_generator.PartGenerator.reset">
<code class="sig-name descname"><span class="pre">reset</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#music.db.part_generator.PartGenerator.reset" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Reset internal state for resolved playlists</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-music.db">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-music.db" title="Permalink to this headline"></a></h2>
<p>Database interfacing components aside from the music.model ORM layer</p>
</div>
</div>
@ -122,13 +176,13 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">Modules</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="music.html">music package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.api.html">music.api package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.auth.html">music.auth package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.cloud.html">music.cloud package</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">music.db package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.model.html">music.model package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.tasks.html">music.tasks package</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="music.html">music</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.api.html">music.api</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.auth.html">music.auth</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.cloud.html">music.cloud</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">music.db</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.model.html">music.model</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.tasks.html">music.tasks</a></li>
</ul>
<div class="relations">
@ -136,9 +190,9 @@
<ul>
<li><a href="../index.html">Documentation overview</a><ul>
<li><a href="modules.html">music</a><ul>
<li><a href="music.html">music package</a><ul>
<li>Previous: <a href="music.cloud.html" title="previous chapter">music.cloud package</a></li>
<li>Next: <a href="music.model.html" title="next chapter">music.model package</a></li>
<li><a href="music.html">music</a><ul>
<li>Previous: <a href="music.cloud.html" title="previous chapter">music.cloud</a></li>
<li>Next: <a href="music.model.html" title="next chapter">music.model</a></li>
</ul></li>
</ul></li>
</ul></li>

View File

@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>music package &#8212; Music Tools documentation</title>
<title>music &#8212; Music Tools documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
@ -14,7 +14,7 @@
<script src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="music.api package" href="music.api.html" />
<link rel="next" title="music.api" href="music.api.html" />
<link rel="prev" title="music" href="modules.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
@ -32,68 +32,69 @@
<div class="body" role="main">
<div class="section" id="music-package">
<h1>music package<a class="headerlink" href="#music-package" title="Permalink to this headline"></a></h1>
<div class="section" id="music">
<h1>music<a class="headerlink" href="#music" title="Permalink to this headline"></a></h1>
<div class="section" id="subpackages">
<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="music.api.html">music.api package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="music.api.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.api.html#module-music.api.admin">music.api.admin module</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.api.html#module-music.api.api">music.api.api module</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.api.html#module-music.api.decorators">music.api.decorators module</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.api.html#module-music.api.fm">music.api.fm module</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.api.html#module-music.api.player">music.api.player module</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.api.html#module-music.api.spotfm">music.api.spotfm module</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.api.html#module-music.api.spotify">music.api.spotify module</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.api.html#module-music.api.tag">music.api.tag module</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.api.html">music.api</a><ul>
<li class="toctree-l2"><a class="reference internal" href="music.api.html#module-music.api">Module contents</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.api.html#module-music.api.admin">api.admin</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.api.html#module-music.api.api">api.api</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.api.html#module-music.api.decorators">api.decorators</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.api.html#module-music.api.fm">api.fm</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.api.html#module-music.api.player">api.player</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.api.html#module-music.api.spotfm">api.spotfm</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.api.html#module-music.api.spotify">api.spotify</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.api.html#module-music.api.tag">api.tag</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="music.auth.html">music.auth package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="music.auth.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.auth.html#module-music.auth.auth">music.auth.auth module</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.auth.html">music.auth</a><ul>
<li class="toctree-l2"><a class="reference internal" href="music.auth.html#module-music.auth">Module contents</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.auth.html#module-music.auth.auth">auth.auth</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="music.cloud.html">music.cloud package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="music.cloud.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.cloud.html#module-music.cloud.function">music.cloud.function module</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.cloud.html#module-music.cloud.tasks">music.cloud.tasks module</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.cloud.html">music.cloud</a><ul>
<li class="toctree-l2"><a class="reference internal" href="music.cloud.html#module-music.cloud">Module contents</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.cloud.html#module-music.cloud.function">cloud.function</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.cloud.html#module-music.cloud.tasks">cloud.tasks</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="music.db.html">music.db package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="music.db.html#submodules">Submodules</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.db.html">music.db</a><ul>
<li class="toctree-l2"><a class="reference internal" href="music.db.html#module-music.db">Module contents</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.db.html#module-music.db.database">music.db.database module</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.db.html#module-music.db.part_generator">music.db.part_generator module</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.db.html#module-music.db">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="music.model.html">music.model package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="music.model.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.model.html#module-music.model.config">music.model.config module</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.model.html#module-music.model.playlist">music.model.playlist module</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.model.html#module-music.model.tag">music.model.tag module</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.model.html#module-music.model.user">music.model.user module</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.model.html">music.model</a><ul>
<li class="toctree-l2"><a class="reference internal" href="music.model.html#module-music.model">Module contents</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.model.html#module-music.model.config">model.config</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.model.html#module-music.model.playlist">model.playlist</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.model.html#module-music.model.tag">model.tag</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.model.html#module-music.model.user">model.user</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="music.tasks.html">music.tasks package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="music.tasks.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.tasks.html#module-music.tasks.create_playlist">music.tasks.create_playlist module</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.tasks.html#module-music.tasks.refresh_lastfm_stats">music.tasks.refresh_lastfm_stats module</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.tasks.html#module-music.tasks.run_user_playlist">music.tasks.run_user_playlist module</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.tasks.html#module-music.tasks.update_tag">music.tasks.update_tag module</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.tasks.html">music.tasks</a><ul>
<li class="toctree-l2"><a class="reference internal" href="music.tasks.html#module-music.tasks">Module contents</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.tasks.html#module-music.tasks.create_playlist">tasks.create_playlist</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.tasks.html#module-music.tasks.refresh_lastfm_stats">tasks.refresh_lastfm_stats</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.tasks.html#module-music.tasks.run_user_playlist">tasks.run_user_playlist</a></li>
<li class="toctree-l2"><a class="reference internal" href="music.tasks.html#module-music.tasks.update_tag">tasks.update_tag</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
<div class="section" id="module-music">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-music" title="Permalink to this headline"></a></h2>
<p>Root module containing Music Tools backend</p>
<p>Top level module with functions for creating app with loaded blueprints and initialising the logging stack</p>
<dl class="py function">
<dt id="music.init_log">
<code class="sig-prename descclassname"><span class="pre">music.</span></code><code class="sig-name descname"><span class="pre">init_log</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cloud</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">console</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.init_log" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-music.music">
<span id="music-music-module"></span><h2>music.music module<a class="headerlink" href="#module-music.music" title="Permalink to this headline"></a></h2>
@ -111,16 +112,6 @@
</dl>
</dd></dl>
</div>
<div class="section" id="module-music">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-music" title="Permalink to this headline"></a></h2>
<p>Root module containing Music Tools backend</p>
<p>Top level module with functions for creating app with loaded blueprints and initialising the logging stack</p>
<dl class="py function">
<dt id="music.init_log">
<code class="sig-prename descclassname"><span class="pre">music.</span></code><code class="sig-name descname"><span class="pre">init_log</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cloud</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">console</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.init_log" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
</div>
@ -144,13 +135,13 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">Modules</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">music package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.api.html">music.api package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.auth.html">music.auth package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.cloud.html">music.cloud package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.db.html">music.db package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.model.html">music.model package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.tasks.html">music.tasks package</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">music</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.api.html">music.api</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.auth.html">music.auth</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.cloud.html">music.cloud</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.db.html">music.db</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.model.html">music.model</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.tasks.html">music.tasks</a></li>
</ul>
<div class="relations">
@ -159,7 +150,7 @@
<li><a href="../index.html">Documentation overview</a><ul>
<li><a href="modules.html">music</a><ul>
<li>Previous: <a href="modules.html" title="previous chapter">music</a></li>
<li>Next: <a href="music.api.html" title="next chapter">music.api package</a></li>
<li>Next: <a href="music.api.html" title="next chapter">music.api</a></li>
</ul></li>
</ul></li>
</ul>

View File

@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>music.model package &#8212; Music Tools documentation</title>
<title>music.model &#8212; Music Tools documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
@ -14,8 +14,8 @@
<script src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="music.tasks package" href="music.tasks.html" />
<link rel="prev" title="music.db package" href="music.db.html" />
<link rel="next" title="music.tasks" href="music.tasks.html" />
<link rel="prev" title="music.db" href="music.db.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
@ -32,17 +32,19 @@
<div class="body" role="main">
<div class="section" id="music-model-package">
<h1>music.model package<a class="headerlink" href="#music-model-package" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
<div class="section" id="music-model">
<h1>music.model<a class="headerlink" href="#music-model" title="Permalink to this headline"></a></h1>
<div class="section" id="module-music.model">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-music.model" title="Permalink to this headline"></a></h2>
<p>ORM layer containing the data model</p>
</div>
<div class="section" id="module-music.model.config">
<span id="music-model-config-module"></span><h2>music.model.config module<a class="headerlink" href="#module-music.model.config" title="Permalink to this headline"></a></h2>
<span id="model-config"></span><h2>model.config<a class="headerlink" href="#module-music.model.config" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="music.model.config.Config">
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">music.model.config.</span></code><code class="sig-name descname"><span class="pre">Config</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.model.config.Config" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">fireo.models.model.Model</span></code></p>
<p>Service-level config data structure for app keys and settings</p>
<dl class="py class">
<dt id="music.model.config.Config.Meta">
<em class="property"><span class="pre">class</span> </em><code class="sig-name descname"><span class="pre">Meta</span></code><a class="headerlink" href="#music.model.config.Config.Meta" title="Permalink to this definition"></a></dt>
@ -50,7 +52,8 @@
<dl class="py attribute">
<dt id="music.model.config.Config.Meta.collection_name">
<code class="sig-name descname"><span class="pre">collection_name</span></code><em class="property"> <span class="pre">=</span> <span class="pre">'config'</span></em><a class="headerlink" href="#music.model.config.Config.Meta.collection_name" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Set correct path in Firestore</p>
</dd></dl>
</dd></dl>
@ -72,7 +75,8 @@
<dl class="py attribute">
<dt id="music.model.config.Config.playlist_cloud_operating_mode">
<code class="sig-name descname"><span class="pre">playlist_cloud_operating_mode</span></code><em class="property"> <span class="pre">=</span> <span class="pre">None</span></em><a class="headerlink" href="#music.model.config.Config.playlist_cloud_operating_mode" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Determines whether playlist and tag update operations are done by Cloud Tasks or Functions</p>
</dd></dl>
<dl class="py attribute">
<dt id="music.model.config.Config.secret_key">
@ -93,7 +97,7 @@
</div>
<div class="section" id="module-music.model.playlist">
<span id="music-model-playlist-module"></span><h2>music.model.playlist module<a class="headerlink" href="#module-music.model.playlist" title="Permalink to this headline"></a></h2>
<span id="model-playlist"></span><h2>model.playlist<a class="headerlink" href="#module-music.model.playlist" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="music.model.playlist.Playlist">
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">music.model.playlist.</span></code><code class="sig-name descname"><span class="pre">Playlist</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.model.playlist.Playlist" title="Permalink to this definition"></a></dt>
@ -293,7 +297,7 @@
</div>
<div class="section" id="module-music.model.tag">
<span id="music-model-tag-module"></span><h2>music.model.tag module<a class="headerlink" href="#module-music.model.tag" title="Permalink to this headline"></a></h2>
<span id="model-tag"></span><h2>model.tag<a class="headerlink" href="#module-music.model.tag" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="music.model.tag.Tag">
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">music.model.tag.</span></code><code class="sig-name descname"><span class="pre">Tag</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.model.tag.Tag" title="Permalink to this definition"></a></dt>
@ -394,7 +398,7 @@
</div>
<div class="section" id="module-music.model.user">
<span id="music-model-user-module"></span><h2>music.model.user module<a class="headerlink" href="#module-music.model.user" title="Permalink to this headline"></a></h2>
<span id="model-user"></span><h2>model.user<a class="headerlink" href="#module-music.model.user" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="music.model.user.User">
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">music.model.user.</span></code><code class="sig-name descname"><span class="pre">User</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.model.user.User" title="Permalink to this definition"></a></dt>
@ -498,10 +502,6 @@
</dd></dl>
</div>
<div class="section" id="module-music.model">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-music.model" title="Permalink to this headline"></a></h2>
<p>ORM layer containing the data model</p>
</div>
</div>
@ -525,13 +525,13 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">Modules</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="music.html">music package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.api.html">music.api package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.auth.html">music.auth package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.cloud.html">music.cloud package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.db.html">music.db package</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">music.model package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.tasks.html">music.tasks package</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="music.html">music</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.api.html">music.api</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.auth.html">music.auth</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.cloud.html">music.cloud</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.db.html">music.db</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">music.model</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.tasks.html">music.tasks</a></li>
</ul>
<div class="relations">
@ -539,9 +539,9 @@
<ul>
<li><a href="../index.html">Documentation overview</a><ul>
<li><a href="modules.html">music</a><ul>
<li><a href="music.html">music package</a><ul>
<li>Previous: <a href="music.db.html" title="previous chapter">music.db package</a></li>
<li>Next: <a href="music.tasks.html" title="next chapter">music.tasks package</a></li>
<li><a href="music.html">music</a><ul>
<li>Previous: <a href="music.db.html" title="previous chapter">music.db</a></li>
<li>Next: <a href="music.tasks.html" title="next chapter">music.tasks</a></li>
</ul></li>
</ul></li>
</ul></li>

View File

@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>music.tasks package &#8212; Music Tools documentation</title>
<title>music.tasks &#8212; Music Tools documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
@ -14,7 +14,7 @@
<script src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="prev" title="music.model package" href="music.model.html" />
<link rel="prev" title="music.model" href="music.model.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
@ -31,21 +31,38 @@
<div class="body" role="main">
<div class="section" id="music-tasks-package">
<h1>music.tasks package<a class="headerlink" href="#music-tasks-package" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
<div class="section" id="music-tasks">
<h1>music.tasks<a class="headerlink" href="#music-tasks" title="Permalink to this headline"></a></h1>
<div class="section" id="module-music.tasks">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-music.tasks" title="Permalink to this headline"></a></h2>
<p>Long running operations of the app including playlist generation and tag update functions</p>
</div>
<div class="section" id="module-music.tasks.create_playlist">
<span id="music-tasks-create-playlist-module"></span><h2>music.tasks.create_playlist module<a class="headerlink" href="#module-music.tasks.create_playlist" title="Permalink to this headline"></a></h2>
<span id="tasks-create-playlist"></span><h2>tasks.create_playlist<a class="headerlink" href="#module-music.tasks.create_playlist" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt id="music.tasks.create_playlist.create_playlist">
<code class="sig-prename descclassname"><span class="pre">music.tasks.create_playlist.</span></code><code class="sig-name descname"><span class="pre">create_playlist</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.tasks.create_playlist.create_playlist" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<code class="sig-prename descclassname"><span class="pre">music.tasks.create_playlist.</span></code><code class="sig-name descname"><span class="pre">create_playlist</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="music.model.html#music.model.user.User" title="music.model.user.User"><span class="pre">music.model.user.User</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">spotframework.model.playlist.FullPlaylist</span><span class="p"><span class="pre">]</span></span><a class="headerlink" href="#music.tasks.create_playlist.create_playlist" title="Permalink to this definition"></a></dt>
<dd><p>Create a new playlist on the users Spotify account</p>
<p>For creating new playlists, create and return a new playlist object</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>user</strong> (<a class="reference internal" href="music.model.html#music.model.user.User" title="music.model.user.User"><em>User</em></a>) Subject user</p></li>
<li><p><strong>name</strong> (<em>str</em>) Name of new playlist</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>New playlist object if created</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>Optional[FullPlaylist]</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-music.tasks.refresh_lastfm_stats">
<span id="music-tasks-refresh-lastfm-stats-module"></span><h2>music.tasks.refresh_lastfm_stats module<a class="headerlink" href="#module-music.tasks.refresh_lastfm_stats" title="Permalink to this headline"></a></h2>
<span id="tasks-refresh-lastfm-stats"></span><h2>tasks.refresh_lastfm_stats<a class="headerlink" href="#module-music.tasks.refresh_lastfm_stats" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt id="music.tasks.refresh_lastfm_stats.refresh_lastfm_album_stats">
<code class="sig-prename descclassname"><span class="pre">music.tasks.refresh_lastfm_stats.</span></code><code class="sig-name descname"><span class="pre">refresh_lastfm_album_stats</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">username</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">playlist_name</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.tasks.refresh_lastfm_stats.refresh_lastfm_album_stats" title="Permalink to this definition"></a></dt>
@ -63,25 +80,46 @@
</div>
<div class="section" id="module-music.tasks.run_user_playlist">
<span id="music-tasks-run-user-playlist-module"></span><h2>music.tasks.run_user_playlist module<a class="headerlink" href="#module-music.tasks.run_user_playlist" title="Permalink to this headline"></a></h2>
<span id="tasks-run-user-playlist"></span><h2>tasks.run_user_playlist<a class="headerlink" href="#module-music.tasks.run_user_playlist" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt id="music.tasks.run_user_playlist.run_user_playlist">
<code class="sig-prename descclassname"><span class="pre">music.tasks.run_user_playlist.</span></code><code class="sig-name descname"><span class="pre">run_user_playlist</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">playlist</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">spotnet</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fmnet</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.tasks.run_user_playlist.run_user_playlist" title="Permalink to this definition"></a></dt>
<dd><p>Generate and upadate a users playlist</p>
<code class="sig-prename descclassname"><span class="pre">music.tasks.run_user_playlist.</span></code><code class="sig-name descname"><span class="pre">run_user_playlist</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="music.model.html#music.model.user.User" title="music.model.user.User"><span class="pre">music.model.user.User</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">playlist</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><a class="reference internal" href="music.model.html#music.model.playlist.Playlist" title="music.model.playlist.Playlist"><span class="pre">music.model.playlist.Playlist</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">spotnet</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">spotframework.net.network.Network</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fmnet</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">fmframework.net.network.Network</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> &#x2192; <span class="pre">None</span><a class="headerlink" href="#music.tasks.run_user_playlist.run_user_playlist" title="Permalink to this definition"></a></dt>
<dd><p>Generate and upadate a users smart playlist</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>user</strong> (<a class="reference internal" href="music.model.html#music.model.user.User" title="music.model.user.User"><em>User</em></a>) Subject user</p></li>
<li><p><strong>playlist</strong> (<a class="reference internal" href="music.model.html#music.model.playlist.Playlist" title="music.model.playlist.Playlist"><em>Playlist</em></a>) Users subject playlist</p></li>
<li><p><strong>spotnet</strong> (<em>SpotNetwork</em><em>, </em><em>optional</em>) Spotframework network for Spotify operations. Defaults to None.</p></li>
<li><p><strong>fmnet</strong> (<em>Network</em><em>, </em><em>optional</em>) Fmframework network for Last.fm operations. Defaults to None.</p></li>
</ul>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><ul class="simple">
<li><p><strong>NameError</strong> No user provided</p></li>
<li><p><strong>NameError</strong> No playlist provided</p></li>
<li><p><strong>AttributeError</strong> Playlist has no URI</p></li>
<li><p><strong>NameError</strong> No spotframework network available</p></li>
<li><p><strong>e</strong> spotframework error when retrieving user playlists</p></li>
</ul>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>[description]</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>[type]</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-music.tasks.update_tag">
<span id="music-tasks-update-tag-module"></span><h2>music.tasks.update_tag module<a class="headerlink" href="#module-music.tasks.update_tag" title="Permalink to this headline"></a></h2>
<span id="tasks-update-tag"></span><h2>tasks.update_tag<a class="headerlink" href="#module-music.tasks.update_tag" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt id="music.tasks.update_tag.update_tag">
<code class="sig-prename descclassname"><span class="pre">music.tasks.update_tag.</span></code><code class="sig-name descname"><span class="pre">update_tag</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tag</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">spotnet</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fmnet</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#music.tasks.update_tag.update_tag" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-music.tasks">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-music.tasks" title="Permalink to this headline"></a></h2>
<p>Long running operations of the app including playlist generation and tag update functions</p>
</div>
</div>
@ -105,13 +143,13 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">Modules</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="music.html">music package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.api.html">music.api package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.auth.html">music.auth package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.cloud.html">music.cloud package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.db.html">music.db package</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.model.html">music.model package</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">music.tasks package</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="music.html">music</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.api.html">music.api</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.auth.html">music.auth</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.cloud.html">music.cloud</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.db.html">music.db</a></li>
<li class="toctree-l1"><a class="reference internal" href="music.model.html">music.model</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">music.tasks</a></li>
</ul>
<div class="relations">
@ -119,8 +157,8 @@
<ul>
<li><a href="../index.html">Documentation overview</a><ul>
<li><a href="modules.html">music</a><ul>
<li><a href="music.html">music package</a><ul>
<li>Previous: <a href="music.model.html" title="previous chapter">music.model package</a></li>
<li><a href="music.html">music</a><ul>
<li>Previous: <a href="music.model.html" title="previous chapter">music.model</a></li>
</ul></li>
</ul></li>
</ul></li>