favorites.repositories ====================== .. py:module:: favorites.repositories .. autoapi-nested-parse:: Repository helpers for user favorites stored in SQLite. Functions --------- .. autoapisummary:: favorites.repositories.insert_favorites favorites.repositories.list_favorites favorites.repositories.list_tags favorites.repositories.update_favorite favorites.repositories.list_tags_for_favorite favorites.repositories.delete_favorite favorites.repositories.export_favorites Module Contents --------------- .. py:function:: insert_favorites(conn, entries) Insert favorites and return the inserted records. Each entry should include at minimum ``name``, ``source``, and ``metadata``. Optional fields are stored when present. .. py:function:: list_favorites(conn, *, limit, offset, name_query = None, tag = None, name_class = None, package_id = None) Return favorites and total count for the given filters. .. py:function:: list_tags(conn) Return all tags sorted alphabetically. .. py:function:: update_favorite(conn, *, favorite_id, note_md, gender, tags) Update a favorite's note and tags. .. py:function:: list_tags_for_favorite(conn, favorite_id) Return tags associated with one favorite. .. py:function:: delete_favorite(conn, favorite_id) Delete one favorite by id. .. py:function:: export_favorites(conn) Serialize all favorites for export.