
    Ցi                         S SK Jr  S SKJr  S SKJr  S SKJrJr  S SKJ	r	   " S S\
\5      r " S S	\
\5      r " S
 S\
\5      r\ " S S5      5       r\ " S S5      5       r\ " S S5      5       rg)    )	dataclass)datetime)Enum)LiteralOptional)parse_datetimec                   H    \ rS rSrSrSrSrSrSrSr	Sr
S	rS
rSrSrSrSrSrg)
SpaceStage   a  
Enumeration of possible stage of a Space on the Hub.

Value can be compared to a string:
```py
assert SpaceStage.BUILDING == "BUILDING"
```

Taken from https://github.com/huggingface/moon-landing/blob/main/server/repo_types/SpaceInfo.ts#L61 (private url).
NO_APP_FILECONFIG_ERRORBUILDINGBUILD_ERRORRUNNINGRUNNING_BUILDINGRUNTIME_ERRORDELETINGSTOPPEDPAUSEDAPP_STARTINGRUNNING_APP_STARTING N)__name__
__module____qualname____firstlineno____doc__r   r   r   r   r   r   r   r   r   r   r   r   __static_attributes__r       Z/var/www/html/banglarbhumi/venv/lib/python3.13/site-packages/huggingface_hub/_space_api.pyr
   r
      sG    	  K!LHKG)#MHGF!L1r   r
   c                   `    \ rS rSrSrSrSrSrSrSr	Sr
S	rS
rSrSrSrSrSrSrSrSrSrSrSrg)SpaceHardware2   a!  
Enumeration of hardwares available to run your Space on the Hub.

Value can be compared to a string:
```py
assert SpaceHardware.CPU_BASIC == "cpu-basic"
```

Taken from https://github.com/huggingface-internal/moon-landing/blob/main/server/repo_types/SpaceHardwareFlavor.ts (private url).
z	cpu-basiczcpu-upgradezcpu-xlz	zero-a10gzt4-smallz	t4-mediuml4x1l4x4l40sx1l40sx4l40sx8z
a10g-smallz
a10g-largeza10g-largex2za10g-largex4z
a100-largea100x4a100x8r   N)r   r   r   r   r   	CPU_BASICCPU_UPGRADECPU_XL	ZERO_A10GT4_SMALL	T4_MEDIUML4X1L4X4L40SX1L40SX4L40SX8
A10G_SMALL
A10G_LARGEA10G_LARGEX2A10G_LARGEX4
A100_LARGEA100x4A100x8r   r   r   r    r"   r"   2   sg    	 IKF I HIDDFFFJJ!L!LJFFr   r"   c                   $    \ rS rSrSrSrSrSrSrg)SpaceStorageW   a  
Enumeration of persistent storage available for your Space on the Hub.

Value can be compared to a string:
```py
assert SpaceStorage.SMALL == "small"
```

Taken from https://github.com/huggingface/moon-landing/blob/main/server/repo_types/SpaceHardwareFlavor.ts#L24 (private url).
smallmediumlarger   N)	r   r   r   r   r   SMALLMEDIUMLARGEr   r   r   r    r>   r>   W   s    	 EFEr   r>   c                   \    \ rS rSr% \S   \S'   \\\\4      \S'   \	\S'   S\	SS4S	 jr
S
rg)SpaceHotReloadingh   )createdcanceledstatusreplica_statusesrawdatareturnNc                 8    US   U l         US   U l        Xl        g )NrK   replicaStatuses)rK   rL   rM   )selfrN   s     r    __init__SpaceHotReloading.__init__n   s     8n $%6 7r   )rM   rL   rK   )r   r   r   r   r   __annotations__listtuplestrdictrS   r   r   r   r    rG   rG   h   s9    )**5c?++	IT d r   rG   c                       \ rS rSr% Sr\\S'   \\   \S'   \\   \S'   \\	   \S'   \\
   \S'   \\   \S'   \\S	'   S
\SS4S jrSrg)SpaceRuntimet   aG  
Contains information about the current runtime of a Space.

Args:
    stage (`str`):
        Current stage of the space. Example: RUNNING.
    hardware (`str` or `None`):
        Current hardware of the space. Example: "cpu-basic". Can be `None` if Space
        is `BUILDING` for the first time.
    requested_hardware (`str` or `None`):
        Requested hardware. Can be different from `hardware` especially if the request
        has just been made. Example: "t4-medium". Can be `None` if no hardware has
        been requested yet.
    sleep_time (`int` or `None`):
        Number of seconds the Space will be kept alive after the last request. By default (if value is `None`), the
        Space will never go to sleep if it's running on an upgraded hardware, while it will go to sleep after 48
        hours on a free 'cpu-basic' hardware. For more details, see https://huggingface.co/docs/hub/spaces-gpus#sleep-time.
    raw (`dict`):
        Raw response from the server. Contains more information about the Space
        runtime like number of replicas, number of cpu, memory size,...
stagehardwarerequested_hardware
sleep_timestoragehot_reloadingrM   rN   rO   Nc                 `   US   U l         UR                  S0 5      R                  S5      U l        UR                  S0 5      R                  S5      U l        UR                  S5      U l        UR                  S5      U l        UR                  S5      =nb  [        U5      OS U l        Xl        g )Nr]   r^   current	requested	gcTimeoutra   hotReloading)	r]   getr^   r_   r`   ra   rG   rb   rM   )rR   rN   raw_hrs      r    rS   SpaceRuntime.__init__   s    ']
R044Y?"&((:r":">">{"K((;/xx	*EIXXnE];]6:j.v6ptr   )r^   rb   rM   r_   r`   r]   ra   )r   r   r   r   r   r
   rU   r   r"   intr>   rG   rY   rS   r   r   r   r    r[   r[   t   s^    , }%% //l##-..	IT d r   r[   c                   d    \ rS rSr% Sr\\S'   \\S'   \\   \S'   \\   \S'   S\S\	SS	4S
 jr
Srg	)SpaceVariable   a  
Contains information about the current variables of a Space.

Args:
    key (`str`):
        Variable key. Example: `"MODEL_REPO_ID"`
    value (`str`):
        Variable value. Example: `"the_model_repo_id"`.
    description (`str` or None):
        Description of the variable. Example: `"Model Repo ID of the implemented model"`.
    updatedAt (`datetime` or None):
        datetime of the last update of the variable (if the variable has been updated at least once).
keyvaluedescription
updated_atvaluesrO   Nc                     Xl         US   U l        UR                  S5      U l        UR                  S5      nUb  [	        U5      U l        g S U l        g )Nrp   rq   	updatedAt)ro   rp   rh   rq   r   rr   )rR   ro   rs   rr   s       r    rS   SpaceVariable.__init__   sI    G_
!::m4ZZ,
8B8N.4TXr   )rq   ro   rr   rp   )r   r   r   r   r   rX   rU   r   r   rY   rS   r   r   r   r    rm   rm      sF     
HJ#""YC Y Y$ Yr   rm   N)dataclassesr   r   enumr   typingr   r   huggingface_hub.utilsr   rX   r
   r"   r>   rG   r[   rm   r   r   r    <module>r{      s    "   $ 02d 26"C "J3 "    & & &R Y Y Yr   