nitrokey.updates

exception nitrokey.updates.DownloadError

Basen: Exception

__init__(msg)
Parameter:

msg (str)

Rückgabetyp:

None

exception nitrokey.updates.OverwriteError

Basen: Exception

__init__(path)
Parameter:

path (str)

Rückgabetyp:

None

class nitrokey.updates.Asset

Basen: Objekt

Asset(tag: str, url: str)

__init__(tag, url)
Parameter:
  • tag (str)

  • url (str)

Rückgabetyp:

None

download(f, callback=None)
Parameter:
  • f (BinaryIO)

  • callback (Callable[[int, int], None] | None)

Rückgabetyp:

None

download_to_dir(d, overwrite=False, callback=None)
Parameter:
  • d (str)

  • overwrite (bool)

  • callback (Callable[[int, int], None] | None)

Rückgabetyp:

str

read(callback=None)
Parameter:

callback (Callable[[int, int], None] | None)

Rückgabetyp:

bytes

tag: str
url: str
class nitrokey.updates.Release

Basen: Objekt

Release(tag: str, assets: list[str])

__init__(tag, assets)
Parameter:
  • tag (str)

  • assets (list[str])

Rückgabetyp:

None

find_asset(url_pattern)
Parameter:

url_pattern (Pattern[str])

Rückgabetyp:

Asset | None

require_asset(url_pattern)
Parameter:

url_pattern (Pattern[str])

Rückgabetyp:

Asset

assets: list[str]
tag: str
class nitrokey.updates.Repository

Basen: Objekt

Repository(Eigentümer: str, Name: str)

__init__(owner, name)
Parameter:
  • owner (str)

  • name (str)

Rückgabetyp:

None

get_latest_release()
Rückgabetyp:

Release

get_release(tag)
Parameter:

tag (str)

Rückgabetyp:

Release

get_release_or_latest(tag=None)
Parameter:

tag (str | None)

Rückgabetyp:

Release

name: str
owner: str