cvpy.annotation.base.Credentials.Credentials¶
- class cvpy.annotation.base.Credentials.Credentials(username: str | None = None, password: str | None = None, token: str | None = None, auth_file: str | None = None)¶
Construct an object that contains authentication information.
The auth_file with a token is recommended for a higher level of security. This auth file must not be readable or writable by the group or others. The file should have a single line with either a token, or comma-separated user and password. If auth_file parameter is not provided, this constructor reads the default auth file ~/.annotation_auth.
- Parameters:
- username:
Specifies the annotation server user name.
- password:
Specifies the annotation server password.
- auth_file:
Specifies the path to a file with comma separated annotation server user name and password.
- __init__(username: str | None = None, password: str | None = None, token: str | None = None, auth_file: str | None = None) None ¶
Methods
__init__([username, password, token, auth_file])
as_dict()
Creates a dictionary representation of this object.
from_dict(object_dict)
Creates a Credentials object from the dictionary representation.
get_auth_header()
Attributes
DEFAULT_ANNOTATION_AUTH_FILE
auth_file
password
token
username