skillfed

spaces

Utilities for Hugging Face Spaces

spaces v0.51.1 372.6K downloads/30d#7,159 on PyPI3,801
Permissive license Apache-2.0 Active released

What it is and what it does

Spaces is a utilities package for interacting with the Hugging Face Hub platform. It provides functions to download pre-trained models and datasets, upload files and folders to repositories, manage repositories, run inference on deployed models, and execute jobs on Hugging Face infrastructure. The package wraps HTTP communication to the Hub's API and is designed for both human developers and AI agents, with a CLI that adapts output based on context.

The package depends on requests and httpx for network communication, pydantic for data validation, and gradio for UI integration. Installation is straightforward with pip, and the core functionality requires Python 3.10 or later with no external system dependencies beyond the runtime dependencies listed.

Use it for:

  • Download pre-trained models or datasets from the Hub for use in local machine learning projects.
  • Upload trained models, datasets, or applications to the Hub for sharing with the community.
  • Programmatically manage model repositories, including creating repos and updating metadata.
  • Run inference on models deployed to the Hub without hosting your own infrastructure.
  • Automate model versioning and file management as part of a training or deployment pipeline.
  • Integrate Hub access into agent workflows via CLI with context-aware output formatting.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides utilities for working with Hugging Face Spaces, including downloading files, uploading content, and managing repositories on the Hugging Face Hub platform.

Yes. The package is actively maintained, has low install friction, carries a permissive Apache-2.0 license, and provides essential utilities for anyone working with Hugging Face models and datasets. No known vulnerabilities. Install it if you need to programmatically interact with the Hub.

Install

spaces on PyPI

pip

pip install spaces

uv

uv add spaces

poetry

poetry add spaces

Installing spaces

Before you install

Low install friction with a pure-Python wheel. Active maintenance with a recent release 24 days ago and 3801 repository stars. Depends on well-established packages: packaging, typing-extensions, requests, gradio, pydantic, and httpx.

License in practice

Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions.

Quickstart

pip install spaces

from spaces import download_file

download_file(repo_id="model/repo", filename="config.json")

Requires Python 3.10 or later (supports current versions, <3.15).

Verify before relying

  • Specific API functions available in the spaces package beyond what the description excerpt covers.
  • Performance characteristics and rate-limiting behavior when downloading large models.
  • Whether optional dependencies are needed for typical workflows.
  • Actual runtime behavior and caching mechanisms for downloaded files.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (<3.15,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 6 — packaging, typing-extensions, requests, gradio, pydantic, httpx
Maintenance actively maintained — 24 days since the last release
Last repo commit
First released
Downloads 372,618/month — #7,159 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: spaces-0.51.1-py3-none-any.whl

Tags

hugging face spaces utilitiesdownload models from hubupload to hugging facehugging face api clientmachine learning model hostinginference on hub modelsrepository management
machine-learningmodel-hubcli-tool

More Artificial Intelligence packages