auth

Client API for authentication in Nexus.

qnexus.client.auth.login(
force: bool = False,
region: Literal['us', 'sg'] | None = None,
) None[source]

Log in to Quantinuum Nexus using the web browser.

(if web browser can’t be launched, displays the link)

Examples

>>> import qnexus as qnx
>>> qnx.auth.login()
>>> qnx.auth.login(force=True)  # Force re-authentication
qnexus.client.auth.login_no_interaction(
user: EmailStr,
pwd: str,
force: bool = False,
region: Literal['us', 'sg'] | None = None,
) None[source]

Log in to Nexus using a username and password. Please be careful with storing credentials in plain text or source code.

qnexus.client.auth.login_with_credentials(
force: bool = False,
region: Literal['us', 'sg'] | None = None,
) None[source]

Log in to Nexus using a username and password.

Examples

>>> import qnexus as qnx
>>> qnx.auth.login_with_credentials()
qnexus.client.auth.logout() None[source]

Clear tokens from file system and the client.

Examples

>>> import qnexus as qnx
>>> qnx.auth.logout()