baml.csv.WriterOptions$stream
Options for CSV writers. All fields are optional; `null` means default.
Signature
class baml.csv.WriterOptions$streamOptions for CSV writers. All fields are optional; null means default.
As with ReaderOptions, delimiter, quote, and escape must be single
ASCII bytes (never CR or LF) and mutually distinct; violations throw
Error { kind: Options } when the writer is constructed.
Source:<builtin>/baml/ns_csv/csv.bamlbytes 0–0
Fields
delimiter
string | nullField separator. Exactly one ASCII byte. Default ",".
quote
string | nullQuote character. Exactly one ASCII byte. Default "\"".
quote_style
"minimal" | "all" | "never" | null"minimal" (default): quote only fields containing the delimiter,
quote, CR, or LF. "all": quote every field. "never": quote nothing;
a field that would require quoting throws Encode.
escape
string | nullnull (default) means "" doubling inside quoted fields.
terminator
"lf" | "crlf" | nullRecord terminator. Default "lf"; "crlf" for strict RFC 4180 / Excel.
write_header
bool | nullAutomatically emit a header before the first write_row<T>.
Default true.
headers
string[] | nullOverride header names for typed writes (positional).
null_value
string | nullHow null serializes. Default "".
bom
bool | nullEmit a UTF-8 BOM (Excel's UTF-8 detection). Default false.
sanitize_formulas
bool | nullCSV-injection guard: prefix ' to cells starting with =, +, -,
@, tab, CR, or LF (including full-width variants). Mutates the data,
which is why it is opt-in. Default false.
Implementations
baml.Concrete for T
Source:<builtin>/baml/core.bamlbytes 747–779