Welcome to save-py’s documentation!

Save

class save.Save(host: str, apikey: Optional[str])

The Save class allows access to various methods for the Save! REST API

Parameters:
  • host (str) – URL for the save server
  • apikey (str) – API Key.
addIndex(index: str) → save.types.general.GenericResponse

Add a new index

Parameters:index (str) – Name of index
Returns:Data or error
Return type:GenericResponse
api() → save.types.general.ApiResponse

The general api endpoint

Returns:Data or error
Return type:ApiResponse
authChangePassword(new_password: str) → save.types.auth.AuthBase

Change the password for the current user

Parameters:new_password (str) – New password
Returns:Data or error
Return type:AuthBase
authCreateUser(username: str, admin: bool = False) → save.types.auth.CreateUserResponse

Create a new user

Parameters:
  • username (str) – Username to create
  • admin (bool, optional) – If the user should be an admin. Defaults to False.
Returns:

Data or error

Return type:

CreateUserResponse

authDeleteUser(user_id: str) → save.types.auth.AuthBase

Delete a user

Parameters:user_id (str) – User id to delete
Returns:Data or error
Return type:AuthBase
authGetAPIKey(username: str, password: str) → save.types.auth.AuthResponse

Get API key from a valid username and password

Parameters:
  • username (str) – Username
  • password (str) – Password
Returns:

Data or error

Return type:

AuthResponse

authGetAllUsers() → save.types.auth.AllUsersResponse

Get a list of all users

Returns:Data or error
Return type:AllUsersResponse
authResetAPIKey() → save.types.auth.AuthResetAPIKeyResponse

Reset api key for current user

Returns:Data or error
Return type:AuthResetAPIKeyResponse
backup() → save.types.general.BackupResponse

Backup the databases

Returns:Data or error
Return type:BackupResponse
blogsAddFavorite(url: str) → save.types.general.GenericResponse

Add a to favorite

Parameters:url (str) – A valid URL that exists in the DB
Returns:Data or error
Return type:GenericResponse
blogsAddUpdate(data: save.types.blogs.BlogsAddUpdate) → save.types.blogs.BlogsBase

Add or update an existing blog

Parameters:data (BlogsAddUpdate) – Blogs object
Returns:Data or error
Return type:BlogsBase
blogsAll() → save.types.blogs.BlogsResponse

Get all the blogs

Returns:Data or error
Return type:BlogsResponse
blogsCategoriesByCount(q: Optional[str] = None) → save.types.general.Categories

Get all blog keywords and their counts

Parameters:q (str, optional) – Get count for specified query. Defaults to None.
Returns:Data or error
Return type:Categories
blogsDelete(id: str) → save.types.blogs.BlogsBase

Delete a blog by id

Parameters:id (str) – ID of blog to delete
Returns:Data or error
Return type:BlogsBase
blogsDeleteFavorite(url: str) → save.types.general.GenericResponse

Delete a favorite

Parameters:url (str) – A valid url that is in the DB
Returns:Data or error
Return type:GenericResponse
blogsExact(url: str) → save.types.blogs.BlogsExactResponse

Search for exact blog based on URL

Parameters:url (str) – URL to match
Returns:Data or error
Return type:BlogsExactResponse
blogsExport() → save.types.blogs.BlogsExport

Export all blogs as an importable dataset

Returns:JSON object
Return type:BlogsExport
blogsGetFavorites() → save.types.blogs.BlogsResponse

Get a list of all favorites

Returns:Data or error
Return type:BlogsResponse
blogsImport(data: List[save.types.other.Entry]) → save.types.blogs.BlogsBase

Update the blogs index with an array of blogs

Parameters:data (List[Entry]) – Array of blogs
Returns:Data or error
Return type:BlogsBase
blogsLatest(limit: int = 10) → save.types.blogs.BlogsResponse

Get latest blogs

Parameters:limit (int, optional) – Limit the number of results. Defaults to 10.
Returns:Data or error
Return type:BlogsResponse
blogsRandom() → save.types.blogs.BlogsExactResponse

Get a random blog

Returns:Data or error
Return type:BlogsExactResponse
blogsSearch(query: str, limit: int = 10, fields: List[str] = ['excerpt', 'title', 'url', 'keywords']) → save.types.blogs.BlogsResponse

Search for blogs

Parameters:
  • query (str) – What to search for
  • limit (int, optional) – Limit the number of matches. Defaults to 10.
  • fields (List[str], optional) – Fields to search for in the backend. Defaults to [“excerpt”, “title”, “url”, “keywords”].
Returns:

Data or error

Return type:

BlogsResponse

blogsSearchByCategories(filters: List[str], limit: int = 10) → save.types.blogs.BlogsSearchCategoriesResponse

Search blogs by keywords

Parameters:
  • filters (List[str]) – Categories to filter by
  • limit (int, optional) – Limit the number of matches. Defaults to 10.
Returns:

Data or error

Return type:

BlogsSearchCategoriesResponse

deleteIndex(index: str) → save.types.general.GenericResponse

Delete an index

Parameters:index (str) – Name of an index
Returns:Data or error
Return type:GenericResponse
getAllIndexes() → save.types.general.GenericResponse

Get all available indexes

Returns:Data or error
Return type:GenericResponse
imageGet(id: str) → save.types.images.ImagesExactResponse

Get an image

Parameters:id (str) – A valid image ID
Returns:Data or error
Return type:ImagesExactResponse
imagesAddFavorite(id: str) → save.types.general.GenericResponse

Add a to favorite

Parameters:id (str) – A valid image id
Returns:Data or error
Return type:GenericResponse
imagesAll() → save.types.images.ImagesResponse

Get all the blogs

Returns:Data or error
Return type:ImagesResponse
imagesCategoriesByCount(q: Optional[str] = None) → save.types.general.Categories

Get all image keywords and their counts

Parameters:q (str, optional) – Get count for specified query. Defaults to None.
Returns:Data or error
Return type:Categories
imagesDelete(id: str) → save.types.general.GenericResponse

Delete an image

Parameters:id (str) – A valid image ID
Returns:Data or error
Return type:GenericResponse
imagesDeleteFavorite(id: str) → save.types.general.GenericResponse

Delete a favorite

Parameters:id (str) – A valid url that is in the DB
Returns:Data or error
Return type:GenericResponse
imagesExport() → save.types.images.ImagesExport

Export all images as an importable dataset

Returns:JSON object
Return type:ImagesExport
imagesGetFavorites() → save.types.images.ImagesResponse

Get a list of all favorites

Returns:Data or error
Return type:ImagesResponse
imagesImport(data: List[save.types.images.Image]) → save.types.images.ImagesBase

Update the images index with an array of images

Parameters:data (List[Image]) – Array of images
Returns:Data or error
Return type:ImagesBase
imagesLatest(limit: int = 10) → save.types.images.ImagesResponse

Get latest images

Parameters:limit (int, optional) – Limit the number of results. Defaults to 10.
Returns:Data or error
Return type:ImagesResponse
imagesRandom() → save.types.images.ImagesExactResponse

Get a random blog

Returns:Data or error
Return type:ImagesExactResponse
imagesSearch(query: str, limit: int = 10) → save.types.images.ImagesResponse

Search for images

Parameters:
  • query (str) – What to search for
  • limit (int, optional) – Limit the number of matches. Defaults to 10.
Returns:

Data or error

Return type:

ImagesResponse

imagesSearchByCategories(filters: List[str], limit: int = 10) → save.types.images.ImagesSearchCategoriesResponse

Search images by keywords

Parameters:
  • filters (List[str]) – Categories to filter by
  • limit (int, optional) – Limit the number of matches. Defaults to 10.
Returns:

Data or error

Return type:

ImagesSearchCategoriesResponse

imagesUpdate(id: str, keywords: Optional[List[str]] = None, title: Optional[str] = None, excerpt: Optional[str] = None) → save.types.general.GenericResponse

Update info about an image

Parameters:
  • id (str) – A valid image ID
  • keywords (List[str], optional) – List of keywords. Defaults to None.
  • title (str, optional) – Title for image. Defaults to None.
  • excerpt (str, optional) – Description for image. Defaults to None.
Returns:

Data or error

Return type:

GenericResponse

imagesUploadFromFile(file_path: str) → save.types.general.GenericResponse

Upload an image from a file

Parameters:file_path (str) – The contents of an image file
Returns:Data or error
Return type:GenericResponse
imagesUploadFromURL(url: str) → save.types.general.GenericResponse

Upload an image from a URL

Parameters:url (str) – URL of image
Returns:Data or error
Return type:GenericResponse
info() → save.types.general.ApiInfoResponse

Version information and basic health check

Returns:Data or error
Return type:ApiInfoResponse
logs() → save.types.general.LogsResponse

Get request logs if enabled

Returns:Data or error
Return type:LogsResponse
miscGetContent(url: str) → save.types.general.MiscGetContentResponse

Get content as text, image and reader mode html from url

Parameters:url (str) – A valid URL
Returns:Data or error
Return type:MiscGetContentResponse
miscHealthCheck(url: str) → save.types.general.GenericResponse

Misc api to do a HEAD request health check

Parameters:url (str) – A valid URL
Returns:Data or error
Return type:GenericResponse
otherAddFavorite(index: str, url: str) → save.types.general.GenericResponse

Add favorite for specific index

Parameters:
  • index (str) – Name of index
  • url (str) – A valid URL
Returns:

Data or error

Return type:

GenericResponse

otherAddUpdate(index: str, data: save.types.other.Entry) → save.types.other.OtherBase

Add/update entry in specified index

Parameters:
  • index (str) – Name of index
  • data (Entry) – Request body
Returns:

Data or error

Return type:

OtherBase

otherCategories(index: str) → save.types.general.Categories

Get index categories and their count

Parameters:index (str) – Name of index.
Returns:Data or error
Return type:Categories
otherDelete(index: str, id: str) → save.types.other.OtherBase

Delete an entry from specified index

Parameters:
  • index (str) – Name of index
  • id (str) – ID to delete
Returns:

Data or error

Return type:

OtherBase

otherDeleteFavorite(index: str, url: str) → save.types.general.GenericResponse

Delete a favorite for an index

Parameters:
  • index (str) – Name of index
  • url (str) – A valid URL
Returns:

Data or error

Return type:

GenericResponse

otherExact(index: str, url: str) → save.types.other.OtherExactResponse

Find an exact match in specified index

Parameters:
  • index (str) – Name of index
  • url (str) – URL to match
Returns:

Data or error

Return type:

OtherExactResponse

otherExport(index: str) → save.types.other.OtherExport

Export all entries in an index as an importable dataset

Parameters:index (str) – Name of index
Returns:JSON object
Return type:OtherExport
otherGetAll(index: str) → save.types.other.OtherResponse

Get all entries from specific index

Parameters:index (str) – Name of index
Returns:Data or error
Return type:OtherResponse
otherGetFavorites(index: str) → save.types.other.OtherResponse

Get favorites from specific index

Parameters:index (str) – Name of index
Returns:Data or error
Return type:OtherResponse
otherImport(index: str, data: List[save.types.other.Entry]) → save.types.other.OtherBase

Update the tools index with an array of tools

Parameters:data (List[OtherEntry]) – Array of entries
Returns:Data or error
Return type:OtherBase
otherLatest(index: str, limit: int = 10) → save.types.other.OtherResponse

Get latest from other index

Parameters:
  • index (str) – Name of index
  • limit (int, optional) – Limit the number of results. Defaults to 10.
Returns:

Data or error

Return type:

OtherResponse

otherSearch(index: str, query: str, limit: int = 10, fields: List[str] = ['entry_keywords', 'title', 'excerpt', 'url']) → save.types.other.OtherResponse

Search other indexes

Parameters:
  • index (str) – Name of index
  • query (str) – Search query params
  • limit (int, optional) – Limit the number of results. Defaults to 10.
  • fields (List[str], optional) – Field order to search. Defaults to [“entry_keywords”, “title”, “excerpt”, “url”].
Returns:

Data or error

Return type:

OtherResponse

otherSearchByCategories(index: str, filters: List[str], limit: int = 10) → save.types.other.OtherSearchCategoriesResponse

Search index by categories

Parameters:
  • index (str) – Name of index
  • filters (List[str]) – Categories to filter by
  • limit (int, optional) – Limit the number of matches. Defaults to 10.
Returns:

Data or error

Return type:

OtherSearchCategoriesResponse

searchAny(query: str) → save.types.general.SearchAllResponse

Search in any indexes

Parameters:query (str) – What to search for
Returns:Data or error
Return type:SearchAllResponse
searchExactAnyIndex(url: str) → save.types.general.SearchExactAll

Search for exact URL match in any index

Parameters:url (str) – URL to search for
Returns:Data or error
Return type:SearchExactAll
toolsAddFavorite(url: str) → save.types.general.GenericResponse

Add a to favorite

Parameters:url (str) – A valid URL that exists in the DB
Returns:Data or error
Return type:GenericResponse
toolsAddUpdate(data: save.types.tools.Tool, refresh: Optional[typing_extensions.Literal['true'][true]] = None) → save.types.tools.ToolsBase

Add or update an existing tool

Parameters:
  • data (ToolsAddUpdate) – Tool data
  • refresh (Literal[, optional) – Refresh data from external sources. Defaults to None.
Returns:

Data or error

Return type:

ToolsBase

toolsAll() → save.types.tools.ToolsResponse

Get all the tools

Returns:Dictionary of tool objects
Return type:ToolsResponse
toolsCategoriesByCount(q: Optional[str] = None) → save.types.general.Categories

Get tool categories and their count

Parameters:q (str, optional) – Get count of specified query. Defaults to None.
Returns:Data or error
Return type:Categories
toolsDelete(id: str) → save.types.tools.ToolsBase

Delete a tool by id

Parameters:id (str) – Id of tool to delete
Returns:Data or error
Return type:ToolsBase
toolsDeleteFavorite(url: str) → save.types.general.GenericResponse

Delete a favorite

Parameters:url (str) – A valid url that is in the DB
Returns:Data or error
Return type:GenericResponse
toolsExact(url: str) → save.types.tools.ToolsExactResponse

Find exact tool based on URL match

Parameters:url (str) – URL to match
Returns:Data or error
Return type:ToolsExactResponse
toolsExport() → save.types.tools.ToolsExport

Export all tools as an importable dataset

Returns:JSON object
Return type:ToolsExport
toolsGetFavorites() → save.types.tools.ToolsResponse

Get a list of all favorites

Returns:Data or error
Return type:ToolsResponse
toolsImport(data: List[save.types.tools.Tool]) → save.types.tools.ToolsBase

Update the tools index with an array of tools

Parameters:data (List[Tool]) – Array of tools
Returns:Data or error
Return type:ToolsBase
toolsLatest(limit: int = 10) → save.types.tools.ToolsResponse

Get latest tools

Parameters:limit (int, optional) – Limit the number of results. Defaults to 10.
Returns:Data or error
Return type:ToolsResponse
toolsRandom() → save.types.tools.ToolsExactResponse

Get a random tool

Returns:Data or error
Return type:ToolsExactResponse
toolsSearch(query: str, limit: int = 10, fields: List[str] = ['name', 'description', 'categories', 'similar']) → save.types.tools.ToolsResponse

Search for tools

Parameters:
  • query (str) – What to search for
  • limit (int, optional) – Limit the number of matches. Defaults to 10.
  • fields (List[str], optional) – Fields to match in the backend. Defaults to [“name”, “description”, “categories”, “similar”].
Returns:

Data or error

Return type:

ToolsResponse

toolsSearchByCategories(filters: List[str], limit: int = 10) → save.types.tools.ToolsSearchCategoriesResponse

Search tools by categories

Parameters:
  • filters (List[str]) – Categories to filter by
  • limit (int, optional) – Limit the number of matches. Defaults to 10.
Returns:

Data or error

Return type:

ToolsSearchCategoriesResponse

Types

class save.types.auth.AllUsersResponse
class save.types.auth.Auth
class save.types.auth.AuthBase
class save.types.auth.AuthResetAPIKey
class save.types.auth.AuthResetAPIKeyResponse
class save.types.auth.AuthResponse
class save.types.auth.CreateUser
class save.types.auth.CreateUserResponse
class save.types.auth.User
class save.types.auth.UserResponse
class save.types.blogs.BlogsAddUpdate
class save.types.blogs.BlogsBase
class save.types.blogs.BlogsExactResponse
class save.types.blogs.BlogsExport
class save.types.blogs.BlogsResponse
class save.types.blogs.BlogsSearchCategoriesResponse
class save.types.tools.SimilarTools
avatar = None

avatar url

description = None

description of tool

name = None

Name of tool

stars = None

Number of github stars

url = None

url for tool

class save.types.tools.Tool
created_on = None

Time added

excerpt = None

Description

id = None

ID from backend

image = None

Image url

keywords = None

List of categories that have been specified

similar_tools = None

list of similar tools object

stars = None

Number of github stars

title = None

Title for tool

url = None

URL for tool

class save.types.tools.ToolsBase
class save.types.tools.ToolsExactResponse
class save.types.tools.ToolsExport
class save.types.tools.ToolsResponse
class save.types.tools.ToolsSearchCategoriesResponse
class save.types.other.Entry
class save.types.other.OtherAddUpdate
class save.types.other.OtherBase
class save.types.other.OtherExactResponse
class save.types.other.OtherExport
class save.types.other.OtherResponse
class save.types.other.OtherSearchCategoriesResponse
class save.types.images.Image
class save.types.images.ImagesAddUpdate
class save.types.images.ImagesBase
class save.types.images.ImagesExactResponse
class save.types.images.ImagesExport
class save.types.images.ImagesResponse
class save.types.images.ImagesSearchCategoriesResponse
class save.types.general.Api
class save.types.general.ApiInfo
class save.types.general.ApiInfoResponse
class save.types.general.ApiResponse
class save.types.general.BackupResponse
class save.types.general.Categories
class save.types.general.GeneralBase
class save.types.general.GenericResponse
class save.types.general.LogsJSON
class save.types.general.LogsResponse
class save.types.general.MiscContentData
class save.types.general.MiscGetContentResponse
class save.types.general.SearchAllEntry
class save.types.general.SearchAllResponse
class save.types.general.SearchExactAll
class save.types.general.WebhookResponse

Indices and tables