phpMyAdmin 在 python 中等效吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1480453/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-03 22:22:10  来源:igfitidea点击:

phpMyAdmin equivalent in python?

pythonphpmyadmin

提问by Rob Powell

Is there a python equivalent of phpMyAdmin?

是否有相当于 phpMyAdmin 的 Python?

Here's why I'm looking for a python version of phpmyadmin: While I agree that phpmyadmin really rocks, I don't want to run php on my server. I'd like to move from apache2-prefork to apache2-mpm-worker. Worker blows the doors off of prefork for performance, but php5 doesn't work with worker. (Technically it does, but it's far more complicated.) The extra memory and performance penalty for having php on this server is large to me.

这就是为什么我要寻找 phpmyadmin 的 Python 版本的原因:虽然我同意 phpmyadmin 确实很强大,但我不想在我的服务器上运行 php。我想从 apache2-prefork 转移到 apache2-mpm-worker。工人为了性能而关闭了 prefork 的门,但 php5 不适用于工人。(技术上确实如此,但要复杂得多。)在此服务器上安装 php 的额外内存和性能损失对我来说很大。

回答by Graviton

You can use phpMyAdmin for python project, because phpMyAdmin is meant for MySQL databases. If you are using MySQL, then regardless of whether you are using PHP or python, you can use phpMyAdmin.

您可以将 phpMyAdmin 用于 python 项目,因为 phpMyAdmin 用于 MySQL 数据库。如果您使用的是 MySQL,那么无论您使用的是 PHP 还是 Python,您都可以使用 phpMyAdmin。

回答by Alexis Benoist

I don't think there is an alternative to phpMyAdmin. pythonMyAdmindoesn't seems mature.

我认为 phpMyAdmin 没有替代品。pythonMyAdmin似乎不成熟。

The philosophy in python is to create the databease with the ORM and after to manage it through the web framework admin page (like the one in Django).

Python 的理念是使用 ORM 创建数据库,然后通过 Web 框架管理页面(如 Django 中的页面)管理它。

A lightweight alternative is using Flaskand Flask-Adminwith a SQLAlchemy model.

一个轻量级的替代方案是将FlaskFlask-Admin与 SQLAlchemy 模型一起使用。

回答by P. Stallworth

I'm basing my answer off the last sentence of your question, "[the] extra memory and performance penalty for having php on this server", because it sounds like you don't want php on that server, even though "phpmyadmin rocks". From that, I would suggest using phpMyAdmin to manage the MySQL database remotely, which you can find an example of here.

我的回答基于您问题的最后一句话,“[在此服务器上安装 php 的额外内存和性能损失”,因为听起来您不希望在该服务器上安装 php,即使“phpmyadmin 摇摆不定” ”。因此,我建议使用 phpMyAdmin 远程管理 MySQL 数据库,您可以在此处找到示例。

回答by Jonathan

There isn't anything pre-existing, but there are tutorials which tell you how to make one which might be a little time consuming, but it's also educational.

没有任何预先存在的东西,但是有一些教程会告诉您如何制作一个,这可能有点耗时,但也很有教育意义。

Here's one method using PyQT

这是使用 PyQT 的一种方法

https://www.tutorialspoint.com/pyqt/pyqt_database_handling.htm

https://www.tutorialspoint.com/pyqt/pyqt_database_handling.htm

Here's another

这是另一个

http://apprize.info/python/gui/7.html

http://apprize.info/python/gui/7.html

I'm not sure if any of those work but I might try to make them and see if i can make one to manage a lot of rows. I'm not sure if I can do it or not but we'll see. I've never even tried to make a python GUI before with any GUI package.

我不确定这些是否有效,但我可能会尝试制作它们,看看我是否可以制作一个来管理很多行。我不确定我是否能做到,但我们拭目以待。我以前从未尝试过使用任何 GUI 包制作 Python GUI。