Skip to content

Commit a25e1d2

Browse files
davanstrienclaude
andauthored
Add Daft to bucket integrations (#2616)
* Add Daft to bucket integrations * Pass the HF token explicitly in the Daft bucket example Daft's hf:// connector needs the token via IOConfig(hf=HuggingFaceConfig(...)); the bare read returns Unauthorized on (always-private) buckets. Verified against daft 0.7.17. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7c0de66 commit a25e1d2

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

docs/hub/storage-buckets-integrations.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@ import dask.dataframe as dd
2121
df = dd.read_parquet("hf://buckets/username/my-bucket/data.parquet")
2222
```
2323

24+
## Daft
25+
26+
Daft supports `hf://buckets/` paths natively, with [Xet-accelerated reads](https://docs.daft.ai/en/stable/connectors/huggingface/) enabled by default:
27+
28+
```python
29+
import daft
30+
from daft.io import IOConfig, HuggingFaceConfig
31+
from huggingface_hub import get_token
32+
33+
io_config = IOConfig(hf=HuggingFaceConfig(token=get_token()))
34+
df = daft.read_parquet("hf://buckets/username/my-bucket/data.parquet", io_config=io_config)
35+
```
36+
2437
## PyArrow
2538

2639
```python
@@ -88,4 +101,4 @@ text_files = hffs.glob("buckets/username/my-bucket/*.txt")
88101

89102
## Coming soon
90103

91-
Native `hf://` URL support is on the way for more libraries — including Polars, DuckDB, Daft, and webdataset. In the meantime, all of these already work today through the [S3-compatible API](./storage-buckets-s3).
104+
Native `hf://` URL support is on the way for more libraries — including Polars, DuckDB, and webdataset. In the meantime, all of these already work today through the [S3-compatible API](./storage-buckets-s3).

0 commit comments

Comments
 (0)