aiohttp是否有ORM? [英] Does aiohttp have ORM?

查看:91
本文介绍了aiohttp是否有ORM?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

相对较新的Python 3 aiohttp 库包含客户端/服务器.它包含ORM吗? 如果不是,是否可以将其与第三方ORM一起使用? 如果不可能-可以将其用于哪个目的?我并不是说没有ORM不能编写应用程序,但是Python框架的大量浪费支持了该应用程序,而开发人员已经习惯了这种编程风格.

There is relatively new Python 3 aiohttp library that contains client/server. Does it contain ORM? If not - is it possible to use it with 3-rd party ORM? If not possible - for which purpose it could be used? I don't mean that app could not be written without ORM, but major waste of Python Frameworks support it and developers are used to such style of programming.

推荐答案

简短答案-aiohttp还没有ORM.

Short answer -- aiohttp has no ORM yet.

您可以对aiopg驱动程序使用类似SQLAlchemy的查询,请参见示例

You can use SQLAlchemy-like queries for aiopg driver, see example

同样适用于aiomysql.

The same is available for aiomysql.

该支持不是完整的对象关系映射,而仅是使SQL查询更轻松的助手.

The support is not full-fledged Object-Relational Mapping but only helpers for making SQL queries easier.

这篇关于aiohttp是否有ORM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆