Sandbox — LSD is in active testing. All systems operational·payments are test-mode (no real charges).
Overview Use Cases News Docs Tool Store Support Community Get LSD
All docs
Source· classmethod

Source.file

builds a file source from explicit paths or a folder glob

Python
file(*paths, folder: str = "", patterns: str = "", combine: str = "concat") -> Source

Returns Source — a file source that reads the given paths or folder glob

Parameters#

name type default description
*paths str explicit file paths to read
folder str "" a directory to scan instead of listing paths
patterns str "" glob pattern(s) matched inside folder, e.g. "*.parquet"
combine str "concat" how multiple matched files fold into one Table

Example#

Python
from lsdtools import Source

Source.file("a.csv", "b.csv")                    # two explicit files

Scan a folder with a glob instead of listing files:

Python
Source.file(folder="data", patterns="*.parquet")

Notes#

Files are read by extension — .csv via CSV, .parquet / .pq via Parquet. combine controls how several matched files fold together; the default "concat" stacks their rows into one Table. This constructor returns a plain value Source (not bound to a step), so you can call .read() on it directly.

See also#

API: sql · of · read · paths

Guides: Load steps · File loader

By LSD Team · Last updated Jul 17, 2026 Ask on Discord View as Markdown