def __init__(self, table_name, **fields_or_indexes):
        """
        create an instance

        every Orm should have a .schema attribute that is an instance of this class

        example --

            schema = Schema(
                "table_name"
                field1=Field(int, True),
                field2=Field(str),
                index_fields=Index("field1", "field2")
            )

        table_name -- string -- the table name
        **fields_or_indexes -- a dict of field name or index keys with tuple values, see __getattr__ for more details
        """
        self.fields = {}
        self.indexes = {}
        self.table_name = str(table_name)

        for name, val in fields_or_indexes.items():
            self.set(name, val)
def __init__ ( self , table_name , ** fields_or_indexes ) : self . fields = { } self . indexes = { } self . table_name = str ( table_name ) for name , val in fields_or_indexes . items ( ) : self . set ( name , val )
create an instance

        every Orm should have a .schema attribute that is an instance of this class

        example --

            schema = Schema(
                "table_name"
                field1=Field(int, True),
                field2=Field(str),
                index_fields=Index("field1", "field2")
            )

        table_name -- string -- the table name
        **fields_or_indexes -- a dict of field name or index keys with tuple values, see __getattr__ for more details