我们可以利用 encode/databases 来在FastAPI中支持数据库的异步访问。

兼容以下数据库:

  • PostgreSQL
  • MySQL
  • SQLite

实际中暂未用到,这部分待完善。

 

参考文档:

https://github.com/encode/databases

https://fastapi.tiangolo.com/advanced/async-sql-databases/

相关文章:

  • 2022-12-23
  • 2022-02-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-26
  • 2021-12-19
  • 2022-12-23
  • 2021-11-07
  • 2021-09-22
相关资源
相似解决方案