Database.__init__¶
- Database.__init__(config_file: Optional[str] = None, host: Optional[str] = None, port: Optional[int] = None, database: Optional[str] = None, user: Optional[str] = None, passfile: Optional[str] = None)[source]¶
Initializes the
Databaseobject. If aconfiguration file nameis given, the constructor calls the methodconfig()and overrides the default attributes- Parameters
- Raises
configparser.Error – If a configuration file name was given, the method
config()can fail raising this exception.