Token
Description: Token is a subclass of Base and represents a token used to store file information.
Attributes
| Name | Type | Description |
|---|---|---|
| id | StrictStr | |
| created | datetime.datetime | |
| sha | StrictStr | |
| salt | StrictStr | |
| created_by_id | Optional[StrictStr] |
Methods
| Name | Description |
|---|---|
| to_str | Returns the string representation of the model using alias |
| to_json | Returns the JSON representation of the model using alias |
| from_json | Create an instance of Token from a JSON string |
| to_dict | Return the dictionary representation of the model using alias. |
| from_dict | Create an instance of Token from a dict |
| from_storage_token | |
| compare_token | Compare the token with the data and raise an exception if they do not match. |
| from_bytes | Create a Token from bytes and salt. |