def __init__(self, field_type, field_required=False, field_options=None, **field_options_kwargs):
field_options = utils.make_dict(field_options, field_options_kwargs)<EOL>d = {}<EOL>min_size = field_options.pop("<STR_LIT>", -<NUM_LIT:1>)<EOL>max_size = field_options.pop("<STR_LIT>", -<NUM_LIT:1>)<EOL>size = field_options.pop("<STR_LIT:size>", -<NUM_LIT:1>)<EOL>if size > <NUM_LIT:0>:<EOL><INDENT>d['<STR_LIT:size>'] = size<EOL><DEDENT>else:<EOL><INDENT>if min_size > <NUM_LIT:0> and max_size < <NUM_LIT:0>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>elif min_size < -<NUM_LIT:1> and max_size > <NUM_LIT:0>:<EOL><INDENT>d['<STR_LIT>'] = max_size<EOL><DEDENT>elif min_size >= <NUM_LIT:0> and max_size >= <NUM_LIT:0>:<EOL><INDENT>d['<STR_LIT>'] = min_size<EOL>d['<STR_LIT>'] = max_size<EOL><DEDENT><DEDENT>field_options.setdefault("<STR_LIT>", False)<EOL>field_options.update(d)<EOL>self.fgetter(field_options.pop("<STR_LIT>", self.default_fget))<EOL>self.fsetter(field_options.pop("<STR_LIT>", self.default_fset))<EOL>self.fdeleter(field_options.pop("<STR_LIT>", self.default_fdel))<EOL>self.fdefaulter(field_options.pop("<STR_LIT>", self.default_fdefault))<EOL>self.igetter(field_options.pop("<STR_LIT>", self.default_iget))<EOL>self.isetter(field_options.pop("<STR_LIT>", self.default_iset))<EOL>self.jsonabler(field_options.pop("<STR_LIT>", self.default_jsonable))<EOL>self.name = field_options.pop("<STR_LIT:name>", "<STR_LIT>")<EOL>self.instance_field_name = str(id(self))<EOL>self._type = field_type<EOL>self.default = field_options.pop("<STR_LIT:default>", None)<EOL>self.options = field_options<EOL>self.required = field_required if field_required else self.is_pk()<EOL>
create a field

:param field_type: type, the python type of the field, so for a string you would pass str, integer: int,
    boolean: bool, float: float, big int: long
:param field_required: boolean, true if this field has to be there to insert
:param field_options: dict, everything else in key: val notation. Current options:
    size -- int -- the size you want the string to be, or the int to be
    min_size -- int -- the minimum size
    max_size -- int -- if you want a varchar, set this
    unique -- boolean -- True to set a unique index on this field, this is just for convenience and is
        equal to self.set_index(field_name, [field_name], unique=True). this is a convenience option
        to set a unique index on the field without having to add a separate index statement
    ignore_case -- boolean -- True to ignore case if this field is used in indexes
    default -- mixed -- defaults to None, can be anything the db can support
:param **field_options_kwargs: dict, will be combined with field_options