huggingface-hub 1.0.0rc3__tar.gz → 1.0.0rc5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of huggingface-hub might be problematic. Click here for more details.

Files changed (158) hide show
  1. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/PKG-INFO +1 -1
  2. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/__init__.py +1 -1
  3. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/_login.py +1 -1
  4. huggingface_hub-1.0.0rc5/src/huggingface_hub/cli/_cli_utils.py +173 -0
  5. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/cli/auth.py +2 -2
  6. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/cli/cache.py +2 -2
  7. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/cli/download.py +2 -2
  8. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/cli/hf.py +2 -1
  9. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/cli/repo.py +1 -2
  10. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/cli/system.py +1 -1
  11. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/cli/upload_large_folder.py +2 -2
  12. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/constants.py +4 -0
  13. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/dataclasses.py +2 -2
  14. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/__init__.py +2 -0
  15. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_cache_manager.py +1 -1
  16. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_http.py +10 -3
  17. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_runtime.py +48 -1
  18. huggingface_hub-1.0.0rc5/src/huggingface_hub/utils/_terminal.py +69 -0
  19. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub.egg-info/PKG-INFO +1 -1
  20. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub.egg-info/SOURCES.txt +1 -0
  21. huggingface_hub-1.0.0rc3/src/huggingface_hub/cli/_cli_utils.py +0 -152
  22. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/LICENSE +0 -0
  23. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/MANIFEST.in +0 -0
  24. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/README.md +0 -0
  25. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/pyproject.toml +0 -0
  26. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/setup.cfg +0 -0
  27. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/setup.py +0 -0
  28. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/_commit_api.py +0 -0
  29. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/_commit_scheduler.py +0 -0
  30. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/_inference_endpoints.py +0 -0
  31. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/_jobs_api.py +0 -0
  32. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/_local_folder.py +0 -0
  33. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/_oauth.py +0 -0
  34. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/_snapshot_download.py +0 -0
  35. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/_space_api.py +0 -0
  36. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/_tensorboard_logger.py +0 -0
  37. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/_upload_large_folder.py +0 -0
  38. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/_webhooks_payload.py +0 -0
  39. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/_webhooks_server.py +0 -0
  40. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/cli/__init__.py +0 -0
  41. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/cli/jobs.py +0 -0
  42. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/cli/lfs.py +0 -0
  43. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/cli/repo_files.py +0 -0
  44. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/cli/upload.py +0 -0
  45. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/community.py +0 -0
  46. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/errors.py +0 -0
  47. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/fastai_utils.py +0 -0
  48. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/file_download.py +0 -0
  49. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/hf_api.py +0 -0
  50. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/hf_file_system.py +0 -0
  51. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/hub_mixin.py +0 -0
  52. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/__init__.py +0 -0
  53. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_client.py +0 -0
  54. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_common.py +0 -0
  55. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/__init__.py +0 -0
  56. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/_async_client.py +0 -0
  57. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/__init__.py +0 -0
  58. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/audio_classification.py +0 -0
  59. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/audio_to_audio.py +0 -0
  60. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/automatic_speech_recognition.py +0 -0
  61. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/base.py +0 -0
  62. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/chat_completion.py +0 -0
  63. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/depth_estimation.py +0 -0
  64. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/document_question_answering.py +0 -0
  65. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/feature_extraction.py +0 -0
  66. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/fill_mask.py +0 -0
  67. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/image_classification.py +0 -0
  68. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/image_segmentation.py +0 -0
  69. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/image_to_image.py +0 -0
  70. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/image_to_text.py +0 -0
  71. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/image_to_video.py +0 -0
  72. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/object_detection.py +0 -0
  73. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/question_answering.py +0 -0
  74. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/sentence_similarity.py +0 -0
  75. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/summarization.py +0 -0
  76. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/table_question_answering.py +0 -0
  77. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/text2text_generation.py +0 -0
  78. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/text_classification.py +0 -0
  79. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/text_generation.py +0 -0
  80. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/text_to_audio.py +0 -0
  81. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/text_to_image.py +0 -0
  82. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/text_to_speech.py +0 -0
  83. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/text_to_video.py +0 -0
  84. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/token_classification.py +0 -0
  85. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/translation.py +0 -0
  86. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/video_classification.py +0 -0
  87. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/visual_question_answering.py +0 -0
  88. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/zero_shot_classification.py +0 -0
  89. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/zero_shot_image_classification.py +0 -0
  90. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_generated/types/zero_shot_object_detection.py +0 -0
  91. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_mcp/__init__.py +0 -0
  92. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_mcp/_cli_hacks.py +0 -0
  93. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_mcp/agent.py +0 -0
  94. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_mcp/cli.py +0 -0
  95. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_mcp/constants.py +0 -0
  96. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_mcp/mcp_client.py +0 -0
  97. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_mcp/types.py +0 -0
  98. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_mcp/utils.py +0 -0
  99. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/__init__.py +0 -0
  100. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/_common.py +0 -0
  101. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/black_forest_labs.py +0 -0
  102. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/cerebras.py +0 -0
  103. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/cohere.py +0 -0
  104. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/fal_ai.py +0 -0
  105. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/featherless_ai.py +0 -0
  106. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/fireworks_ai.py +0 -0
  107. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/groq.py +0 -0
  108. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/hf_inference.py +0 -0
  109. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/hyperbolic.py +0 -0
  110. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/nebius.py +0 -0
  111. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/novita.py +0 -0
  112. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/nscale.py +0 -0
  113. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/openai.py +0 -0
  114. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/publicai.py +0 -0
  115. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/replicate.py +0 -0
  116. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/sambanova.py +0 -0
  117. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/scaleway.py +0 -0
  118. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/together.py +0 -0
  119. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/inference/_providers/zai_org.py +0 -0
  120. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/lfs.py +0 -0
  121. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/py.typed +0 -0
  122. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/repocard.py +0 -0
  123. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/repocard_data.py +0 -0
  124. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/serialization/__init__.py +0 -0
  125. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/serialization/_base.py +0 -0
  126. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/serialization/_dduf.py +0 -0
  127. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/serialization/_torch.py +0 -0
  128. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/templates/datasetcard_template.md +0 -0
  129. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/templates/modelcard_template.md +0 -0
  130. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_auth.py +0 -0
  131. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_cache_assets.py +0 -0
  132. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_chunk_utils.py +0 -0
  133. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_datetime.py +0 -0
  134. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_deprecation.py +0 -0
  135. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_dotenv.py +0 -0
  136. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_experimental.py +0 -0
  137. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_fixes.py +0 -0
  138. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_git_credential.py +0 -0
  139. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_headers.py +0 -0
  140. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_lfs.py +0 -0
  141. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_pagination.py +0 -0
  142. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_paths.py +0 -0
  143. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_safetensors.py +0 -0
  144. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_subprocess.py +0 -0
  145. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_telemetry.py +0 -0
  146. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_typing.py +0 -0
  147. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_validators.py +0 -0
  148. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_xet.py +0 -0
  149. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/_xet_progress_reporting.py +0 -0
  150. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/endpoint_helpers.py +0 -0
  151. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/insecure_hashlib.py +0 -0
  152. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/logging.py +0 -0
  153. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/sha.py +0 -0
  154. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub/utils/tqdm.py +0 -0
  155. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub.egg-info/dependency_links.txt +0 -0
  156. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub.egg-info/entry_points.txt +0 -0
  157. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub.egg-info/requires.txt +0 -0
  158. {huggingface_hub-1.0.0rc3 → huggingface_hub-1.0.0rc5}/src/huggingface_hub.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: huggingface_hub
3
- Version: 1.0.0rc3
3
+ Version: 1.0.0rc5
4
4
  Summary: Client library to download and publish models, datasets and other repos on the huggingface.co hub
5
5
  Home-page: https://github.com/huggingface/huggingface_hub
6
6
  Author: Hugging Face, Inc.
@@ -46,7 +46,7 @@ import sys
46
46
  from typing import TYPE_CHECKING
47
47
 
48
48
 
49
- __version__ = "1.0.0.rc3"
49
+ __version__ = "1.0.0.rc5"
50
50
 
51
51
  # Alphabetical order of definitions is ensured in tests
52
52
  # WARNING: any comment added in this dictionary definition will be lost when
@@ -20,8 +20,8 @@ from pathlib import Path
20
20
  from typing import Optional
21
21
 
22
22
  from . import constants
23
- from .cli._cli_utils import ANSI
24
23
  from .utils import (
24
+ ANSI,
25
25
  capture_output,
26
26
  get_token,
27
27
  is_google_colab,
@@ -0,0 +1,173 @@
1
+ # Copyright 2022 The HuggingFace Team. All rights reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ """Contains CLI utilities (styling, helpers)."""
15
+
16
+ import importlib.metadata
17
+ import os
18
+ import time
19
+ from enum import Enum
20
+ from pathlib import Path
21
+ from typing import TYPE_CHECKING, Annotated, Optional
22
+
23
+ import click
24
+ import typer
25
+
26
+ from huggingface_hub import __version__, constants
27
+ from huggingface_hub.utils import ANSI, get_session, hf_raise_for_status, installation_method, logging
28
+
29
+
30
+ logger = logging.get_logger()
31
+
32
+
33
+ if TYPE_CHECKING:
34
+ from huggingface_hub.hf_api import HfApi
35
+
36
+
37
+ def get_hf_api(token: Optional[str] = None) -> "HfApi":
38
+ # Import here to avoid circular import
39
+ from huggingface_hub.hf_api import HfApi
40
+
41
+ return HfApi(token=token, library_name="hf", library_version=__version__)
42
+
43
+
44
+ #### TYPER UTILS
45
+
46
+
47
+ class AlphabeticalMixedGroup(typer.core.TyperGroup):
48
+ """
49
+ Typer Group that lists commands and sub-apps mixed and alphabetically.
50
+ """
51
+
52
+ def list_commands(self, ctx: click.Context) -> list[str]: # type: ignore[name-defined]
53
+ # click.Group stores both commands and sub-groups in `self.commands`
54
+ return sorted(self.commands.keys())
55
+
56
+
57
+ def typer_factory(help: str) -> typer.Typer:
58
+ return typer.Typer(
59
+ help=help,
60
+ add_completion=True,
61
+ no_args_is_help=True,
62
+ cls=AlphabeticalMixedGroup,
63
+ # Disable rich completely for consistent experience
64
+ rich_markup_mode=None,
65
+ rich_help_panel=None,
66
+ pretty_exceptions_enable=False,
67
+ )
68
+
69
+
70
+ class RepoType(str, Enum):
71
+ model = "model"
72
+ dataset = "dataset"
73
+ space = "space"
74
+
75
+
76
+ RepoIdArg = Annotated[
77
+ str,
78
+ typer.Argument(
79
+ help="The ID of the repo (e.g. `username/repo-name`).",
80
+ ),
81
+ ]
82
+
83
+
84
+ RepoTypeOpt = Annotated[
85
+ RepoType,
86
+ typer.Option(
87
+ help="The type of repository (model, dataset, or space).",
88
+ ),
89
+ ]
90
+
91
+ TokenOpt = Annotated[
92
+ Optional[str],
93
+ typer.Option(
94
+ help="A User Access Token generated from https://huggingface.co/settings/tokens.",
95
+ ),
96
+ ]
97
+
98
+ PrivateOpt = Annotated[
99
+ bool,
100
+ typer.Option(
101
+ help="Whether to create a private repo if repo doesn't exist on the Hub. Ignored if the repo already exists.",
102
+ ),
103
+ ]
104
+
105
+ RevisionOpt = Annotated[
106
+ Optional[str],
107
+ typer.Option(
108
+ help="Git revision id which can be a branch name, a tag, or a commit hash.",
109
+ ),
110
+ ]
111
+
112
+
113
+ ### PyPI VERSION CHECKER
114
+
115
+
116
+ def check_cli_update() -> None:
117
+ """
118
+ Check whether a newer version of `huggingface_hub` is available on PyPI.
119
+
120
+ If a newer version is found, notify the user and suggest updating.
121
+ If current version is a pre-release (e.g. `1.0.0.rc1`), or a dev version (e.g. `1.0.0.dev1`), no check is performed.
122
+
123
+ This function is called at the entry point of the CLI. It only performs the check once every 24 hours, and any error
124
+ during the check is caught and logged, to avoid breaking the CLI.
125
+ """
126
+ try:
127
+ _check_cli_update()
128
+ except Exception:
129
+ # We don't want the CLI to fail on version checks, no matter the reason.
130
+ logger.debug("Error while checking for CLI update.", exc_info=True)
131
+
132
+
133
+ def _check_cli_update() -> None:
134
+ current_version = importlib.metadata.version("huggingface_hub")
135
+
136
+ # Skip if current version is a pre-release or dev version
137
+ if any(tag in current_version for tag in ["rc", "dev"]):
138
+ return
139
+
140
+ # Skip if already checked in the last 24 hours
141
+ if os.path.exists(constants.CHECK_FOR_UPDATE_DONE_PATH):
142
+ mtime = os.path.getmtime(constants.CHECK_FOR_UPDATE_DONE_PATH)
143
+ if (time.time() - mtime) < 24 * 3600:
144
+ return
145
+
146
+ # Touch the file to mark that we did the check now
147
+ Path(constants.CHECK_FOR_UPDATE_DONE_PATH).touch()
148
+
149
+ # Check latest version from PyPI
150
+ response = get_session().get("https://pypi.org/pypi/huggingface_hub/json", timeout=2)
151
+ hf_raise_for_status(response)
152
+ data = response.json()
153
+ latest_version = data["info"]["version"]
154
+
155
+ # If latest version is different from current, notify user
156
+ if current_version != latest_version:
157
+ method = installation_method()
158
+ if method == "brew":
159
+ update_command = "brew upgrade huggingface-cli"
160
+ elif method == "hf_installer" and os.name == "nt":
161
+ update_command = 'powershell -NoProfile -Command "iwr -useb https://hf.co/cli/install.ps1 | iex"'
162
+ elif method == "hf_installer":
163
+ update_command = "curl -LsSf https://hf.co/cli/install.sh | sh -"
164
+ else: # unknown => likely pip
165
+ update_command = "pip install -U huggingface_hub"
166
+
167
+ click.echo(
168
+ ANSI.yellow(
169
+ f"A new version of huggingface_hub ({latest_version}) is available! "
170
+ f"You are using version {current_version}.\n"
171
+ f"To update, run: {ANSI.bold(update_command)}\n",
172
+ )
173
+ )
@@ -39,8 +39,8 @@ from huggingface_hub.errors import HfHubHTTPError
39
39
  from huggingface_hub.hf_api import whoami
40
40
 
41
41
  from .._login import auth_list, auth_switch, login, logout
42
- from ..utils import get_stored_tokens, get_token, logging
43
- from ._cli_utils import ANSI, TokenOpt, typer_factory
42
+ from ..utils import ANSI, get_stored_tokens, get_token, logging
43
+ from ._cli_utils import TokenOpt, typer_factory
44
44
 
45
45
 
46
46
  logger = logging.get_logger(__name__)
@@ -23,8 +23,8 @@ from typing import Annotated, Any, Callable, Iterable, Optional, Union
23
23
 
24
24
  import typer
25
25
 
26
- from ..utils import CachedRepoInfo, CachedRevisionInfo, CacheNotFound, HFCacheInfo, scan_cache_dir
27
- from ._cli_utils import ANSI, tabulate, typer_factory
26
+ from ..utils import ANSI, CachedRepoInfo, CachedRevisionInfo, CacheNotFound, HFCacheInfo, scan_cache_dir, tabulate
27
+ from ._cli_utils import typer_factory
28
28
 
29
29
 
30
30
  # --- DELETE helpers (from delete_cache.py) ---
@@ -44,9 +44,9 @@ import typer
44
44
  from huggingface_hub import logging
45
45
  from huggingface_hub._snapshot_download import snapshot_download
46
46
  from huggingface_hub.file_download import DryRunFileInfo, hf_hub_download
47
- from huggingface_hub.utils import _format_size, disable_progress_bars, enable_progress_bars
47
+ from huggingface_hub.utils import _format_size, disable_progress_bars, enable_progress_bars, tabulate
48
48
 
49
- from ._cli_utils import RepoIdArg, RepoTypeOpt, RevisionOpt, TokenOpt, tabulate
49
+ from ._cli_utils import RepoIdArg, RepoTypeOpt, RevisionOpt, TokenOpt
50
50
 
51
51
 
52
52
  logger = logging.get_logger(__name__)
@@ -13,7 +13,7 @@
13
13
  # limitations under the License.
14
14
 
15
15
 
16
- from huggingface_hub.cli._cli_utils import typer_factory
16
+ from huggingface_hub.cli._cli_utils import check_cli_update, typer_factory
17
17
  from huggingface_hub.cli.auth import auth_cli
18
18
  from huggingface_hub.cli.cache import cache_cli
19
19
  from huggingface_hub.cli.download import download
@@ -52,6 +52,7 @@ app.add_typer(jobs_cli, name="jobs")
52
52
 
53
53
  def main():
54
54
  logging.set_verbosity_info()
55
+ check_cli_update()
55
56
  app()
56
57
 
57
58
 
@@ -27,10 +27,9 @@ from typing import Annotated, Optional
27
27
  import typer
28
28
 
29
29
  from huggingface_hub.errors import HfHubHTTPError, RepositoryNotFoundError, RevisionNotFoundError
30
- from huggingface_hub.utils import logging
30
+ from huggingface_hub.utils import ANSI, logging
31
31
 
32
32
  from ._cli_utils import (
33
- ANSI,
34
33
  PrivateOpt,
35
34
  RepoIdArg,
36
35
  RepoType,
@@ -30,4 +30,4 @@ def env() -> None:
30
30
 
31
31
  def version() -> None:
32
32
  """Print CLI version."""
33
- print(f"huggingface_hub version: {__version__}")
33
+ print(__version__)
@@ -20,9 +20,9 @@ from typing import Annotated, Optional
20
20
  import typer
21
21
 
22
22
  from huggingface_hub import logging
23
- from huggingface_hub.utils import disable_progress_bars
23
+ from huggingface_hub.utils import ANSI, disable_progress_bars
24
24
 
25
- from ._cli_utils import ANSI, PrivateOpt, RepoIdArg, RepoType, RepoTypeOpt, RevisionOpt, TokenOpt, get_hf_api
25
+ from ._cli_utils import PrivateOpt, RepoIdArg, RepoType, RepoTypeOpt, RevisionOpt, TokenOpt, get_hf_api
26
26
 
27
27
 
28
28
  logger = logging.get_logger(__name__)
@@ -163,6 +163,10 @@ HF_ASSETS_CACHE = os.path.expandvars(
163
163
 
164
164
  HF_HUB_OFFLINE = _is_true(os.environ.get("HF_HUB_OFFLINE") or os.environ.get("TRANSFORMERS_OFFLINE"))
165
165
 
166
+ # File created to mark that the version check has been done.
167
+ # Check is performed once per 24 hours at most.
168
+ CHECK_FOR_UPDATE_DONE_PATH = os.path.join(HF_HOME, ".check_for_update_done")
169
+
166
170
  # If set, log level will be set to DEBUG and all requests made to the Hub will be logged
167
171
  # as curl commands for reproducibility.
168
172
  HF_DEBUG = _is_true(os.environ.get("HF_DEBUG"))
@@ -431,11 +431,11 @@ def type_validator(name: str, value: Any, expected_type: Any) -> None:
431
431
  elif origin is Required:
432
432
  if value is _TYPED_DICT_DEFAULT_VALUE:
433
433
  raise TypeError(f"Field '{name}' is required but missing.")
434
- _validate_simple_type(name, value, args[0])
434
+ type_validator(name, value, args[0])
435
435
  elif origin is NotRequired:
436
436
  if value is _TYPED_DICT_DEFAULT_VALUE:
437
437
  return
438
- _validate_simple_type(name, value, args[0])
438
+ type_validator(name, value, args[0])
439
439
  else:
440
440
  raise TypeError(f"Unsupported type for field '{name}': {expected_type}")
441
441
 
@@ -85,6 +85,7 @@ from ._runtime import (
85
85
  get_tensorboard_version,
86
86
  get_tf_version,
87
87
  get_torch_version,
88
+ installation_method,
88
89
  is_aiohttp_available,
89
90
  is_colab_enterprise,
90
91
  is_fastai_available,
@@ -109,6 +110,7 @@ from ._runtime import (
109
110
  from ._safetensors import SafetensorsFileMetadata, SafetensorsRepoMetadata, TensorInfo
110
111
  from ._subprocess import capture_output, run_interactive_subprocess, run_subprocess
111
112
  from ._telemetry import send_telemetry
113
+ from ._terminal import ANSI, tabulate
112
114
  from ._typing import is_jsonable, is_simple_optional_type, unwrap_simple_optional_type
113
115
  from ._validators import validate_hf_hub_args, validate_repo_id
114
116
  from ._xet import (
@@ -24,9 +24,9 @@ from typing import Literal, Optional, Union
24
24
 
25
25
  from huggingface_hub.errors import CacheNotFound, CorruptedCacheException
26
26
 
27
- from ..cli._cli_utils import tabulate
28
27
  from ..constants import HF_HUB_CACHE
29
28
  from . import logging
29
+ from ._terminal import tabulate
30
30
 
31
31
 
32
32
  logger = logging.get_logger(__name__)
@@ -102,6 +102,13 @@ def hf_request_event_hook(request: httpx.Request) -> None:
102
102
  return request_id
103
103
 
104
104
 
105
+ async def async_hf_request_event_hook(request: httpx.Request) -> None:
106
+ """
107
+ Async version of `hf_request_event_hook`.
108
+ """
109
+ return hf_request_event_hook(request)
110
+
111
+
105
112
  def default_client_factory() -> httpx.Client:
106
113
  """
107
114
  Factory function to create a `httpx.Client` with the default transport.
@@ -118,7 +125,7 @@ def default_async_client_factory() -> httpx.AsyncClient:
118
125
  Factory function to create a `httpx.AsyncClient` with the default transport.
119
126
  """
120
127
  return httpx.AsyncClient(
121
- event_hooks={"request": [hf_request_event_hook]},
128
+ event_hooks={"request": [async_hf_request_event_hook]},
122
129
  follow_redirects=True,
123
130
  timeout=httpx.Timeout(constants.DEFAULT_REQUEST_TIMEOUT, write=60.0),
124
131
  )
@@ -716,9 +723,9 @@ def _curlify(request: httpx.Request) -> str:
716
723
  flat_parts = []
717
724
  for k, v in parts:
718
725
  if k:
719
- flat_parts.append(quote(k))
726
+ flat_parts.append(quote(str(k)))
720
727
  if v:
721
- flat_parts.append(quote(v))
728
+ flat_parts.append(quote(str(v)))
722
729
 
723
730
  return " ".join(flat_parts)
724
731
 
@@ -19,7 +19,8 @@ import os
19
19
  import platform
20
20
  import sys
21
21
  import warnings
22
- from typing import Any
22
+ from pathlib import Path
23
+ from typing import Any, Literal
23
24
 
24
25
  from .. import __version__, constants
25
26
 
@@ -322,6 +323,49 @@ def is_colab_enterprise() -> bool:
322
323
  return os.environ.get("VERTEX_PRODUCT") == "COLAB_ENTERPRISE"
323
324
 
324
325
 
326
+ # Check how huggingface_hub has been installed
327
+
328
+
329
+ def installation_method() -> Literal["brew", "hf_installer", "unknown"]:
330
+ """Return the installation method of the current environment.
331
+
332
+ - "hf_installer" if installed via the official installer script
333
+ - "brew" if installed via Homebrew
334
+ - "unknown" otherwise
335
+ """
336
+ if _is_brew_installation():
337
+ return "brew"
338
+ elif _is_hf_installer_installation():
339
+ return "hf_installer"
340
+ else:
341
+ return "unknown"
342
+
343
+
344
+ def _is_brew_installation() -> bool:
345
+ """Check if running from a Homebrew installation.
346
+
347
+ Note: AI-generated by Claude.
348
+ """
349
+ exe_path = Path(sys.executable).resolve()
350
+ exe_str = str(exe_path)
351
+
352
+ # Check common Homebrew paths
353
+ # /opt/homebrew (Apple Silicon), /usr/local (Intel)
354
+ return "/Cellar/" in exe_str or "/opt/homebrew/" in exe_str or exe_str.startswith("/usr/local/Cellar/")
355
+
356
+
357
+ def _is_hf_installer_installation() -> bool:
358
+ """Return `True` if the current environment was set up via the official hf installer script.
359
+
360
+ i.e. using one of
361
+ curl -LsSf https://hf.co/cli/install.sh | sh
362
+ powershell -ExecutionPolicy ByPass -c "irm https://hf.co/cli/install.ps1 | iex"
363
+ """
364
+ venv = sys.prefix # points to venv root if active
365
+ marker = Path(venv) / ".hf_installer_marker"
366
+ return marker.exists()
367
+
368
+
325
369
  def dump_environment_info() -> dict[str, Any]:
326
370
  """Dump information about the machine to help debugging issues.
327
371
 
@@ -366,6 +410,9 @@ def dump_environment_info() -> dict[str, Any]:
366
410
  except Exception:
367
411
  pass
368
412
 
413
+ # How huggingface_hub has been installed?
414
+ info["Installation method"] = installation_method()
415
+
369
416
  # Installed dependencies
370
417
  info["Torch"] = get_torch_version()
371
418
  info["httpx"] = get_httpx_version()
@@ -0,0 +1,69 @@
1
+ # Copyright 2025 The HuggingFace Team. All rights reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ """Contains utilities to print stuff to the terminal (styling, helpers)."""
15
+
16
+ import os
17
+ from typing import Union
18
+
19
+
20
+ class ANSI:
21
+ """
22
+ Helper for en.wikipedia.org/wiki/ANSI_escape_code
23
+ """
24
+
25
+ _bold = "\u001b[1m"
26
+ _gray = "\u001b[90m"
27
+ _red = "\u001b[31m"
28
+ _reset = "\u001b[0m"
29
+ _yellow = "\u001b[33m"
30
+
31
+ @classmethod
32
+ def bold(cls, s: str) -> str:
33
+ return cls._format(s, cls._bold)
34
+
35
+ @classmethod
36
+ def gray(cls, s: str) -> str:
37
+ return cls._format(s, cls._gray)
38
+
39
+ @classmethod
40
+ def red(cls, s: str) -> str:
41
+ return cls._format(s, cls._bold + cls._red)
42
+
43
+ @classmethod
44
+ def yellow(cls, s: str) -> str:
45
+ return cls._format(s, cls._yellow)
46
+
47
+ @classmethod
48
+ def _format(cls, s: str, code: str) -> str:
49
+ if os.environ.get("NO_COLOR"):
50
+ # See https://no-color.org/
51
+ return s
52
+ return f"{code}{s}{cls._reset}"
53
+
54
+
55
+ def tabulate(rows: list[list[Union[str, int]]], headers: list[str]) -> str:
56
+ """
57
+ Inspired by:
58
+
59
+ - stackoverflow.com/a/8356620/593036
60
+ - stackoverflow.com/questions/9535954/printing-lists-as-tabular-data
61
+ """
62
+ col_widths = [max(len(str(x)) for x in col) for col in zip(*rows, headers)]
63
+ row_format = ("{{:{}}} " * len(headers)).format(*col_widths)
64
+ lines = []
65
+ lines.append(row_format.format(*headers))
66
+ lines.append(row_format.format(*["-" * w for w in col_widths]))
67
+ for row in rows:
68
+ lines.append(row_format.format(*row))
69
+ return "\n".join(lines)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: huggingface-hub
3
- Version: 1.0.0rc3
3
+ Version: 1.0.0rc5
4
4
  Summary: Client library to download and publish models, datasets and other repos on the huggingface.co hub
5
5
  Home-page: https://github.com/huggingface/huggingface_hub
6
6
  Author: Hugging Face, Inc.
@@ -143,6 +143,7 @@ src/huggingface_hub/utils/_runtime.py
143
143
  src/huggingface_hub/utils/_safetensors.py
144
144
  src/huggingface_hub/utils/_subprocess.py
145
145
  src/huggingface_hub/utils/_telemetry.py
146
+ src/huggingface_hub/utils/_terminal.py
146
147
  src/huggingface_hub/utils/_typing.py
147
148
  src/huggingface_hub/utils/_validators.py
148
149
  src/huggingface_hub/utils/_xet.py