{
    "mode": "pydoc",
    "parameter": "MySQLdb",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/MySQLdb/json",
    "generated": "2026-06-02T15:00:38Z",
    "sections": {
        "NAME": {
            "content": "MySQLdb - MySQLdb - A DB API v2.0 compatible interface to MySQL.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This package is a wrapper around mysql, which mostly implements the\nMySQL C API.\n",
            "subsections": [
                {
                    "name": "connect",
                    "content": "See the C API specification and the MySQL documentation for more info\non other items.\n\nFor information on how MySQLdb handles type conversion, see the\nMySQLdb.converters module.\n"
                }
            ]
        },
        "PACKAGE CONTENTS": {
            "content": "exceptions\nmysql\ncompat\nconnections\nconstants (package)\nconverters\ncursors\nrelease\ntimes\n",
            "subsections": []
        },
        "SUBMODULES": {
            "content": "FIELDTYPE\n",
            "subsections": []
        },
        "CLASSES": {
            "content": "builtins.Exception(builtins.BaseException)\nMySQLdb.exceptions.MySQLError\nMySQLdb.exceptions.Error\nMySQLdb.exceptions.DatabaseError\nMySQLdb.exceptions.DataError\nMySQLdb.exceptions.IntegrityError\nMySQLdb.exceptions.InternalError\nMySQLdb.exceptions.NotSupportedError\nMySQLdb.exceptions.OperationalError\nMySQLdb.exceptions.ProgrammingError\nMySQLdb.exceptions.InterfaceError\nMySQLdb.exceptions.Warning(builtins.Warning, MySQLdb.exceptions.MySQLError)\nbuiltins.Warning(builtins.Exception)\nMySQLdb.exceptions.Warning(builtins.Warning, MySQLdb.exceptions.MySQLError)\nbuiltins.frozenset(builtins.object)\nDBAPISet\nbuiltins.object\ndatetime.date\ndatetime.datetime\ndatetime.time\n",
            "subsections": [
                {
                    "name": "class DBAPISet",
                    "content": "|  A special type of set for which A == x is true if A is a\n|  DBAPISet and x is a member of that set.\n|\n|  Method resolution order:\n|      DBAPISet\n|      builtins.frozenset\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  eq(self, other)\n|      Return self==value.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  hash = None\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.frozenset:\n|\n|  and(self, value, /)\n|      Return self&value.\n|\n|  contains(...)\n|      x.contains(y) <==> y in x.\n|\n|  ge(self, value, /)\n|      Return self>=value.\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  gt(self, value, /)\n|      Return self>value.\n|\n|  iter(self, /)\n|      Implement iter(self).\n|\n|  le(self, value, /)\n|      Return self<=value.\n|\n|  len(self, /)\n|      Return len(self).\n|\n|  lt(self, value, /)\n|      Return self<value.\n|\n|  ne(self, value, /)\n|      Return self!=value.\n|\n|  or(self, value, /)\n|      Return self|value.\n|\n|  rand(self, value, /)\n|      Return value&self.\n|\n|  reduce(...)\n|      Return state information for pickling.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  ror(self, value, /)\n|      Return value|self.\n|\n|  rsub(self, value, /)\n|      Return value-self.\n|\n|  rxor(self, value, /)\n|      Return value^self.\n|\n|  sizeof(...)\n|      S.sizeof() -> size of S in memory, in bytes\n|\n|  sub(self, value, /)\n|      Return self-value.\n|\n|  xor(self, value, /)\n|      Return self^value.\n|\n|  copy(...)\n|      Return a shallow copy of a set.\n|\n|  difference(...)\n|      Return the difference of two or more sets as a new set.\n|\n|      (i.e. all elements that are in this set but not the others.)\n|\n|  intersection(...)\n|      Return the intersection of two sets as a new set.\n|\n|      (i.e. all elements that are in both sets.)\n|\n|  isdisjoint(...)\n|      Return True if two sets have a null intersection.\n|\n|  issubset(...)\n|      Report whether another set contains this set.\n|\n|  issuperset(...)\n|      Report whether this set contains another set.\n|\n|  symmetricdifference(...)\n|      Return the symmetric difference of two sets as a new set.\n|\n|      (i.e. all elements that are in exactly one of the sets.)\n|\n|  union(...)\n|      Return the union of sets as a new set.\n|\n|      (i.e. all elements that are in either set.)\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from builtins.frozenset:\n|\n|  classgetitem(...) from builtins.type\n|      See PEP 585\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.frozenset:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n"
                },
                {
                    "name": "class DataError",
                    "content": "|  Exception raised for errors that are due to problems with the\n|  processed data like division by zero, numeric value out of range,\n|  etc.\n|\n|  Method resolution order:\n|      DataError\n|      DatabaseError\n|      Error\n|      MySQLError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors inherited from MySQLError:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.Exception:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n"
                },
                {
                    "name": "class DatabaseError",
                    "content": "|  Exception raised for errors that are related to the\n|  database.\n|\n|  Method resolution order:\n|      DatabaseError\n|      Error\n|      MySQLError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors inherited from MySQLError:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.Exception:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n\nDate = class date(builtins.object)\n|  date(year, month, day) --> date object\n|\n|  Methods defined here:\n|\n|  add(self, value, /)\n|      Return self+value.\n|\n|  eq(self, value, /)\n|      Return self==value.\n|\n|  format(...)\n|      Formats self with strftime.\n|\n|  ge(self, value, /)\n|      Return self>=value.\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  gt(self, value, /)\n|      Return self>value.\n|\n|  hash(self, /)\n|      Return hash(self).\n|\n|  le(self, value, /)\n|      Return self<=value.\n|\n|  lt(self, value, /)\n|      Return self<value.\n|\n|  ne(self, value, /)\n|      Return self!=value.\n|\n|  radd(self, value, /)\n|      Return value+self.\n|\n|  reduce(...)\n|      reduce() -> (cls, state)\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  rsub(self, value, /)\n|      Return value-self.\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  sub(self, value, /)\n|      Return self-value.\n|\n|  ctime(...)\n|      Return ctime() style string.\n|\n|  isocalendar(...)\n|      Return a named tuple containing ISO year, week number, and weekday.\n|\n|  isoformat(...)\n|      Return string in ISO 8601 format, YYYY-MM-DD.\n|\n|  isoweekday(...)\n|      Return the day of the week represented by the date.\n|      Monday == 1 ... Sunday == 7\n|\n|  replace(...)\n|      Return date with new specified fields.\n|\n|  strftime(...)\n|      format -> strftime() style string.\n|\n|  timetuple(...)\n|      Return time tuple, compatible with time.localtime().\n|\n|  toordinal(...)\n|      Return proleptic Gregorian ordinal.  January 1 of year 1 is day 1.\n|\n|  weekday(...)\n|      Return the day of the week represented by the date.\n|      Monday == 0 ... Sunday == 6\n|\n|  ----------------------------------------------------------------------\n|  Class methods defined here:\n|\n|  fromisocalendar(...) from builtins.type\n|      int, int, int -> Construct a date from the ISO year, week number and weekday.\n|\n|      This is the inverse of the date.isocalendar() function\n|\n|  fromisoformat(...) from builtins.type\n|      str -> Construct a date from the output of date.isoformat()\n|\n|  fromordinal(...) from builtins.type\n|      int -> date corresponding to a proleptic Gregorian ordinal.\n|\n|  fromtimestamp(timestamp, /) from builtins.type\n|      Create a date from a POSIX timestamp.\n|\n|      The timestamp is a number, e.g. created via time.time(), that is interpreted\n|      as local time.\n|\n|  today(...) from builtins.type\n|      Current date or datetime:  same as self.class.fromtimestamp(time.time()).\n|\n|  ----------------------------------------------------------------------\n|  Static methods defined here:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  day\n|\n|  month\n|\n|  year\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  max = datetime.date(9999, 12, 31)\n|\n|  min = datetime.date(1, 1, 1)\n|\n|  resolution = datetime.timedelta(days=1)\n"
                },
                {
                    "name": "class Error",
                    "content": "|  Exception that is the base class of all other error exceptions\n|  (not Warning).\n|\n|  Method resolution order:\n|      Error\n|      MySQLError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors inherited from MySQLError:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.Exception:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n"
                },
                {
                    "name": "class IntegrityError",
                    "content": "|  Exception raised when the relational integrity of the database\n|  is affected, e.g. a foreign key check fails, duplicate key,\n|  etc.\n|\n|  Method resolution order:\n|      IntegrityError\n|      DatabaseError\n|      Error\n|      MySQLError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors inherited from MySQLError:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.Exception:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n"
                },
                {
                    "name": "class InterfaceError",
                    "content": "|  Exception raised for errors that are related to the database\n|  interface rather than the database itself.\n|\n|  Method resolution order:\n|      InterfaceError\n|      Error\n|      MySQLError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors inherited from MySQLError:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.Exception:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n"
                },
                {
                    "name": "class InternalError",
                    "content": "|  Exception raised when the database encounters an internal\n|  error, e.g. the cursor is not valid anymore, the transaction is\n|  out of sync, etc.\n|\n|  Method resolution order:\n|      InternalError\n|      DatabaseError\n|      Error\n|      MySQLError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors inherited from MySQLError:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.Exception:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n"
                },
                {
                    "name": "class MySQLError",
                    "content": "|  Exception related to operation with MySQL.\n|\n|  Method resolution order:\n|      MySQLError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors defined here:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.Exception:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n"
                },
                {
                    "name": "class NotSupportedError",
                    "content": "|  Exception raised in case a method or database API was used\n|  which is not supported by the database, e.g. requesting a\n|  .rollback() on a connection that does not support transaction or\n|  has transactions turned off.\n|\n|  Method resolution order:\n|      NotSupportedError\n|      DatabaseError\n|      Error\n|      MySQLError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors inherited from MySQLError:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.Exception:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n"
                },
                {
                    "name": "class OperationalError",
                    "content": "|  Exception raised for errors that are related to the database's\n|  operation and not necessarily under the control of the programmer,\n|  e.g. an unexpected disconnect occurs, the data source name is not\n|  found, a transaction could not be processed, a memory allocation\n|  error occurred during processing, etc.\n|\n|  Method resolution order:\n|      OperationalError\n|      DatabaseError\n|      Error\n|      MySQLError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors inherited from MySQLError:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.Exception:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n"
                },
                {
                    "name": "class ProgrammingError",
                    "content": "|  Exception raised for programming errors, e.g. table not found\n|  or already exists, syntax error in the SQL statement, wrong number\n|  of parameters specified, etc.\n|\n|  Method resolution order:\n|      ProgrammingError\n|      DatabaseError\n|      Error\n|      MySQLError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors inherited from MySQLError:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.Exception:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n\nTime = class time(builtins.object)\n|  time([hour[, minute[, second[, microsecond[, tzinfo]]]]]) --> a time object\n|\n|  All arguments are optional. tzinfo may be None, or an instance of\n|  a tzinfo subclass. The remaining arguments may be ints.\n|\n|  Methods defined here:\n|\n|  eq(self, value, /)\n|      Return self==value.\n|\n|  format(...)\n|      Formats self with strftime.\n|\n|  ge(self, value, /)\n|      Return self>=value.\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  gt(self, value, /)\n|      Return self>value.\n|\n|  hash(self, /)\n|      Return hash(self).\n|\n|  le(self, value, /)\n|      Return self<=value.\n|\n|  lt(self, value, /)\n|      Return self<value.\n|\n|  ne(self, value, /)\n|      Return self!=value.\n|\n|  reduce(...)\n|      reduce() -> (cls, state)\n|\n|  reduceex(...)\n|      reduceex(proto) -> (cls, state)\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  dst(...)\n|      Return self.tzinfo.dst(self).\n|\n|  isoformat(...)\n|      Return string in ISO 8601 format, [HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM].\n|\n|      The optional argument timespec specifies the number of additional terms\n|      of the time to include. Valid options are 'auto', 'hours', 'minutes',\n|      'seconds', 'milliseconds' and 'microseconds'.\n|\n|  replace(...)\n|      Return time with new specified fields.\n|\n|  strftime(...)\n|      format -> strftime() style string.\n|\n|  tzname(...)\n|      Return self.tzinfo.tzname(self).\n|\n|  utcoffset(...)\n|      Return self.tzinfo.utcoffset(self).\n|\n|  ----------------------------------------------------------------------\n|  Class methods defined here:\n|\n|  fromisoformat(...) from builtins.type\n|      string -> time from time.isoformat() output\n|\n|  ----------------------------------------------------------------------\n|  Static methods defined here:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  fold\n|\n|  hour\n|\n|  microsecond\n|\n|  minute\n|\n|  second\n|\n|  tzinfo\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  max = datetime.time(23, 59, 59, 999999)\n|\n|  min = datetime.time(0, 0)\n|\n|  resolution = datetime.timedelta(microseconds=1)\n\nTimestamp = class datetime(date)\n|  datetime(year, month, day[, hour[, minute[, second[, microsecond[,tzinfo]]]]])\n|\n|  The year, month and day arguments are required. tzinfo may be None, or an\n|  instance of a tzinfo subclass. The remaining arguments may be ints.\n|\n|  Method resolution order:\n|      datetime\n|      date\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  add(self, value, /)\n|      Return self+value.\n|\n|  eq(self, value, /)\n|      Return self==value.\n|\n|  ge(self, value, /)\n|      Return self>=value.\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  gt(self, value, /)\n|      Return self>value.\n|\n|  hash(self, /)\n|      Return hash(self).\n|\n|  le(self, value, /)\n|      Return self<=value.\n|\n|  lt(self, value, /)\n|      Return self<value.\n|\n|  ne(self, value, /)\n|      Return self!=value.\n|\n|  radd(self, value, /)\n|      Return value+self.\n|\n|  reduce(...)\n|      reduce() -> (cls, state)\n|\n|  reduceex(...)\n|      reduceex(proto) -> (cls, state)\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  rsub(self, value, /)\n|      Return value-self.\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  sub(self, value, /)\n|      Return self-value.\n|\n|  astimezone(...)\n|      tz -> convert to local time in new timezone tz\n|\n|  ctime(...)\n|      Return ctime() style string.\n|\n|  date(...)\n|      Return date object with same year, month and day.\n|\n|  dst(...)\n|      Return self.tzinfo.dst(self).\n|\n|  isoformat(...)\n|      [sep] -> string in ISO 8601 format, YYYY-MM-DDT[HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM].\n|      sep is used to separate the year from the time, and defaults to 'T'.\n|      The optional argument timespec specifies the number of additional terms\n|      of the time to include. Valid options are 'auto', 'hours', 'minutes',\n|      'seconds', 'milliseconds' and 'microseconds'.\n|\n|  replace(...)\n|      Return datetime with new specified fields.\n|\n|  time(...)\n|      Return time object with same time but with tzinfo=None.\n|\n|  timestamp(...)\n|      Return POSIX timestamp as float.\n|\n|  timetuple(...)\n|      Return time tuple, compatible with time.localtime().\n|\n|  timetz(...)\n|      Return time object with same time and tzinfo.\n|\n|  tzname(...)\n|      Return self.tzinfo.tzname(self).\n|\n|  utcoffset(...)\n|      Return self.tzinfo.utcoffset(self).\n|\n|  utctimetuple(...)\n|      Return UTC time tuple, compatible with time.localtime().\n|\n|  ----------------------------------------------------------------------\n|  Class methods defined here:\n|\n|  combine(...) from builtins.type\n|      date, time -> datetime with same date and time fields\n|\n|  fromisoformat(...) from builtins.type\n|      string -> datetime from datetime.isoformat() output\n|\n|  fromtimestamp(...) from builtins.type\n|      timestamp[, tz] -> tz's local time from POSIX timestamp.\n|\n|  now(tz=None) from builtins.type\n|      Returns new datetime object representing current time local to tz.\n|\n|        tz\n|          Timezone object.\n|\n|      If no tz is specified, uses local timezone.\n|\n|  strptime(...) from builtins.type\n|      string, format -> new datetime parsed from a string (like time.strptime()).\n|\n|  utcfromtimestamp(...) from builtins.type\n|      Construct a naive UTC datetime from a POSIX timestamp.\n|\n|  utcnow(...) from builtins.type\n|      Return a new datetime representing UTC day and time.\n|\n|  ----------------------------------------------------------------------\n|  Static methods defined here:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  fold\n|\n|  hour\n|\n|  microsecond\n|\n|  minute\n|\n|  second\n|\n|  tzinfo\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  max = datetime.datetime(9999, 12, 31, 23, 59, 59, 999999)\n|\n|  min = datetime.datetime(1, 1, 1, 0, 0)\n|\n|  resolution = datetime.timedelta(microseconds=1)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from date:\n|\n|  format(...)\n|      Formats self with strftime.\n|\n|  isocalendar(...)\n|      Return a named tuple containing ISO year, week number, and weekday.\n|\n|  isoweekday(...)\n|      Return the day of the week represented by the date.\n|      Monday == 1 ... Sunday == 7\n|\n|  strftime(...)\n|      format -> strftime() style string.\n|\n|  toordinal(...)\n|      Return proleptic Gregorian ordinal.  January 1 of year 1 is day 1.\n|\n|  weekday(...)\n|      Return the day of the week represented by the date.\n|      Monday == 0 ... Sunday == 6\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from date:\n|\n|  fromisocalendar(...) from builtins.type\n|      int, int, int -> Construct a date from the ISO year, week number and weekday.\n|\n|      This is the inverse of the date.isocalendar() function\n|\n|  fromordinal(...) from builtins.type\n|      int -> date corresponding to a proleptic Gregorian ordinal.\n|\n|  today(...) from builtins.type\n|      Current date or datetime:  same as self.class.fromtimestamp(time.time()).\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from date:\n|\n|  day\n|\n|  month\n|\n|  year\n"
                },
                {
                    "name": "class Warning",
                    "content": "|  Exception raised for important warnings like data truncations\n|  while inserting, etc.\n|\n|  Method resolution order:\n|      Warning\n|      builtins.Warning\n|      MySQLError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors defined here:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.Warning:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Warning:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n"
                }
            ]
        },
        "FUNCTIONS": {
            "content": "Binary(x)\n\nConnect(*args, kwargs)\nFactory function for connections.Connection.\n\nConnection = Connect(*args, kwargs)\nFactory function for connections.Connection.\n\nDateFromTicks(ticks)\nConvert UNIX ticks into a date instance.\n\nTimeFromTicks(ticks)\nConvert UNIX ticks into a time instance.\n\nTimestampFromTicks(ticks)\nConvert UNIX ticks into a datetime instance.\n\nconnect = Connect(*args, kwargs)\nFactory function for connections.Connection.\n",
            "subsections": [
                {
                    "name": "debug",
                    "content": "Does a DBUGPUSH with the given string.\nmysqldebug() uses the Fred Fish debug library.\nTo use this function, you must compile the client library to\nsupport debugging.\n"
                },
                {
                    "name": "escape",
                    "content": "escape(obj, dict) -- escape any special characters in object obj\nusing mapping dict to provide quoting functions for each type.\nReturns a SQL literal string.\n"
                },
                {
                    "name": "escape_string",
                    "content": "escapestring(s) -- quote any SQL-interpreted characters in string s.\n\nUse connection.escapestring(s), if you use it at all.\nmysql.escapestring(s) cannot handle character sets. You are\nprobably better off using connection.escape(o) instead, since\nit will escape entire sequences as well as strings.\n"
                },
                {
                    "name": "get_client_info",
                    "content": "getclientinfo() -- Returns a string that represents\nthe client library version.\n"
                },
                {
                    "name": "string_literal",
                    "content": "stringliteral(obj) -- converts object obj into a SQL string literal.\nThis means, any special SQL characters are escaped, and it is enclosed\nwithin single quotes. In other words, it performs:\n\n\"'%s'\" % escapestring(str(obj))\n\nUse connection.stringliteral(obj), if you use it at all.\nmysql.stringliteral(obj) cannot handle character sets.\n"
                }
            ]
        },
        "DATA": {
            "content": "BINARY = DBAPISet({249, 250, 251, 252})\nDATE = DBAPISet({10})\nNUMBER = DBAPISet({0, 1, 3, 4, 5, 8, 9, 13, 246})\nROWID = DBAPISet()\nSTRING = DBAPISet({253, 254, 247})\nTIME = DBAPISet({11})\nTIMESTAMP = DBAPISet({12, 7})\nall = ['BINARY', 'Binary', 'Connect', 'Connection', 'DATE', 'Date'...\napilevel = '2.0'\nparamstyle = 'format'\nthreadsafety = 1\nversioninfo = (1, 4, 6, 'final', 0)\n",
            "subsections": []
        },
        "VERSION": {
            "content": "1.4.6\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Inada Naoki <songofacandy@gmail.com>\n",
            "subsections": []
        },
        "FILE": {
            "content": "/usr/lib/python3/dist-packages/MySQLdb/init.py\n\n",
            "subsections": []
        }
    },
    "summary": "MySQLdb - MySQLdb - A DB API v2.0 compatible interface to MySQL.",
    "flags": [],
    "examples": [],
    "see_also": []
}