(
    column_name: str = None,
    *,
    model: DeclarativeMeta = None,
    table: sa.Table = None,
    **kwargs,
)
return SQLAlchemyAutoField(
        column_name=column_name, model=model, table=table, field_kwargs=kwargs
    )
Mark a field to autogenerate from a model or table.

    :param column_name: Name of the column to generate the field from.
        If ``None``, matches the field name. If ``attribute`` is unspecified,
        ``attribute`` will be set to the same value as ``column_name``.
    :param model: Model to generate the field from.
        If ``None``, uses ``model`` specified on ``class Meta``.
    :param table: Table to generate the field from.
        If ``None``, uses ``table`` specified on ``class Meta``.
    :param kwargs: Field argument overrides.
Mark a field to autogenerate from a model or table.
Mark a field to autogenerate from a model or table .
def auto_field(
    column_name: str = None,
    *,
    model: DeclarativeMeta = None,
    table: sa.Table = None,
    **kwargs,
):
    """Mark a field to autogenerate from a model or table.

    :param column_name: Name of the column to generate the field from.
        If ``None``, matches the field name. If ``attribute`` is unspecified,
        ``attribute`` will be set to the same value as ``column_name``.
    :param model: Model to generate the field from.
        If ``None``, uses ``model`` specified on ``class Meta``.
    :param table: Table to generate the field from.
        If ``None``, uses ``table`` specified on ``class Meta``.
    :param kwargs: Field argument overrides.
    """
    if column_name is not None:
        kwargs.setdefault("attribute", column_name)
    return SQLAlchemyAutoField(
        column_name=column_name, model=model, table=table, field_kwargs=kwargs
    )
def auto_field ( column_name : str = None , * , model : DeclarativeMeta = None , table : sa . Table = None , * * kwargs , ) : if column_name is not None : kwargs . setdefault ( "attribute" , column_name ) return SQLAlchemyAutoField ( column_name = column_name , model = model , table = table , field_kwargs = kwargs )