pycharmers.sdk.sqlite module¶
-
class
pycharmers.sdk.sqlite.
PycharmersSQLite
(database: Optional[str] = None, verbose: bool = False)[source]¶ Bases:
pycharmers.sdk.base.PycharmersSQL
Wrapper class for Sqlite.
- Parameters
database (Optional[str], optional) – database to use. Defaults to
None
.verbose (bool, optional) – Whether to print message or not Defaults to
False
.
-
connect
(func: Callable, database: Optional[str] = None, **kwargs) → Optional[Union[pandas.core.frame.DataFrame, Tuple[tuple]]][source]¶ Use
MySQLdb.connect
to create a connection to the database, and close it after excutingfunc
.- Parameters
func (Callable) – The function you want to execute. Receive
cursor
as the first argument.database (Optional[str], optional) – database to ues. Defaults to
None
.kwargs (dict) – See a table below.
- Returns
Return value of
func
- Return type
Any