huggingface-hub 0.35.3


pip install huggingface-hub

  Latest version

Released: Sep 29, 2025

Project Links

Meta
Author: Hugging Face, Inc.
Requires Python: >=3.8.0

Classifiers

Intended Audience
  • Developers
  • Education
  • Science/Research

License
  • OSI Approved :: Apache Software License

Operating System
  • OS Independent

Programming Language
  • Python :: 3
  • Python :: 3 :: Only
  • Python :: 3.8
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13

Topic
  • Scientific/Engineering :: Artificial Intelligence

huggingface_hub library logo

The official Python client for the Huggingface Hub.

Documentation GitHub release PyPi version PyPI - Downloads Code coverage

English | Deutsch | हिंदी | 한국어 | 中文(简体)


Documentation: https://hf.co/docs/huggingface_hub

Source Code: https://github.com/huggingface/huggingface_hub


Welcome to the huggingface_hub library

The huggingface_hub library allows you to interact with the Hugging Face Hub, a platform democratizing open-source Machine Learning for creators and collaborators. Discover pre-trained models and datasets for your projects or play with the thousands of machine learning apps hosted on the Hub. You can also create and share your own models, datasets and demos with the community. The huggingface_hub library provides a simple way to do all these things with Python.

Key features

Installation

Install the huggingface_hub package with pip:

pip install huggingface_hub

If you prefer, you can also install it with conda.

In order to keep the package minimal by default, huggingface_hub comes with optional dependencies useful for some use cases. For example, if you want have a complete experience for Inference, run:

pip install huggingface_hub[inference]

To learn more installation and optional dependencies, check out the installation guide.

Quick start

Download files

Download a single file

from huggingface_hub import hf_hub_download

hf_hub_download(repo_id="tiiuae/falcon-7b-instruct", filename="config.json")

Or an entire repository

from huggingface_hub import snapshot_download

snapshot_download("stabilityai/stable-diffusion-2-1")

Files will be downloaded in a local cache folder. More details in this guide.

Login

The Hugging Face Hub uses tokens to authenticate applications (see docs). To log in your machine, run the following CLI:

hf auth login
# or using an environment variable
hf auth login --token $HUGGINGFACE_TOKEN

Create a repository

from huggingface_hub import create_repo

create_repo(repo_id="super-cool-model")

Upload files

Upload a single file

from huggingface_hub import upload_file

upload_file(
    path_or_fileobj="/home/lysandre/dummy-test/README.md",
    path_in_repo="README.md",
    repo_id="lysandre/test-model",
)

Or an entire folder

from huggingface_hub import upload_folder

upload_folder(
    folder_path="/path/to/local/space",
    repo_id="username/my-cool-space",
    repo_type="space",
)

For details in the upload guide.

Integrating to the Hub.

We're partnering with cool open source ML libraries to provide free model hosting and versioning. You can find the existing integrations here.

The advantages are:

  • Free model or dataset hosting for libraries and their users.
  • Built-in file versioning, even with very large files, thanks to a git-based approach.
  • In-browser widgets to play with the uploaded models.
  • Anyone can upload a new model for your library, they just need to add the corresponding tag for the model to be discoverable.
  • Fast downloads! We use Cloudfront (a CDN) to geo-replicate downloads so they're blazing fast from anywhere on the globe.
  • Usage stats and more features to come.

If you would like to integrate your library, feel free to open an issue to begin the discussion. We wrote a step-by-step guide with ❤️ showing how to do this integration.

Contributions (feature requests, bugs, etc.) are super welcome 💙💚💛💜🧡❤️

Everyone is welcome to contribute, and we value everybody's contribution. Code is not the only way to help the community. Answering questions, helping others, reaching out and improving the documentations are immensely valuable to the community. We wrote a contribution guide to summarize how to get started to contribute to this repository.

1.0.0rc7 Oct 21, 2025
1.0.0rc6 Oct 13, 2025
1.0.0rc5 Oct 10, 2025
1.0.0rc4 Oct 08, 2025
1.0.0rc3 Oct 08, 2025
1.0.0rc2 Sep 25, 2025
1.0.0rc1 Sep 24, 2025
1.0.0rc0 Sep 15, 2025
0.36.0rc0 Oct 21, 2025
0.35.3 Sep 29, 2025
0.35.2 Sep 29, 2025
0.35.1 Sep 23, 2025
0.35.0 Sep 16, 2025
0.35.0rc1 Sep 16, 2025
0.35.0rc0 Jul 24, 2025
0.34.6 Sep 16, 2025
0.34.5 Sep 15, 2025
0.34.4 Aug 08, 2025
0.34.3 Jul 29, 2025
0.34.2 Jul 28, 2025
0.34.1 Jul 25, 2025
0.34.0 Jul 25, 2025
0.34.0rc0 Jul 24, 2025
0.33.5 Jul 24, 2025
0.33.4 Jul 11, 2025
0.33.3 Jul 11, 2025
0.33.2 Jul 02, 2025
0.33.1 Jun 25, 2025
0.33.0 Jun 11, 2025
0.33.0rc0 Jun 11, 2025
0.32.6 Jun 11, 2025
0.32.5 Jun 10, 2025
0.32.4 Jun 03, 2025
0.32.3 May 30, 2025
0.32.2 May 27, 2025
0.32.1 May 26, 2025
0.32.0 May 23, 2025
0.32.0rc1 May 23, 2025
0.32.0rc0 May 22, 2025
0.31.4 May 19, 2025
0.31.3 May 19, 2025
0.31.2 May 13, 2025
0.31.1 May 07, 2025
0.31.0 May 07, 2025
0.31.0rc0 May 06, 2025
0.30.2 Apr 08, 2025
0.30.1 Mar 31, 2025
0.30.0 Mar 31, 2025
0.30.0rc3 Mar 28, 2025
0.30.0rc2 Mar 27, 2025
0.30.0rc1 Mar 27, 2025
0.30.0rc0 Mar 27, 2025
0.29.3 Mar 11, 2025
0.29.3rc0 Mar 11, 2025
0.29.2 Mar 05, 2025
0.29.1 Feb 20, 2025
0.29.0 Feb 19, 2025
0.29.0rc7 Feb 18, 2025
0.29.0rc6 Feb 18, 2025
0.29.0rc5 Feb 18, 2025
0.29.0rc4 Feb 18, 2025
0.29.0rc3 Feb 18, 2025
0.29.0rc2 Feb 18, 2025
0.29.0rc1 Feb 18, 2025
0.29.0rc0 Feb 18, 2025
0.28.1 Jan 30, 2025
0.28.0 Jan 28, 2025
0.28.0rc5 Jan 28, 2025
0.28.0rc4 Jan 28, 2025
0.28.0rc3 Jan 28, 2025
0.28.0rc2 Jan 28, 2025
0.28.0rc1 Jan 28, 2025
0.28.0rc0 Jan 28, 2025
0.27.1 Jan 06, 2025
0.27.0 Dec 16, 2024
0.27.0rc1 Dec 16, 2024
0.27.0rc0 Dec 13, 2024
0.26.5 Dec 06, 2024
0.26.4 Dec 06, 2024
0.26.3 Nov 28, 2024
0.26.2 Oct 28, 2024
0.26.1 Oct 21, 2024
0.26.0 Oct 18, 2024
0.26.0rc0 Oct 17, 2024
0.25.2 Oct 09, 2024
0.25.1 Sep 23, 2024
0.25.0 Sep 17, 2024
0.25.0rc1 Sep 17, 2024
0.25.0rc0 Sep 16, 2024
0.24.7 Sep 12, 2024
0.24.6 Aug 19, 2024
0.24.5 Jul 31, 2024
0.24.4 Jul 31, 2024
0.24.3 Jul 29, 2024
0.24.2 Jul 24, 2024
0.24.1 Jul 23, 2024
0.24.0 Jul 18, 2024
0.24.0rc0 Jul 17, 2024
0.23.5 Jul 16, 2024
0.23.4 Jun 14, 2024
0.23.3 Jun 05, 2024
0.23.2 May 27, 2024
0.23.1 May 21, 2024
0.23.0 May 02, 2024
0.23.0rc1 Apr 30, 2024
0.23.0rc0 Apr 30, 2024
0.22.2 Mar 29, 2024
0.22.1 Mar 26, 2024
0.22.0 Mar 25, 2024
0.22.0rc1 Mar 25, 2024
0.22.0rc0 Mar 21, 2024
0.21.4 Mar 06, 2024
0.21.3 Feb 29, 2024
0.21.2 Feb 28, 2024
0.21.1 Feb 27, 2024
0.21.0 Feb 27, 2024
0.21.0rc0 Feb 27, 2024
0.20.3 Jan 22, 2024
0.20.2 Jan 05, 2024
0.20.1 Dec 20, 2023
0.20.0 Dec 20, 2023
0.20.0rc1 Dec 19, 2023
0.20.0rc0 Dec 19, 2023
0.19.4 Nov 16, 2023
0.19.3 Nov 15, 2023
0.19.2 Nov 15, 2023
0.19.1 Nov 13, 2023
0.19.0 Nov 08, 2023
0.19.0rc0 Nov 06, 2023
0.18.0 Oct 10, 2023
0.18.0rc0 Oct 06, 2023
0.17.3 Sep 26, 2023
0.17.2 Sep 18, 2023
0.17.1 Sep 11, 2023
0.17.0 Sep 11, 2023
0.17.0rc0 Sep 08, 2023
0.16.4 Jul 07, 2023
0.16.3 Jul 07, 2023
0.16.2 Jul 05, 2023
0.16.1 Jul 05, 2023
0.16.0rc0 Jul 04, 2023
0.15.1 Jun 01, 2023
0.15.0 Jun 01, 2023
0.15.0rc0 Jun 01, 2023
0.14.1 Apr 25, 2023
0.14.0 Apr 24, 2023
0.14.0rc1 Apr 20, 2023
0.14.0rc0 Apr 18, 2023
0.13.4 Apr 06, 2023
0.13.3 Mar 20, 2023
0.13.2 Mar 13, 2023
0.13.1 Mar 09, 2023
0.13.0 Mar 08, 2023
0.13.0rc1 Mar 08, 2023
0.13.0rc0 Mar 08, 2023
0.12.1 Feb 17, 2023
0.12.0 Jan 25, 2023
0.12.0rc0 Jan 20, 2023
0.11.1 Nov 28, 2022
0.11.0 Nov 16, 2022
0.11.0rc1 Nov 15, 2022
0.11.0rc0 Nov 14, 2022
0.10.1 Oct 11, 2022
0.10.0 Sep 28, 2022
0.10.0rc3 Sep 27, 2022
0.10.0rc1 Sep 27, 2022
0.10.0rc0 Sep 26, 2022
0.9.1 Aug 25, 2022
0.9.0 Aug 23, 2022
0.9.0rc3 Aug 23, 2022
0.9.0rc2 Aug 18, 2022
0.9.0rc0 Aug 18, 2022
0.9.0.dev0 Aug 18, 2022
0.8.1 Jun 21, 2022
0.8.0 Jun 16, 2022
0.8.0rc4 Jun 20, 2022
0.8.0rc3 Jun 17, 2022
0.8.0rc2 Jun 16, 2022
0.8.0rc1 Jun 16, 2022
0.8.0rc0 Jun 15, 2022
0.7.0 May 24, 2022
0.7.0rc0 May 24, 2022
0.6.0 May 11, 2022
0.6.0rc0 May 09, 2022
0.5.1 Apr 06, 2022
0.5.0 Apr 05, 2022
0.4.0 Jan 11, 2022
0.2.1 Dec 03, 2021
0.2.0 Dec 01, 2021
0.1.2 Nov 08, 2021
0.1.1 Nov 05, 2021
0.1.0 Nov 02, 2021
0.0.19 Oct 06, 2021
0.0.18 Oct 04, 2021
0.0.17 Sep 14, 2021
0.0.16 Aug 27, 2021
0.0.15 Jul 28, 2021
0.0.14 Jul 16, 2021
0.0.13 Jun 28, 2021
0.0.12 Jun 23, 2021
0.0.11 Jun 23, 2021
0.0.10 Jun 08, 2021
0.0.9 May 20, 2021
0.0.8 Apr 07, 2021
0.0.7 Mar 18, 2021
0.0.6 Mar 02, 2021
0.0.5 Mar 02, 2021
0.0.3rc2 Feb 23, 2021
0.0.3rc1 Feb 20, 2021
0.0.2 Feb 12, 2021
0.0.1 Dec 23, 2020

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
filelock
fsspec (>=2023.5.0)
packaging (>=20.9)
pyyaml (>=5.1)
requests
tqdm (>=4.42.1)
typing-extensions (>=3.7.4.3)
hf-xet or (<2.0.0,>=1.1.3)