HugBucket requires Python 3.14 or later. Verify your Python version with
python --version before continuing.Prerequisites
- Python 3.14+ — required by
requires-python = ">=3.14"inpyproject.toml - uv — used for dependency management and running scripts
Setup
1
Clone the repository
Clone the HugBucket repository and navigate into the project directory.
2
Install dependencies
Use This installs both the main dependencies (
uv sync to install all runtime and dev dependencies into a local virtual environment.aiohttp, blake3, lz4, pyftpdlib) and the dev group (pytest, boto3, awscli, pytest-asyncio, pytest-aiohttp).3
Set your Hugging Face token
HugBucket authenticates against the Hugging Face API using a token. Export it as an environment variable before running the server.Get your token from huggingface.co/settings/tokens.
4
Run the gateway
Start HugBucket in either S3 or FTP mode.The
MODE environment variable selects the protocol. Valid values are s3 and ftp. The server will exit with code 2 if MODE is missing or invalid.Explicit protocol entrypoints
Instead of settingMODE, you can use the protocol-specific entrypoints defined in pyproject.toml:
pyproject.toml
MODE to match — hugbucket-s3 expects MODE=s3 and hugbucket-ftp expects MODE=ftp. If MODE is set to the wrong value the process exits with code 2.
CLI flags
Both entrypoints accept the same CLI flags via argparse.S3 gateway (hugbucket-s3)
FTP gateway (hugbucket-ftp)
--verbose is set, logging is configured at DEBUG level. Without it, INFO level is used.
Dev dependencies
All dev dependencies are in the[dependency-groups] dev section of pyproject.toml and are installed automatically by uv sync:
pyproject.toml