Package gensaschema :: Module _schema :: Class Schema
[frames] | no frames]

Class Schema

source code

object --+
         |
        Schema

Schema container
Instance Methods
 
__init__(self, conn, tables, schemas, symbols, dbname=None, types=None)
Initialization
source code
 
dump(self, fp)
Dump schema module to fp
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, conn, tables, schemas, symbols, dbname=None, types=None)
(Constructor)

source code 
Initialization
Parameters:
  • conn (Connection or Engine) - SQLAlchemy connection or engine
  • tables (list) - List of tables to reflect, (local name, table name) pairs
  • schemas (dict) - schema -> module mapping
  • symbols (Symbols) - Symbol table
  • dbname (str) - Optional db identifier. Used for informational purposes. If omitted or None, the information just won't be emitted.
  • types (callable) - Extra type loader. If the type reflection fails, because SQLAlchemy cannot resolve it, the type loader will be called with the type name, (bound) metadata and the symbol table. It is responsible for modifying the symbols and imports and the dialect's ischema_names. If omitted or None, the reflector will always fail on unknown types.
Overrides: object.__init__

dump(self, fp)

source code 
Dump schema module to fp
Parameters:
  • fp (file) - File to write to