application.types package#

Submodules#

application.types.apikey module#

application.types.apikey

class application.types.apikey.APIKey#

Bases: TypedDict

A type describing an API key.

created: datetime#
description: str#
key: str#
perms: list[str]#

application.types.badnotification module#

application.types.badnotification

class application.types.badnotification.BadNotification#

Bases: TypedDict

An error indicating that a notification could not be sent due to invalid data.

message: str#

application.types.badtagquery module#

application.types.badtagquery

class application.types.badtagquery.BadTagQuery#

Bases: TypedDict

An error that occurs when a tag query has invalid syntax.

message: str#

application.types.blob module#

application.types.blob

class application.types.blob.Blob#

Bases: TypedDict

A type for blob data.

created: datetime#
creator: str#
ephemeral: bool#
ext: str#
hidden: bool#
id: str#
mimetype: str#
name: str#
preview: str | None#
references: int#
size: int#
tags: list[str]#
thumbnail: str | None#

application.types.blob_storage module#

application.types.blob_storage

class application.types.blob_storage.BlobPreview(id, ext)#

Bases: BlobStorage

A subclass of BlobStorage that represents a preview version of a blob. These previews are smaller and lower quality than the original.

class application.types.blob_storage.BlobStorage(id, ext)#

Bases: object

A class to represent and manage blob storage paths.

basename()#

Generate the base name for the blob storage object.

Returns:

The base name consisting of the object’s ID and its extension.

Return type:

str

property exists: bool#

Check if the blob exists in the storage.

This method constructs the full path of the blob using its ID and checks if a file with the blob’s basename exists at that path.

Returns:

True if the blob exists, False otherwise.

Return type:

bool

ext: str#
id: str#
path(*, create=False)#

Returns the full path to the blob, optionally creating directories.

Parameters:

create (bool) – If True, the necessary directories will be created if they do not exist.

Returns:

The full path to the blob.

Return type:

str

class application.types.blob_storage.BlobThumbnail(id, ext)#

Bases: BlobStorage

A subclass of BlobStorage that represents a thumbnail version of a blob. These thumbnails are even smaller and lower quality than previews, and thus much faster to load.

application.types.blobcount module#

application.types.blobcount

class application.types.blobcount.BlobCount#

Bases: TypedDict

A type for getting the number of blobs that match a query. This type is used so that if the query fails, we can return an error message instead of zero.

count: int#

application.types.bloblist module#

application.types.bloblist

class application.types.bloblist.BlobList#

Bases: TypedDict

A list of blobs. This type is used so that if the query fails, we can return an error message instead of an empty list.

blobs: list[Blob]#

application.types.blobsearchfilter module#

application.types.blobsearchfilter

class application.types.blobsearchfilter.BlobSearchFilter#

Bases: TypedDict

An input type for filtering blob data. All fields are optional, and if a field is null, it will not be used in the query.

begin_date: datetime | None#
creator: str | None#
end_date: datetime | None#
ephemeral: bool | None#
name: str | None#
tag_expr: str | None#

application.types.book module#

application.types.book

class application.types.book.Book#

Bases: TypedDict

A type for information about a linked book.

audiobook: str | None#
authors: list[str]#
categories: list[str]#
creator: str#
description: str | None#
ebooks: list[EBook]#
has_description: bool#
id: str#
industryIdentifiers: list[BookIdent]#
language: str#
maturityRating: str#
owner: UserMinData#
ownerHistory: list[BookOwnerHist]#
pageCount: int#
publishedDate: datetime#
publisher: str#
rfid: str#
shareHistory: list[BookShare]#
shared: bool#
smallThumbnail: str | None#
subtitle: str | None#
thumbnail: str | None#
title: str#

application.types.bookcreatedata module#

application.types.bookcreatedata

class application.types.bookcreatedata.BookCreateData#

Bases: TypedDict

Data for creating a new book entry.

authors: list[str]#
description: str | None#
isbn: str#
pageCount: int#
publishedDate: datetime#
publisher: str#
rfid: str#
subtitle: str | None#
thumbnail: str | None#
title: str#

application.types.bookeditdata module#

application.types.bookeditdata

class application.types.bookeditdata.BookEditData#

Bases: TypedDict

Modified data for a book, used when editing a book entry.

authors: list[str]#
subtitle: str | None#
title: str#

application.types.bookident module#

application.types.bookident

class application.types.bookident.BookIdent#

Bases: TypedDict

An industry identifier for a book, such as ISBN.

identifier: str#
type: str#

application.types.booklist module#

application.types.booklist

class application.types.booklist.BookList#

Bases: TypedDict

A list of books.

books: list[Book]#

application.types.bookownerhist module#

application.types.bookownerhist

class application.types.bookownerhist.BookOwnerHist#

Bases: TypedDict

Owner history information for a book.

display_name: str#
name: str#
start: datetime#
stop: datetime#
user_id: str#

application.types.booksearchfilter module#

application.types.booksearchfilter

class application.types.booksearchfilter.BookSearchFilter#

Bases: TypedDict

A filter for searching books. All fields are optional, and if none are provided, all books will be returned.

author: str | None#
genre: str | None#
owner: str | None#
shared: bool | None#
title: str | None#

application.types.bookshare module#

application.types.bookshare

class application.types.bookshare.BookShare#

Bases: TypedDict

Sharing information for a book.

display_name: str#
name: str#
start: datetime#
stop: datetime | None#
user_id: str | None#

application.types.booktag module#

application.types.booktag

class application.types.booktag.BookTag#

Bases: TypedDict

A type for a tag associated with a book, typically an RFID tag or QR code.

bookId: str#
creator: str#
rfid: str#

application.types.bugcomment module#

application.types.bugcomment

class application.types.bugcomment.BugComment#

Bases: TypedDict

A comment on a bug report.

body: str#
body_html: str#
created: datetime#
creator: str#

application.types.bugreport module#

application.types.bugreport

class application.types.bugreport.BugReport#

Bases: TypedDict

Information about a bug report.

body: str#
body_html: str#
convo: list[BugComment]#
created: datetime#
creator: str#
id: str#
resolved: bool#

application.types.bugreportcreationfailederror module#

application.types.bugreportcreationfailederror

class application.types.bugreportcreationfailederror.BugReportCreationFailedError#

Bases: TypedDict

An error indicating that creating a bug report failed.

message: str#

application.types.config module#

application.types.config

class application.types.config.Config#

Bases: TypedDict

A type for storing arbitrary configuration settings.

name: str#
value: str | None#

application.types.configlist module#

application.types.configlist

class application.types.configlist.ConfigList#

Bases: TypedDict

A list of configuration settings.

configs: list[Config]#

application.types.diskusage module#

application.types.diskusage

class application.types.diskusage.DiskUsage#

Bases: TypedDict

Information about disk usage on the server.

free: float#
name: str#
total: float#
used: float#

application.types.document module#

application.types.document

class application.types.document.Document#

Bases: TypedDict

body: str#
body_html: str#
created: datetime#
creator: UserMinData#
id: str#
title: str#
updated: datetime | None#

application.types.documentmin module#

application.types.documentmin

class application.types.documentmin.DocumentMin#

Bases: TypedDict

created: datetime#
creator: UserMinData#
id: str#
title: str#

application.types.ebook module#

application.types.ebook

class application.types.ebook.EBook#

Bases: TypedDict

eBook information for a book.

fileType: str#
url: str#

application.types.feed module#

application.types.feed

class application.types.feed.Feed#

Bases: TypedDict

A type for storing information about a data feed.

created: datetime#
creator: str#
currentPage: int | None#
currentSort: SortingOutput | None#
id: str#
inactive: bool#
kind: str#
name: str#
notify: bool#
url: str#

application.types.feeddocument module#

application.types.feeddocument

class application.types.feeddocument.FeedDocument#

Bases: TypedDict

An individual feed document, representing an item in a feed.

author: str | None#
body: str#
body_html: str#
created: datetime#
feed: str#
id: str#
posted: datetime | None#
read: bool#
title: str | None#
updated: datetime | None#
url: str#

application.types.insufficientperms module#

application.types.insufficientperms

class application.types.insufficientperms.InsufficientPerms#

Bases: TypedDict

An error indicating that the user does not have sufficient permissions to perform the action.

message: str#

application.types.invalidfields module#

application.types.invalidfields

class application.types.invalidfields.InvalidFields#

Bases: TypedDict

An error indicating that certain fields in the request are invalid.

fields: list[str]#
message: str#

application.types.inventorysearchfilter module#

application.types.inventorysearchfilter

class application.types.inventorysearchfilter.InventorySearchFilter#

Bases: TypedDict

An input type for filtering inventory items. All fields are optional, and if a field is null, it will not be used in the query.

category: str | None#
location: str | None#
owner: str | None#
type: str | None#

application.types.issuelabel module#

application.types.issuelabel

class application.types.issuelabel.IssueLabel#

Bases: TypedDict

A GitHub issue label.

color: str#
description: str#
name: str#

application.types.issuelist module#

application.types.issuelist

class application.types.issuelist.IssueList#

Bases: TypedDict

A list of GitHub issues.

issues: list[RepositoryIssue]#

application.types.item module#

application.types.item

class application.types.item.Item#

Bases: TypedDict

A type for describing an arbitrary inventory item.

blob: Blob#
category: str#
created: datetime#
creator: UserMinData#
description: str#
description_html: str#
id: str#
location: str#
owner: UserMinData#
rfid: list[str]#
type: str#

application.types.lastmutation module#

application.types.lastmutation

class application.types.lastmutation.LastMutation#

Bases: TypedDict

Information about the last mutation made by a user.

request: str#
timestamp: datetime#
username: str | None#

application.types.logresult module#

application.types.logresult

class application.types.logresult.LogResult#

Bases: TypedDict

A type representing the result of a logging operation.

result: bool#

application.types.notification module#

application.types.notification

class application.types.notification.Notification#

Bases: TypedDict

Information about a notification sent to a user.

category: str#
created: datetime#
device_count: int#
id: str#
message: str#
read: bool#
recipient: str#

application.types.qrparseresponse module#

application.types.qrparseresponse

class application.types.qrparseresponse.QRParseResponse#

Bases: TypedDict

A type for the result of parsing a QR code.

data: str | None#
error: str | None#

application.types.repositoryissue module#

application.types.repositoryissue

class application.types.repositoryissue.RepositoryIssue#

Bases: TypedDict

A type representing a GitHub issue.

labels: list[IssueLabel]#
number: int#
state: str#
title: str#

application.types.schema module#

application.types.schema

class application.types.schema.Schema#

Bases: TypedDict

A type representing the complete GraphQL schema.

mutations: list[SchemaQuery]#
queries: list[SchemaQuery]#
types: list[SchemaType]#

application.types.schemaparam module#

application.types.schemaparam

class application.types.schemaparam.SchemaParam#

Bases: TypedDict

A parameter in a GraphQL schema query.

name: str#
optional: bool#
type: str#

application.types.schemaquery module#

application.types.schemaquery

class application.types.schemaquery.SchemaQuery#

Bases: TypedDict

A query in the GraphQL schema.

name: str#
params: list[SchemaParam]#
query: str#
returns: SchemaReturnType#

application.types.schemareturntype module#

application.types.schemareturntype

class application.types.schemareturntype.SchemaReturnType#

Bases: TypedDict

A return type in a GraphQL schema query.

array: bool#
optional: bool#
type: str#

application.types.schematype module#

application.types.schematype

class application.types.schematype.SchemaType#

Bases: TypedDict

A type in the GraphQL schema.

input: bool#
params: list[SchemaParam]#
subtypes: list[str]#
type: str#
union: bool#

application.types.sorting module#

application.types.sorting

class application.types.sorting.Sorting#

Bases: TypedDict

An input type for sorting results in queries.

descending: bool#
fields: list[str]#

application.types.sortingoutput module#

application.types.sortingoutput

class application.types.sortingoutput.SortingOutput#

Bases: TypedDict

An output type for sorting results in queries.

descending: bool#
fields: list[str]#

application.types.subscription module#

application.types.subscription

class application.types.subscription.Subscription#

Bases: TypedDict

A WebPush subscription for a user.

endpoint: str#
expirationTime: str | None#

application.types.subscriptionkeys module#

application.types.subscriptionkeys

class application.types.subscriptionkeys.SubscriptionKeys#

Bases: TypedDict

A pair of keys used for a WebPush subscription.

auth: str#
p256dh: str#

application.types.subscriptionlist module#

application.types.subscriptionlist

class application.types.subscriptionlist.SubscriptionList#

Bases: TypedDict

A list of WebPush subscriptions for a user.

list: list[Subscription]#

application.types.subscriptiontoken module#

application.types.subscriptiontoken

class application.types.subscriptiontoken.SubscriptionToken#

Bases: TypedDict

A WebPush subscription token for a user.

endpoint: str#
expirationTime: str | None#

application.types.subscriptiontokenkeys module#

application.types.subscriptiontokenkeys

class application.types.subscriptiontokenkeys.SubscriptionTokenKeys#

Bases: TypedDict

A pair of keys used for a WebPush subscription token.

auth: str#
p256dh: str#

application.types.subsonicalbum module#

application.types.subsonicalbum

class application.types.subsonicalbum.SubsonicAlbum#

Bases: TypedDict

A type representing an album in Subsonic.

album: str#
artist: str#
coverArt: str | None#
created: datetime#
genre: str | None#
id: str#
isDir: bool#
parent: str#
playCount: int#
title: str#
year: int | None#

application.types.subsonicsearch module#

application.types.subsonicsearch

class application.types.subsonicsearch.SubsonicSearch#

Bases: TypedDict

The results of a Subsonic search query.

album: list[SubsonicAlbum]#

application.types.subsonictrack module#

application.types.subsonictrack

class application.types.subsonictrack.SubsonicTrack#

Bases: TypedDict

A type representing a track in Subsonic.

duration: int#
id: str#
title: str#

application.types.systeminfo module#

application.types.systeminfo

class application.types.systeminfo.SystemInfo#

Bases: TypedDict

System information about the server.

storage: list[DiskUsage]#

application.types.theme module#

application.types.theme

class application.types.theme.Theme#

Bases: TypedDict

A site theme template.

border: str#
colors: list[str]#
name: str#
special: list[str]#
text: list[str]#

application.types.themecolor module#

application.types.themecolor

class application.types.themecolor.ThemeColor#

Bases: TypedDict

Color settings for a user theme.

name: str#
value: str#

application.types.themecoloroutput module#

application.types.themecoloroutput

class application.types.themecoloroutput.ThemeColorOutput#

Bases: TypedDict

Color settings for a user theme.

name: str#
value: str#

application.types.themeoutput module#

application.types.themeoutput

class application.types.themeoutput.ThemeOutput#

Bases: TypedDict

Creation info for a new theme template.

border: str#
colors: list[str]#
name: str#
special: list[str]#
text: list[str]#

application.types.themesize module#

application.types.themesize

class application.types.themesize.ThemeSize#

Bases: TypedDict

Size settings for a user theme.

name: str#
value: str#

application.types.themesizeoutput module#

application.types.themesizeoutput

class application.types.themesizeoutput.ThemeSizeOutput#

Bases: TypedDict

Size settings for a user theme.

name: str#
value: str#

application.types.userbookcount module#

application.types.userbookcount

class application.types.userbookcount.UserBookCount#

Bases: TypedDict

Book count information for a user.

count: int#
owner: UserMinData#

application.types.userdata module#

application.types.userdata

class application.types.userdata.UserData#

Bases: TypedDict

Data for a user in the system.

disabled_modules: list[str]#
display_name: str#
email: str#
failed_logins: int#
groups: list[str]#
is_locked: bool#
last_login: datetime | None#
perms: list[str]#
theme: UserThemeOutput#
username: str#

application.types.usermindata module#

application.types.usermindata

class application.types.usermindata.UserMinData#

Bases: TypedDict

Minimal data for a user, used for listing users or getting basic user information.

display_name: str#
last_login: datetime | None#
username: str#

application.types.usertheme module#

application.types.usertheme

class application.types.usertheme.UserTheme#

Bases: TypedDict

Theme settings for a user.

colors: list[ThemeColor]#
sizes: list[ThemeSize]#

application.types.userthemeoutput module#

application.types.userthemeoutput

class application.types.userthemeoutput.UserThemeOutput#

Bases: TypedDict

Theme settings for a user.

colors: list[ThemeColorOutput]#
sizes: list[ThemeSizeOutput]#

application.types.weatheralert module#

application.types.weatheralert

class application.types.weatheralert.WeatherAlert#

Bases: TypedDict

A logging result of a weather alert.

message: str#
recipient: str#
sent: datetime#

application.types.weatherexecution module#

application.types.weatherexecution

class application.types.weatherexecution.WeatherExecution#

Bases: TypedDict

Information about the last weather execution.

error: str | None#
timestamp: datetime#
users: list[str]#

application.types.weathertemp module#

application.types.weathertemp

class application.types.weathertemp.WeatherTemp#

Bases: TypedDict

Temperature settings for weather alerts.

default: bool#
disable: bool#
value: float#

application.types.weathertempoutput module#

application.types.weathertempoutput

class application.types.weathertempoutput.WeatherTempOutput#

Bases: TypedDict

Temperature settings for weather alerts.

default: bool#
disable: bool#
value: float#

application.types.weatheruser module#

application.types.weatheruser

class application.types.weatheruser.WeatherUser#

Bases: TypedDict

Information about a user in the weather alerts system.

exclude: bool#
last_sent: datetime | None#
lat: float#
lon: float#
max: WeatherTempOutput#
min: WeatherTempOutput#
username: str#

application.types.weatheruserinput module#

application.types.weatheruserinput

class application.types.weatheruserinput.WeatherUserInput#

Bases: TypedDict

Update information for a user in the weather alerts system.

lat: float#
lon: float#
max: WeatherTemp#
min: WeatherTemp#
username: str#

application.types.zipprogress module#

application.types.zipprogress

class application.types.zipprogress.ZipProgress#

Bases: TypedDict

A type for keeping track of the progress of a zip archive creation.

finalizing: bool#
item: str#
progress: float#

Module contents#

application.types