
    tni                         d dl Z d dlmZ d dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ  e j        e          Zdefd	ZdS )
    N)Any)print)Progress)	APIClient)Identity)handle_http_errorsreturnc                  B   t                      } | j        dk    rt          d           d S |                                 st          d           d S t	                      5 }t          dd          5 }t          |d          5  |                    d	          }|                                 d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   |	                                }t          d
|d          d           d d d            d S # 1 swxY w Y   d S )Ntokenu:   ⚡ [bold]Using API token from environment variable[/bold]z<No credentials found. Use [blue]`fastapi login`[/] to login.u   ⚡ Fetching profileT)title	transient )messagez	/users/meu
   ⚡ [bold]emailz[/bold])
r   	auth_moder   is_logged_inr   r   r   getraise_for_statusjson)identityclientprogressresponsedatas        ^/var/www/html/gpu-tools/venv/lib/python3.11/site-packages/fastapi_cloud_cli/commands/whoami.pywhoamir      s   zzHW$$JKKK  "" LMMM	 32dCCC 	,x#Hb999 , ,!::k22))+++, , , , , , , , , , , , , , ,	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	,
 }}14=1112223 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3sZ   D0C*B8,C8B<<C?B< CDC	DC	0DDD)loggingtypingr   richr   rich_toolkit.progressr   fastapi_cloud_cli.utils.apir   fastapi_cloud_cli.utils.authr   fastapi_cloud_cli.utils.clir   	getLogger__name__loggerr        r   <module>r)      s                 * * * * * * 1 1 1 1 1 1 1 1 1 1 1 1 : : : : : :		8	$	$3 3 3 3 3 3 3r(   