Best Python code snippet using localstack_python
async_sqlite.py
Source:async_sqlite.py
...64 import sqlite36566 Error = sqlite3.Error6768 def init_async(self, conn_class=AsyncSqliteConnection):69 if not aiosqlite:70 raise Exception("Error, aiosqlite is not installed!")71 self._async_conn_cls = conn_class7273 @property74 def connect_kwargs_async(self):75 return {**self.connect_kwargs}7677 async def last_insert_id_async(self, cursor, model):78 """Get ID of last inserted row.79 """80 if model._meta.auto_increment:81 return cursor.lastrowid828384class SqliteDatabase(AsyncSqliteMixin, peewee.SqliteDatabase):85 def init(self, database, **kwargs):86 super().init(database, **kwargs)87 self.init_async()888990class SqliteExtDatabase(SqliteDatabase, sqlite_ext.SqliteExtDatabase):
...
_db.py
Source:_db.py
...15 )16async def init_databases(config):17 """18 Usage example19 DBS["clickhouse"] = await ClickHouse.init_async(config["clickhouse"])20 DBS["mysql"] = await MySQL.init_async(config["mysql"])21 """22 logger.info("ÐодклÑÑаемÑÑ Ðº ÐÐ")23 DBS["mysql"] = await MySQL.init_async(config["mysql"])24 DBS["mysql_write"] = await MySQL.init_async(config["mysql_write"])25 DBS["mongo_epool_admin"] = await MongoDB.init_async(26 config["mongodb"], db_name="epool_admin"27 )28 DBS["mongo_delivery_lists"] = await MongoDB.init_async(29 config["mongodb"], db_name="delivery_lists"30 )31 DBS["mongo_epool_admin_sync"] = MongoDB.init(32 config["mongodb"], db_name="epool_admin"33 )34 # TODO: ÑинÑ
ÑÐ¾Ð½Ð½Ð°Ñ ÑабоÑа Ñ dadata35 DBS["dadata"] = Dadata(**config["dadata"])36 DBS["delivery_calc"] = DeliveryCalcWrapper(37 api_url=config["delivery_calc"]["prod_url"],38 test_api_url=config["delivery_calc"]["test_url"],39 )40 logger.info("ÐодклÑÑÐµÐ½Ð¸Ñ Ðº ÐÐ ÑозданÑ")41async def shutdown_databases():42 """...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!