snip.token.token.BookToken

class snip.token.token.BookToken(*, name: str, token: str, deployment_url: str = 'https://snip.roentgen.physik.uni-goettingen.de/', book_id: int)

Book tokens are only valid for book based access.

Attributes

deployment_url

type

Return the type of the token.

book_id

name

token

Methods

__init__(*, name, token[, deployment_url])

from_unsafe(name, token, book_id[, ...])

Create a token object from unsafe input.

__init__(*, name: str, token: str, deployment_url: str = 'https://snip.roentgen.physik.uni-goettingen.de/', book_id: int) None
classmethod from_unsafe(name: str, token: str, book_id: str | int, deployment_url: str | None = None) BookToken

Create a token object from unsafe input. I.e. optional deployment_url.

property type: str

Return the type of the token.