+
    &j.                     F   ^ RI Ht ^ RIHt ^ RIHt ^ RIHt ^ RIHtH	t	H
t
  ! R R]]4      t ! R R	]]4      t ! R
 R]]4      t] ! R R4      4       t] ! R R4      4       t] ! R R4      4       t] ! R R4      4       t] ! R R4      4       t] ! R R4      4       tR# )    )	dataclass)datetime)Enum)Literal)HfMountHfUriparse_datetimec                   J    ] tR t^tRtRtRtRtRtRt	Rt
RtR	tR
tRtRtRtRtR# )
SpaceStagea  
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       r/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/huggingface_hub/_space_api.pyr   r      sG    	  K!LHKG)#MHGF!L1r   r   c                   ^    ] tR t^1tRtRtRtRtRtRt	Rt
RtR	tR
tRtRtRtRtRtRtRtRtRtR# )SpaceHardwarea!  
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	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	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"   1   sb    	 IK I HIDDFFFJJ!L!LJFFr   r"   c                   &    ] tR t^UtRtRtRtRtRtR# )SpaceStoragea  
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<   U   s    	 EFEr   r<   c                   r   a  ] tR t^ft o RtRtRtRtV 3R lR ltV 3R lR lt	V 3R lR lt
V 3R	 ltR
tV tR# )Volumea  
Describes a volume to mount in a Space or Job container.

Args:
    type (`str`):
        Type of volume: `"bucket"`, `"model"`, `"dataset"`, or `"space"`.
    source (`str`):
        Source identifier, e.g. `"username/my-bucket"` or `"username/my-model"`.
    mount_path (`str`):
        Mount path inside the container, e.g. `"/data"`. Must start with `/`.
    revision (`str` or `None`):
        Git revision (only for repos, defaults to `"main"`).
    read_only (`bool` or `None`):
        Read-only mount. Forced `True` for repos, defaults to `False` for buckets.
    path (`str` or `None`):
        Subfolder prefix inside the bucket/repo to mount, e.g. `"path/to/dir"`.
Nc                   < V ^8  d   QhRR/# )   returnNr   )format__classdict__s   "r    __annotate__Volume.__annotate__   s     ' 'D 'r   c                L   VP                  R R4      V n        VR,          V n        VP                  R4      pVe   TMVR,          V n        VP                  R4      V n        VP                  R4      pVe   TMVP                  R4      V n        VP                  R	4      V n        R# )
typemodelsource	mountPathN
mount_pathrevisionreadOnly	read_onlypath)getrM   rO   rQ   rR   rT   rU   )selfkwargsrQ   rT   s   &,  r    __init__Volume.__init__   s    JJvw/	X&ZZ,
(2(>*F<DX

:.JJz*	&/&;KAXJJv&	r   c                    < V ^8  d   QhRS[ /# rF   rG   dict)rH   rI   s   "r    rJ   rK      s       r   c                    RV P                   RV P                  RV P                  /pV P                  e   V P                  VR&   V P                  e   V P                  VR&   V P
                  e   V P
                  VR&   V# )z6Serialize to the JSON payload expected by the Hub API.rM   rO   rP   rR   rS   rU   )rM   rO   rQ   rR   rT   rU   rW   datas   & r    to_dictVolume.to_dict   st     DIIdkk

 ==$#}}D>>%#~~D99 99DLr   c                    < V ^8  d   QhRS[ /# r\   )str)rH   rI   s   "r    rJ   rK      s       r   c           	         \        \        V P                  V P                  V P                  V P
                  ;'       g    RR7      V P                  V P                  R7      P                  4       # )zGReturn the volume as an HF mount URI in the format expected by the CLI. )rM   idrR   path_in_repo)rO   rQ   rT   )	r   r   rM   rO   rR   rU   rQ   rT   to_uri)rW   s   &r    rj   Volume.to_uri   sP    diiDKK$--^b^g^g^m^mkmnnn
 &(		r   c                   < V ^8  d   Qh/ S[ R,          ;R&   S[;R&   S[;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   # )	rF   rM   rO   rQ   NrR   rT   rU   )bucketrN   datasetspace)r   re   bool)rH   rI   s   "r    rJ   rK   f   sc     ( 7
88) * K+ , O- . Dj/ 0 d{!1 2 *3 r   )rQ   rU   rT   rR   rO   rM   )r   r   r   r   r   rR   rT   rU   rY   rb   rj   __annotate_func__r   __classdictcell__rI   s   @r    rD   rD   f   sA     *  H!ID' '  i  r   rD   c                   >   a  ] tR t^t o V 3R lR ltV 3R ltRtV tR# )SpaceHotReloadingc                $   < V ^8  d   QhRS[ RR/# rF   ra   rG   Nr]   )rH   rI   s   "r    rJ   SpaceHotReloading.__annotate__   s      T d r   c                J    VR ,          V n         VR,          V n        Wn        R# )statusreplicaStatusesN)rz   replica_statusesrawr`   s   &&r    rY   SpaceHotReloading.__init__   s     8n $%6 7r   c                   < V ^8  d   Qh/ S[ R,          ;R&   S[S[S[S[R,          3,          ,          ;R&   S[;R&   # )rF   rz   Nr|   r}   )createdcanceled)r   listtuplere   r^   )rH   rI   s   "r    rJ   rx      sA     )**  5cDj122  
I	 r   )r}   r|   rz   N)r   r   r   r   rY   rq   r   rr   rs   s   @r    ru   ru      s        r   ru   c                   B   a  ] tR t^t o RtV 3R lR ltV 3R ltRtV tR# )SpaceRuntimea+  
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.
    volumes (`list[Volume]` or `None`):
        List of volumes mounted in the Space. Each volume is a [`Volume`] object describing its type, source,
        mount path, and optional settings. `None` if no volumes are attached.
    raw (`dict`):
        Raw response from the server. Contains more information about the Space
        runtime like number of replicas, number of cpu, memory size,...
c                $   < V ^8  d   QhRS[ RR/# rw   r]   )rH   rI   s   "r    rJ   SpaceRuntime.__annotate__   s     
 
T 
d 
r   c                   VR ,          V n         VP                  R/ 4      P                  R4      V n        VP                  R/ 4      P                  R4      V n        VP                  R4      V n        VP                  R4      V n        VP                  RR4      V n        VP                  R4      ;pe   \        V4      MR	V n        VP                  R
4      pVe   V Uu. uF  p\        R/ VB NK  	  upMR	V n
        Wn        R	# u upi )stagehardwarecurrent	requested	gcTimeoutstoragedevModeFhotReloadingNvolumesr   )r   rV   r   requested_hardware
sleep_timer   dev_moderu   hot_reloadingrD   r   r}   )rW   ra   raw_hrraw_volumesvs   &&   r    rY   SpaceRuntime.__init__   s    ']
R044Y?"&((:r":">">{"K((;/xx	*E2EIXXnE];]6:j.v6pthhy)=H=T[9[[9Z^ :s   Dc                   < V ^8  d   Qh/ S[ ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[;R&   S[R,          ;R&   S[S[,          R,          ;R	&   S[;R
&   # )rF   r   Nr   r   r   r   r   r   r   r}   )	r   r"   intr<   rp   ru   r   rD   r^   )rH   rI   s   "r    rJ   r      s     6 7 8 d""9 : &,,; < d
= > D  ? @ NA B %t++C D &\D  E F 
IG r   )	r   r   r   r}   r   r   r   r   r   N	r   r   r   r   r   rY   rq   r   rr   rs   s   @r    r   r      s     F
 
K  r   r   c                   B   a  ] tR t^t o RtV 3R lR ltV 3R ltRtV tR# )SpaceSecreta  
Contains information about a secret of a Space.

Secret values are write-only and cannot be read back. Only the key, description,
and last update time are returned by the API.

Args:
    key (`str`):
        Secret key. Example: `"GITHUB_API_KEY"`
    description (`str` or None):
        Description of the secret. Example: `"Github API key to access the Github API"`.
    updated_at (`datetime` or None):
        datetime of the last update of the secret (if the secret has been updated at least once).
c                *   < V ^8  d   QhRS[ RS[RR/# rF   keyvaluesrG   Nre   r^   )rH   rI   s   "r    rJ   SpaceSecret.__annotate__   s'     Y YC Y Y$ Yr   c                    Wn         VP                  R 4      V n        VP                  R4      pVe   \        V4      V n        R# RV n        R# )description	updatedAtN)r   rV   r   r	   
updated_atrW   r   r   r   s   &&& r    rY   SpaceSecret.__init__   s>    !::m4ZZ,
8B8N.4TXr   c                Z   < V ^8  d   Qh/ S[ ;R&   S[ R,          ;R&   S[R,          ;R&   # )rF   r   Nr   r   re   r   )rH   rI   s   "r    rJ   r      s3     " 
H# $ t% & 4' r   )r   r   r   Nr   rs   s   @r    r   r      s     &Y Y+  r   r   c                   B   a  ] tR t^t o RtV 3R lR ltV 3R ltRtV tR# )SpaceVariablea  
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).
c                *   < V ^8  d   QhRS[ RS[RR/# r   r   )rH   rI   s   "r    rJ   SpaceVariable.__annotate__  s'     Y YC Y Y$ Yr   c                    Wn         VR ,          V n        VP                  R4      V n        VP                  R4      pVe   \	        V4      V n        R# RV n        R# )valuer   r   N)r   r   rV   r   r	   r   r   s   &&& r    rY   SpaceVariable.__init__  sI    G_
!::m4ZZ,
8B8N.4TXr   c                f   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[ R,          ;R&   S[R,          ;R&   # )rF   r   r   Nr   r   r   )rH   rI   s   "r    rJ   r      s?       
H! " J# $ t% & 4' r   )r   r   r   r   Nr   rs   s   @r    r   r      s     &Y Y+  r   r   c                   B   a  ] tR tRt o RtV 3R lR ltV 3R ltRtV tR# )SpaceSearchResulti  a  A single result from the Spaces semantic search API.

Returned by [`HfApi.search_spaces`].

Attributes:
    id (`str`):
        ID of the Space (e.g. `"username/repo-name"`).
    author (`str`):
        Author of the Space.
    title (`str`):
        Display title of the Space.
    emoji (`str` or `None`):
        Emoji icon of the Space.
    sdk (`str` or `None`):
        SDK used by the Space (e.g. `"gradio"`, `"docker"`, `"static"`).
    likes (`int`):
        Number of likes.
    private (`bool`):
        Whether the Space is private.
    tags (`list[str]` or `None`):
        List of tags.
    runtime ([`SpaceRuntime`] or `None`):
        Runtime information (stage, hardware, etc.).
    ai_short_description (`str` or `None`):
        AI-generated short description.
    ai_category (`str` or `None`):
        AI-generated category (e.g. `"Image Generation"`).
    semantic_relevancy_score (`float` or `None`):
        Semantic relevancy score (0-1) relative to the search query.
    trending_score (`int` or `None`):
        Trending score.
c                $   < V ^8  d   QhRS[ RR/# rw   r]   )rH   rI   s   "r    rJ   SpaceSearchResult.__annotate__K  s     8 8T 8d 8r   c                d   VP                  R 4      pVR,          V n        VP                  RR4      V n        VP                  RR4      V n        VP                  R4      V n        VP                  R4      V n        VP                  R^ 4      V n        VP                  RR	4      V n        VP                  R
4      V n        V'       d   \        V4      MRV n
        VP                  R4      V n        VP                  R4      V n        VP                  R4      V n        VP                  R4      V n        R# )runtimerh   authorrg   titleemojisdklikesprivateFtagsNai_short_descriptionai_categorysemanticRelevancyScoretrendingScore)rV   rh   r   r   r   r   r   r   r   r   r   r   r   semantic_relevancy_scoretrending_score)rW   ra   r   s   && r    rY   SpaceSearchResult.__init__K  s    ((9%t*hhx,XXgr*
XXg&
88E?XXgq)
xx	51HHV$	07|G,T$(HH-C$D!88M2(,1I(J%"hh7r   c                6  < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[ R,          ;R&   S[ R,          ;R&   S[;R&   S[;R&   S[S[ ,          R,          ;R	&   S[R,          ;R
&   S[ R,          ;R&   S[ R,          ;R&   S[R,          ;R&   S[R,          ;R&   # )rF   rh   r   r   Nr   r   r   r   r   r   r   r   r   r   )re   r   rp   r   r   float)rH   rI   s   "r    rJ   r     s     F 	GG H KI J JK L :M N 
tOO P JQ R MS T s)d
U V D  W X *$Y Z t[ \ $dl*] ^ $J_ r   )r   r   r   r   rh   r   r   r   r   r   r   r   r   Nr   rs   s   @r    r   r     s     ^8 8c  r   r   N)dataclassesr   r   enumr   typingr   huggingface_hub.utilsr   r   r	   re   r   r"   r<   rD   ru   r   r   r   r   r   r   r    <module>r      s    "    @ @2d 26!C !H3 " 9 9 9x    . . .b Y Y Y6 Y Y Y8 >8 >8 >8r   