Open TheHonestBob opened 1 month ago
The simplest way is to define conn and cursor in the initialization method, but it fails because the init method cannot be asynchronous
无
I only want to connect to the database once for a FastAPI service, rather than having to connect to the database every time a request is made
$ python --version python = 3.9
$ python -m pip show aiomysql 0.2.0
$ python -m pip show PyMySQL 1.1.0
$ python -m pip show sqlalchemy
linux
SELECT VERSION(); 无
No response
Describe the bug
The simplest way is to define conn and cursor in the initialization method, but it fails because the init method cannot be asynchronous
To Reproduce
无
Expected behavior
I only want to connect to the database once for a FastAPI service, rather than having to connect to the database every time a request is made
Logs/tracebacks
Python Version
aiomysql Version
PyMySQL Version
SQLAlchemy Version
OS
linux
Database type and version
Additional context
No response
Code of Conduct