towhee.command.user.UserCommand

class towhee.command.user.UserCommand(args)[source]

Bases: object

Implementation for subcmd towhee login, towhee whoami and towhee logout.

Methods

erase_from_credential_store

Erases the credential store relative to https://towhee.io.

install

login

Log in with https://towhee.io account.

logout

Log out with https://towhee.io account.

whoami

write_to_credential_store

Write a token to store credentials.

__call__() None[source]

Call self as a function.

__init__(args) None[source]
erase_from_credential_store(username=None) None[source]

Erases the credential store relative to https://towhee.io. If no username is specified, will erase the first entry.

Parameters:

username (str) – authorized username.

login() None[source]

Log in with https://towhee.io account.

logout() None[source]

Log out with https://towhee.io account.

write_to_credential_store(username: str, password: str) None[source]

Write a token to store credentials.

Parameters:
  • username (str) – authorized username.

  • password (str) – user password.