zut.Header

class zut.Header(name: str | None = None, *, key: Any | None = None, type: type | None = None, sql_type: str | None = None, primary_key: bool | None = None, unique: bool | list[list[str]] | None = None, identity: bool | str | None = None, null: bool | None = None, fmt: str | Callable = None, multiply: int = None)

Bases: object

__init__(name: str | None = None, *, key: Any | None = None, type: type | None = None, sql_type: str | None = None, primary_key: bool | None = None, unique: bool | list[list[str]] | None = None, identity: bool | str | None = None, null: bool | None = None, fmt: str | Callable = None, multiply: int = None)

Create a header for tabular data. - key: how to obtain the value from a dict object (may be a key or a list of keys for recursive get). - name: name of the header (defaults to stringified key).

Methods

__init__([name, key, type, sql_type, ...])

Create a header for tabular data.

copy(*[, no_constraints, no_identity])

get_value(obj)

to_python(value, *, nullval)

to_str(value, *, after1970)

Attributes

path

toplevel_key

null

Indicate whether this column is nullable.

primary_key

Indicate whether this column is part of the primary key.

unique

If a list, unique togethers.

identity

Indicate whether this is an auto-generated identity column.

identity

Indicate whether this is an auto-generated identity column.

null

Indicate whether this column is nullable.

primary_key

Indicate whether this column is part of the primary key.

unique

If a list, unique togethers.