Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sachnun/hugbucket/llms.txt
Use this file to discover all available pages before exploring further.
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
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).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.
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)
| Flag | Default | Description |
|---|---|---|
--host | 0.0.0.0 | Bind host |
--port | 9000 | Bind port |
--verbose, -v | false | Enable debug logging |
FTP gateway (hugbucket-ftp)
| Flag | Default | Description |
|---|---|---|
--host | 0.0.0.0 | Bind host |
--port | 2121 | Bind port |
--verbose, -v | false | Enable debug logging |
--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
| Package | Purpose |
|---|---|
pytest | Test runner |
pytest-asyncio | asyncio_mode = "auto" support for async test functions |
pytest-aiohttp | aiohttp test client for S3 server integration tests |
boto3 | AWS SDK used in integration tests |
awscli | CLI tool for manual S3 endpoint testing |