快速与到SQLAlchemy的CRUD接口? [英] Quick & dirt CRUD interface to SQLAlchemy?

查看:81
本文介绍了快速与到SQLAlchemy的CRUD接口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究要在业务逻辑Web应用程序的未来开发中使用的软件组件。它会用Python编写,我们将SQLAlchemy定位为ORM。该应用程序将通过HTTP上的类似REST的界面被其他软件应用程序使用,该部分可能使用web.py。

I'm researching software components to use in a future development of a business logic web application. It's gonna be written in Python and we are targeting SQLAlchemy as ORM. The app will be used by other software apps via a REST-like interface over http, possibly using web.py for that part.

用于调试,维护等,我们需要不能直接访问MySQL数据库,但是考虑到SQLAlchemy建模的数据库的丰富结构,对于标准任务来说phpmyadmin太底层了,所以我正在寻找一个遵循我们SA模型的简单CRUD接口。它可能是一个Web应用程序,也可能是本地(X11或任何其他版本)应用程序,应该花尽可能少的时间来实现。

For debugging, maintenance, etc we need to directly access the MySQL database but phpmyadmin is too low-level for standard tasks given the rich structure of the db modeled by SQLAlchemy, so I'm looking around for an easy CRUD interface that follows our SA models. It could be a webapp or a local (X11 or whatever) app, and should take as little time as possible to implement.

到目前为止,在我进行了一些谷歌搜索之后,我发现 Camelot (Qt App)和 RUM (WSGI网络应用程序)。
Camelot基于 Elixir ,如果我们在项目中也使用它,我们应该能够要在我们的应用程序和Camelot之间共享模型定义,只需在各处添加一些特定于骆驼的东西,我们就应该毫不费力地拥有一个Qt界面。另一端的
RUM似乎基于声明性,我们可能也应该基于此来利用RUM。我尚不清楚要使用RUM获得可正常使用的Web界面需要付出多少努力。

So far after some googling I've found Camelot (Qt App) and RUM (WSGI webapp). Camelot is based over Elixir, and if we use it in our project too we should be able to share the model definition between our app and Camelot, just adding some camelot specific stuff here and there and we should end up having a Qt interface with little effort. RUM on the other end seems to be based on declarative, and we should probably base our app on that too to leverage RUM. It's not yet clear to me how much effort should be added to get a working web interface using RUM.

我想知道是否有人对Camelot和/或有经验或RUM共享,如果使用两者之一,则意味着需要使用其声明性层(Elixir或声明性层)来共享模型代码而无需重新实现。

I'd like to know if anyone has experience with Camelot and/or RUM to share, and if using one of the two implies the need to use its declarative layer (either Elixir or, well, declarative) to be able to share the model code without reimplementing it.

也非常欢迎获得CRUD接口的任何其他建议。

Also any other recommendation to get a CRUD interface will be really welcome.

推荐答案

尽管Camelot示例是基于Elixir,Camelot与Elixir无关,因此您也可以使用声明式来定义模型。实际上,Camelot也可以用于显示普通的旧python对象。

although the Camelot examples are based on Elixir, Camelot is not tied to Elixir, so you could as well use declarative to define your model. In fact Camelot can be used to display plain old python objects as well.

这篇关于快速与到SQLAlchemy的CRUD接口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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