+
    QV-j*  ã                   ó2  € R t ^ RIt^ RIHtHt ^ RIt^ RIHtHt ^RI	H
t
HtHtHt ^RIHtHt ]! ]4      t]P$                  ! R] U u/ uF  q V bK  	  up ]R7      t]! ]4      t]P$                  ! R] Uu/ uF  qVbK  	  up]R7      t]! R	R
7      t]P1                  R. R)OR7      R*R R ll4       t]P1                  RR.R7      R+R R ll4       t]P1                  R. R,OR7      R-R R ll4       t]P1                  R. R.OR7      R/R R ll4       t]P1                  RRR.R7      R0R R ll4       t]P1                  R. R1OR7      R2R R  ll4       t]P1                  R!R"R#.R7      R3R$ R% ll4       t]P1                  R&4      R0R' R( ll4       t R# u up i u upi )4a_  Contains commands to interact with collections on the Hugging Face Hub.

Usage:
    # list collections on the Hub
    hf collections ls

    # list collections for a specific user
    hf collections ls --owner username

    # get info about a collection
    hf collections info username/collection-slug

    # create a new collection
    hf collections create "My Collection" --description "A collection of models"

    # add an item to a collection
    hf collections add-item username/collection-slug username/model-name model

    # delete a collection
    hf collections delete username/collection-slug
N)Ú	AnnotatedÚget_args)ÚCollectionItemType_TÚCollectionSort_T)ÚLimitOptÚTokenOptÚ
get_hf_apiÚtyper_factory)Ú_dataclass_to_dictÚoutÚCollectionItemType)ÚtypeÚCollectionSortz%Interact with collections on the Hub.©Úhelpz	list | ls)Úexamplesc                óN  € V ^8„  d   QhR\         \        R,          \        P                  ! RR7      3,          R\         \        R,          \        P                  ! RR7      3,          R\         \        R,          \        P                  ! RR7      3,          R	\
        R
\        RR/# )é   ÚownerNz)Filter by owner username or organization.r   ÚitemzkFilter collections containing a specific item (e.g., "models/gpt2", "datasets/squad", "papers/2311.12983").Úsortz4Sort results by last modified, trending, or upvotes.ÚlimitÚtokenÚreturn)r   ÚstrÚtyperÚOptionr   r   r   )Úformats   "Úp/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/huggingface_hub/cli/collections.pyÚ__annotate__r   B   s¥   € ÷ ñ ÜÜˆd�
Ü�ŠÐEÔFð	Hõðô
 Üˆd�
Ü�ŠØ~ô	
ð	õðô Ü˜ÕÜ�ŠÐPÔQð	Sõðô ðô  ð!ð" 
ñ#ó    c                óÚ   € \        VR7      pV'       d   VP                  MRpVP                  V VVVR7       Uu. uF  p\        V4      NK  	  pp\        P
                  ! V4       R# u upi )zList collections on the Hub.©r   N)r   r   r   r   )r   ÚvalueÚlist_collectionsr
   r   Útable)	r   r   r   r   r   ÚapiÚsort_keyÚ
collectionÚresultss	   &&&&&    r   Úcollections_lsr*   :   su   € ô6 ˜5Ô
!€Cß!ˆt�zŠz t€Hð ×.Ñ.ØØØØð	 /ô 
óñ
ˆJô 	˜:Ö&ñ
ð ð ô ‡I‚IˆgÖùòs   ºA(Úinfoz/hf collections info username/my-collection-slugc                óx   € V ^8„  d   QhR\         \        \        P                  ! RR7      3,          R\        RR/# )r   Úcollection_slugú7The collection slug (e.g., 'username/collection-slug').r   r   r   N)r   r   r   ÚArgumentr   )r   s   "r   r   r   i   s:   € ÷ ñ Üœs¤E§N¢NÐ8qÔ$rÐrÕsðäðð 
ñr    c                ól   € \        VR7      pVP                  V 4      p\        P                  ! V4       R# )z'Get info about a collection on the Hub.r"   N)r   Úget_collectionr   Údict)r-   r   r&   r(   s   &&  r   Úcollections_infor3   c   s*   € ô ˜5Ô
!€CØ×#Ñ# OÓ4€JÜ‡H‚HˆZÖr    Úcreatec                óÔ  € V ^8„  d   QhR\         \        \        P                  ! RR7      3,          R\         \        R,          \        P                  ! RR7      3,          R\         \        R,          \        P                  ! RR7      3,          R	\         \
        \        P                  ! R
R7      3,          R\         \
        \        P                  ! RR7      3,          R\        RR/# )r   ÚtitlezThe title of the collection.r   Ú	namespaceNzMThe namespace (username or organization). Defaults to the authenticated user.Údescriptionz!A description for the collection.ÚprivatezCreate a private collection.Ú	exists_okz7Do not raise an error if the collection already exists.r   r   )r   r   r   r/   r   Úboolr   )r   s   "r   r   r   {   sÞ   € ÷ Oñ OÜ”Sœ%Ÿ.š.Ð.LÔMÐMÕNðOäÜˆd�
Ü�ŠÐiÔjð	lõðOô Üˆd�
Ü�ŠÐ=Ô>ð	@õðOô ÜÜ�ŠÐ8Ô9ð	;õðOô ÜÜ�ŠÐSÔTð	VõðOô$ ð%Oð& 
ñ'Or    c                ó¤   € \        VR7      pVP                  V VVVVR7      p\        P                  ! RVP                  VP
                  R7       R# )z#Create a new collection on the Hub.r"   )r6   r7   r8   r9   r:   zCollection created©ÚslugÚurlN)r   Úcreate_collectionr   Úresultr>   r?   )r6   r7   r8   r9   r:   r   r&   r(   s   &&&&&&  r   Úcollections_createrB   s   sM   € ô: ˜5Ô
!€CØ×&Ñ&ØØØØØð 'ó €Jô ‡J‚JÐ#¨*¯/©/¸z¿~¹~×Nr    Úupdatec                óN  € V ^8„  d   QhR\         \        \        P                  ! RR7      3,          R\         \        R,          \        P                  ! RR7      3,          R\         \        R,          \        P                  ! RR7      3,          R	\         \
        R,          \        P                  ! R
R7      3,          R\         \        R,          \        P                  ! RR7      3,          R\         \        R,          \        P                  ! RR7      3,          R\        RR/# )r   r-   r.   r   r6   Nz!The new title for the collection.r8   z'The new description for the collection.Úpositionz7The new position of the collection in the owner's list.r9   z)Whether the collection should be private.Úthemez;The theme color for the collection (e.g., 'green', 'blue').r   r   )r   r   r   r/   r   Úintr;   r   )r   s   "r   r   r   £   s  € ÷ "Oñ "OÜœs¤E§N¢NÐ8qÔ$rÐrÕsð"OäÜˆd�
Ü�ŠÐ=Ô>ð	@õð"Oô Üˆd�
Ü�ŠÐCÔDð	Fõð"Oô Üˆd�
Ü�ŠÐSÔTð	Võð"Oô Üˆt�Ü�ŠÐEÔFð	Hõð"Oô$ Üˆd�
Ü�ŠÐWÔXð	Zõð%"Oô, ð-"Oð. 
ñ/"Or    c           	     ó¦   € \        VR7      pVP                  V VVVVVR7      p\        P                  ! RVP                  VP
                  R7       R# )z*Update a collection's metadata on the Hub.r"   )r-   r6   r8   rE   r9   rF   zCollection updatedr=   N)r   Úupdate_collection_metadatar   rA   r>   r?   )	r-   r6   r8   rE   r9   rF   r   r&   r(   s	   &&&&&&&  r   Úcollections_updaterJ   ›   sQ   € ôB ˜5Ô
!€CØ×/Ñ/Ø'ØØØØØð 0ó €Jô ‡J‚JÐ#¨*¯/©/¸z¿~¹~×Nr    Údeletez,hf collections delete username/my-collectionz9hf collections delete username/my-collection --missing-okc          	      óÈ   € V ^8„  d   QhR\         \        \        P                  ! RR7      3,          R\         \        \        P
                  ! RR7      3,          R\        RR/# )	r   r-   r.   r   Ú
missing_okz6Do not raise an error if the collection doesn't exist.r   r   N©r   r   r   r/   r;   r   r   )r   s   "r   r   r   Ï   s_   € ÷ ;ñ ;Üœs¤E§N¢NÐ8qÔ$rÐrÕsð;äÜÜ�ŠÐRÔSð	Uõð;ô ð;ð 
ñ;r    c                ór   € \        VR7      pVP                  WR7       \        P                  ! RV R7       R# )z!Delete a collection from the Hub.r"   )rM   zCollection deleted©r>   N)r   Údelete_collectionr   rA   )r-   rM   r   r&   s   &&& r   Úcollections_deleterR   È   s.   € ô  ˜5Ô
!€CØ×Ñ˜/ÐÔAÜ‡J‚JÐ#¨/×:r    zadd-itemc                óÆ  € V ^8„  d   QhR\         \        \        P                  ! RR7      3,          R\         \        \        P                  ! RR7      3,          R\         \        \        P                  ! RR7      3,          R\         \        R	,          \        P
                  ! R
R7      3,          R\         \        \        P
                  ! RR7      3,          R\        RR	/# )r   r-   r.   r   Úitem_idzCThe ID of the item to add (repo_id for repos, paper ID for papers).Ú	item_typezGThe type of item (model, dataset, space, paper, collection, or bucket).ÚnoteNz2A note to attach to the item (max 500 characters).r:   z?Do not raise an error if the item is already in the collection.r   r   )r   r   r   r/   r   r   r;   r   )r   s   "r   r   r   å   s×   € ÷ Uñ UÜœs¤E§N¢NÐ8qÔ$rÐrÕsðUäÜŒU�^Š^Ð!fÔgÐgõðUô
 ÜÜ�ŠÐeÔfð	hõðUô Üˆd�
Ü�ŠÐNÔOð	QõðUô ÜÜ�ŠÐ[Ô\ð	^õðUô" ð#Uð$ 
ñ%Ur    c                ó¢   € \        VR7      pVP                  V VVP                  VVR7      p\        P                  ! RWP
                  R7       R# )zAdd an item to a collection.r"   )r-   rT   rU   rV   r:   zItem added to collectionr=   N)r   Úadd_collection_itemr#   r   rA   r?   )r-   rT   rU   rV   r:   r   r&   r(   s   &&&&&&  r   Úcollections_add_itemrY   Ý   sK   € ô8 ˜5Ô
!€CØ×(Ñ(Ø'ØØ—/‘/ØØð )ó €Jô ‡J‚JÐ)°Ç^Á^×Tr    zupdate-itemzVhf collections update-item username/my-collection ITEM_OBJECT_ID --note "Updated note"zMhf collections update-item username/my-collection ITEM_OBJECT_ID --position 0c                ó„  € V ^8„  d   QhR\         \        \        P                  ! RR7      3,          R\         \        \        P                  ! RR7      3,          R\         \        R,          \        P                  ! RR7      3,          R	\         \
        R,          \        P                  ! R
R7      3,          R\        RR/# )r   r-   r.   r   Úitem_object_idzTThe ID of the item in the collection (from 'item_object_id' field, not the repo_id).rV   Nz-A new note for the item (max 500 characters).rE   z/The new position of the item in the collection.r   r   )r   r   r   r/   r   rG   r   )r   s   "r   r   r     s¹   € ÷ Cñ CÜœs¤E§N¢NÐ8qÔ$rÐrÕsðCäÜÜ�ŠÐrÔsð	uõðCô Üˆd�
Ü�ŠÐIÔJð	LõðCô Üˆd�
Ü�ŠÐKÔLð	NõðCô ðCð 
ñCr    c                óx   € \        VR7      pVP                  V VVVR7       \        P                  ! RV R7       R# )zUpdate an item in a collection.r"   )r-   r[   rV   rE   zItem updated in collectionrP   N)r   Úupdate_collection_itemr   rA   )r-   r[   rV   rE   r   r&   s   &&&&& r   Úcollections_update_itemr^     s>   € ô0 ˜5Ô
!€CØ×ÑØ'Ø%ØØð	 ô ô ‡J‚JÐ+°/×Br    zdelete-itemc                ó  € V ^8„  d   QhR\         \        \        P                  ! RR7      3,          R\         \        \        P                  ! RR7      3,          R\         \        \        P
                  ! RR7      3,          R\        R	R
/# )r   r-   r.   r   r[   znThe ID of the item in the collection (retrieved from `item_object_id` field returned by 'hf collections info'.rM   z0Do not raise an error if the item doesn't exist.r   r   NrN   )r   s   "r   r   r   '  s�   € ÷ Eñ EÜœs¤E§N¢NÐ8qÔ$rÐrÕsðEäÜÜ�Šð Bô	
ð	õðEô ÜÜ�ŠÐLÔMð	OõðEô ðEð 
ñEr    c                óv   € \        VR7      pVP                  V VVR7       \        P                  ! RV R7       R# )z!Delete an item from a collection.r"   )r-   r[   rM   zItem deleted from collectionrP   N)r   Údelete_collection_itemr   rA   )r-   r[   rM   r   r&   s   &&&& r   Úcollections_delete_itemrb   &  s;   € ô  ˜5Ô
!€CØ×ÑØ'Ø%Øð ô ô
 ‡J‚JÐ-°O×Dr    )zhf collections lsz hf collections ls --owner nvidiazLhf collections ls --item models/teknium/OpenHermes-2.5-Mistral-7B --limit 10)NNNé
   N)N)z!hf collections create "My Models"z^hf collections create "My Models" --description "A collection of my favorite models" --privatez9hf collections create "Org Collection" --namespace my-org)NNFFN)z@hf collections update username/my-collection --title "New Title"zPhf collections update username/my-collection --description "Updated description"zDhf collections update username/my-collection --private --theme green)NNNNNN)FN)zGhf collections add-item username/my-collection moonshotai/kimi-k2 modelz`hf collections add-item username/my-collection Qwen/DeepPlanning dataset --note "Useful dataset"zGhf collections add-item username/my-collection Tongyi-MAI/Z-Image space)NFN)NNN)!Ú__doc__ÚenumÚtypingr   r   r   Úhuggingface_hub.hf_apir   r   Ú
_cli_utilsr   r   r   r	   Ú_outputr
   r   Ú_COLLECTION_ITEM_TYPESÚEnumr   r   Ú_COLLECTION_SORT_OPTIONSr   Úcollections_cliÚcommandr*   r3   rB   rJ   rR   rY   r^   rb   )ÚtÚss   00r   Ú<module>rq      s  ðñó, ß &ã ç Iç EÓ Eß ,ñ "Ð"6Ó7Ð Ø—Y’YÐ3ÑDZÓ5[ÑDZ¸q¸²dÑDZÑ5[ÐbeÔfÐ á#Ð$4Ó5Ð Ø—’Ð+Ñ<TÓ-UÑ<T°q°ªdÑ<TÑ-UÐ\_Ô`€ñ  Ð%LÔM€ð ×ÑØòð ó öóððB ×ÑØ
à9ðð ó öóðð ×ÑØòð ó öOóðOð@ ×ÑØòð ó ö"Oóð"OðJ ×ÑØà6ØCðð ó ö;óð;ð ×ÑØòð ó öUóðUð> ×ÑØà`ØWðð ó öCóðCð6 ×Ñ˜Ó'öEó (òEùòm 6\ùò .Vs   ÁF
Á5F
