桌面Python应用程序与在线存储(Desktop Python App with Online Storage)

编程入门 行业动态 更新时间:2024-10-10 17:29:02
桌面Python应用程序与在线存储(Desktop Python App with Online Storage)

在我开始研究之前,我正在寻找'健全性检查',因为我刚开始编写服务器端代码。 如果可能的话,我想坚持使用Python,因为这就是我以前的习惯!

我编写了一个桌面应用程序(wxPython),允许非现场员工记录他们的工作时间,其结果是他们当前通过电子邮件发送给公司的。 我希望能够让他们将数据直接保存到“在线”位置,公司可以从中获取摘要数据。

根据我的阅读(主要是在StackOverflow上),我认为我应该做以下事情:

仅在本地访问的服务器上运行数据库(我赞成RethinkDB ...) 编写一个可以访问数据库的Python服务器应用程序,但只公开每个用户所需的功能。 可能为用户,工资单和管理员(我)提供不同的端口。 用TLS固定插座。 将代码添加到桌面应用程序以访问服务器。

这是一个很好的方法,还是我重新发明轮子,应该学会使用Django或其他一些Web框架?

I am looking for a 'sanity check' before I start working on this, as I'm new to writing server-side code. I want to stick to Python if possible, since that's what I'm used to!

I have written a desktop app (wxPython) that allows offsite employees to record their working times, the results of which they currently email to the company. I want to be able to have them save data directly to an 'online' location, from which the company can get summary data.

From what I have read (mostly here on StackOverflow) leads me to think I should do the following:

Run a database on the server with local access only (I'm favouring RethinkDB...) Write a Python server app that can access the database but only exposes the functionality needed per user. Probably with different ports for users, payroll, and admin (me). Secure the sockets with TLS. Add code to the desktop app to access the server.

Is this a good approach, or am I reinventing wheels and should learn to use Django or some other web framework?

最满意答案

正如Paulo Almeida在撰写REST应用程序的评论中建议的那样,您与wxPython应用程序的接口可能就是您的选择。 对于这个django可能是一个解决方案,但它可能是一个过度的微框架 ,如web.py , 烧瓶或瓶子就够了,更容易掌握

As Paulo Almeida suggested in the comments making a REST application you interface with your wxPython application is probably the way to go. For this django may be a solution but it is probably an overkill microframework such as web.py, flask or bottle is enough and more easier to grasp

更多推荐

本文发布于:2023-07-30 14:01:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1338830.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:在线   应用程序   桌面   Python   Storage

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!