'Construct a new ``Column`` object.
:param name: The name of this column as represented in the database.
This argument may be the first positional argument, or specified
via keyword.
Names which contain no upper case characters
will be treated as case insensitive names, and will not be quoted
unless they are a reserved word.  Names with any number of upper
case characters will be quoted and sent exactly.  Note that this
behavior applies even for databases which standardize upper
case names as case insensitive such as Oracle.
The name field may be omitted at construction time and applied
later, at any time before the Column is associated with a
:class:`.Table`.  This is to support convenient
usage within the :mod:`~sqlalchemy.ext.declarative` extension.
:param type\_: The column\'s type, indicated using an instance which
subclasses :class:`~sqlalchemy.types.TypeEngine`.  If no arguments
are required for the type, the class of the type can be sent
as well, e.g.::
# use a type with arguments
Column(\'data\', String(50))
# use no arguments
Column(\'level\', Integer)
The ``type`` argument may be the second positional argument
or specified by keyword.
If the ``type`` is ``None`` or is omitted, it will first default to the special
type :class:`.NullType`.  If and when this :class:`.Column` is
made to refer to another column using :class:`.ForeignKey`
and/or :class:`.ForeignKeyConstraint`, the type of the remote-referenced
column will be copied to this column as well, at the moment that
the foreign key is resolved against that remote :class:`.Column`
object.
.. versionchanged:: 0.9.0
Support for propagation of type to a :class:`.Column` from its
:class:`.ForeignKey` object has been improved and should be
more reliable and timely.
:param \*args: Additional positional arguments include various
:class:`.SchemaItem` derived constructs which will be applied
as options to the column.  These include instances of
:class:`.Constraint`, :class:`.ForeignKey`, :class:`.ColumnDefault`,
and :class:`.Sequence`.  In some cases an equivalent keyword
argument is available such as ``server_default``, ``default``
and ``unique``.
:param autoincrement: This flag may be set to ``False`` to
indicate an integer primary key column that should not be
considered to be the "autoincrement" column, that is
the integer primary key column which generates values
implicitly upon INSERT and whose value is usually returned
via the DBAPI cursor.lastrowid attribute.   It defaults
to ``True`` to satisfy the common use case of a table
with a single integer primary key column.  If the table
has a composite primary key consisting of more than one
integer column, set this flag to True only on the
column that should be considered "autoincrement".
The setting *only* has an effect for columns which are:
* Integer derived (i.e. INT, SMALLINT, BIGINT).
* Part of the primary key
* Are not referenced by any foreign keys, unless
the value is specified as ``\'ignore_fk\'``
.. versionadded:: 0.7.4
* have no server side or client side defaults (with the exception
of Postgresql SERIAL).
The setting has these two effects on columns that meet the
above criteria:
* DDL issued for the column will include database-specific
keywords intended to signify this column as an
"autoincrement" column, such as AUTO INCREMENT on MySQL,
SERIAL on Postgresql, and IDENTITY on MS-SQL.  It does
*not* issue AUTOINCREMENT for SQLite since this is a
special SQLite flag that is not required for autoincrementing
behavior.  See the SQLite dialect documentation for
information on SQLite\'s AUTOINCREMENT.
* The column will be considered to be available as
cursor.lastrowid or equivalent, for those dialects which
"post fetch" newly inserted identifiers after a row has
been inserted (SQLite, MySQL, MS-SQL).  It does not have
any effect in this regard for databases that use sequences
to generate primary key identifiers (i.e. Firebird, Postgresql,
Oracle).
.. versionchanged:: 0.7.4
``autoincrement`` accepts a special value ``\'ignore_fk\'``
to indicate that autoincrementing status regardless of foreign
key references.  This applies to certain composite foreign key
setups, such as the one demonstrated in the ORM documentation
at :ref:`post_update`.
:param default: A scalar, Python callable, or
:class:`.ColumnElement` expression representing the
*default value* for this column, which will be invoked upon insert
if this column is otherwise not specified in the VALUES clause of
the insert. This is a shortcut to using :class:`.ColumnDefault` as
a positional argument; see that class for full detail on the
structure of the argument.
Contrast this argument to ``server_default`` which creates a
default generator on the database side.
:param doc: optional String that can be used by the ORM or similar
to document attributes.   This attribute does not render SQL
comments (a future attribute \'comment\' will achieve that).
:param key: An optional string identifier which will identify this
``Column`` object on the :class:`.Table`. When a key is provided,
this is the only identifier referencing the ``Column`` within the
application, including ORM attribute mapping; the ``name`` field
is used only when rendering SQL.
:param index: When ``True``, indicates that the column is indexed.
This is a shortcut for using a :class:`.Index` construct on the
table. To specify indexes with explicit names or indexes that
contain multiple columns, use the :class:`.Index` construct
instead.
:param info: Optional data dictionary which will be populated into the
:attr:`.SchemaItem.info` attribute of this object.
:param nullable: If set to the default of ``True``, indicates the
column will be rendered as allowing NULL, else it\'s rendered as
NOT NULL. This parameter is only used when issuing CREATE TABLE
statements.
:param onupdate: A scalar, Python callable, or
:class:`~sqlalchemy.sql.expression.ClauseElement` representing a
default value to be applied to the column within UPDATE
statements, which wil be invoked upon update if this column is not
present in the SET clause of the update. This is a shortcut to
using :class:`.ColumnDefault` as a positional argument with
``for_update=True``.
:param primary_key: If ``True``, marks this column as a primary key
column. Multiple columns can have this flag set to specify
composite primary keys. As an alternative, the primary key of a
:class:`.Table` can be specified via an explicit
:class:`.PrimaryKeyConstraint` object.
:param server_default: A :class:`.FetchedValue` instance, str, Unicode
or :func:`~sqlalchemy.sql.expression.text` construct representing
the DDL DEFAULT value for the column.
String types will be emitted as-is, surrounded by single quotes::
Column(\'x\', Text, server_default="val")
x TEXT DEFAULT \'val\'
A :func:`~sqlalchemy.sql.expression.text` expression will be
rendered as-is, without quotes::
Column(\'y\', DateTime, server_default=text(\'NOW()\'))
y DATETIME DEFAULT NOW()
Strings and text() will be converted into a :class:`.DefaultClause`
object upon initialization.
Use :class:`.FetchedValue` to indicate that an already-existing
column will generate a default value on the database side which
will be available to SQLAlchemy for post-fetch after inserts. This
construct does not specify any DDL and the implementation is left
to the database, such as via a trigger.
:param server_onupdate:   A :class:`.FetchedValue` instance
representing a database-side default generation function. This
indicates to SQLAlchemy that a newly generated value will be
available after updates. This construct does not specify any DDL
and the implementation is left to the database, such as via a
trigger.
:param quote: Force quoting of this column\'s name on or off,
corresponding to ``True`` or ``False``. When left at its default
of ``None``, the column identifier will be quoted according to
whether the name is case sensitive (identifiers with at least one
upper case character are treated as case sensitive), or if it\'s a
reserved word. This flag is only needed to force quoting of a
reserved word which is not known by the SQLAlchemy dialect.
:param unique: When ``True``, indicates that this column contains a
unique constraint, or if ``index`` is ``True`` as well, indicates
that the :class:`.Index` should be created with the unique flag.
To specify multiple columns in the constraint/index or to specify
an explicit name, use the :class:`.UniqueConstraint` or
:class:`.Index` constructs explicitly.
:param system: When ``True``, indicates this is a "system" column,
that is a column which is automatically made available by the
database, and should not be included in the columns list for a
``CREATE TABLE`` statement.
For more elaborate scenarios where columns should be conditionally
rendered differently on different backends, consider custom
compilation rules for :class:`.CreateColumn`.
..versionadded:: 0.8.3 Added the ``system=True`` parameter to
:class:`.Column`.'

def __init__(self, *args, **kwargs):

    name = kwargs.pop('name', None)
    type_ = kwargs.pop('type_', None)
    args = list(args)
    if args:
        if isinstance(args[0], util.string_types):
            if (name is not None):
                raise exc.ArgumentError('May    not    pass    name    positionally    and    as    a    keyword.')
            name = args.pop(0)
    if args:
        coltype = args[0]
        if hasattr(coltype, '_sqla_type'):
            if (type_ is not None):
                raise exc.ArgumentError('May    not    pass    type_    positionally    and    as    a    keyword.')
            type_ = args.pop(0)
    if (name is not None):
        name = quoted_name(name, kwargs.pop('quote', None))
    elif ('quote' in kwargs):
        raise exc.ArgumentError("Explicit    'name'    is    required    when    sending    'quote'    argument")
    super(Column, self).__init__(name, type_)
    self.key = kwargs.pop('key', name)
    self.primary_key = kwargs.pop('primary_key', False)
    self.nullable = kwargs.pop('nullable', (not self.primary_key))
    self.default = kwargs.pop('default', None)
    self.server_default = kwargs.pop('server_default', None)
    self.server_onupdate = kwargs.pop('server_onupdate', None)
    self.index = kwargs.pop('index', None)
    self.unique = kwargs.pop('unique', None)
    self.system = kwargs.pop('system', False)
    self.doc = kwargs.pop('doc', None)
    self.onupdate = kwargs.pop('onupdate', None)
    self.autoincrement = kwargs.pop('autoincrement', True)
    self.constraints = set()
    self.foreign_keys = set()
    if ('_proxies' in kwargs):
        self._proxies = kwargs.pop('_proxies')
    elif isinstance(self.type, SchemaEventTarget):
        self.type._set_parent_with_dispatch(self)
    if (self.default is not None):
        if isinstance(self.default, (ColumnDefault, Sequence)):
            args.append(self.default)
        else:
            if getattr(self.type, '_warn_on_bytestring', False):
                if isinstance(self.default, util.binary_type):
                    util.warn('Unicode    column    received    non-unicode    default    value.')
            args.append(ColumnDefault(self.default))
    if (self.server_default is not None):
        if isinstance(self.server_default, FetchedValue):
            args.append(self.server_default._as_for_update(False))
        else:
            args.append(DefaultClause(self.server_default))
    if (self.onupdate is not None):
        if isinstance(self.onupdate, (ColumnDefault, Sequence)):
            args.append(self.onupdate)
        else:
            args.append(ColumnDefault(self.onupdate, for_update=True))
    if (self.server_onupdate is not None):
        if isinstance(self.server_onupdate, FetchedValue):
            args.append(self.server_onupdate._as_for_update(True))
        else:
            args.append(DefaultClause(self.server_onupdate, for_update=True))
    self._init_items(*args)
    util.set_creation_order(self)
    if ('info' in kwargs):
        self.info = kwargs.pop('info')
    if kwargs:
        raise exc.ArgumentError(('Unknown    arguments    passed    to    Column:    ' + repr(list(kwargs))))
