--- id: spaces version: "0.51.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # spaces — Utilities for Hugging Face Spaces License: permissive · Maintenance: active · Downloads: 372.6K/mo ## 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 above — 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 pip install spaces uv add spaces 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_current - Install friction: low - Maintenance: active - Downloads: 372.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags hugging face spaces utilities, download models from hub, upload to hugging face, hugging face api client, machine learning model hosting, inference on hub models, repository management, machine-learning, model-hub, cli-tool [View on SkillFed](https://skillfed.io/packages/spaces) · [View on PyPI](https://pypi.org/project/spaces/)