谷歌应用程序引擎的Python Web框架

发布于 2024-12-08 05:13:03 字数 1539 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

我三岁 2024-12-15 05:13:03

更新:这个答案现在已经过时了。

对我来说,选择是 djangoappengine

它是 django 项目的一个分支,专为 Google App Engine 和 MongoDB 等非 SQL 数据库而设计。它的主要好处是您可以利用 django 项目中所有很酷的东西,同时还可以在 GAE 的可扩展架构上运行。另一个好处是,使用 djangoappengine,您可以比直接使用 App Engine 更轻松地脱离 App Engine(尽管这可能说起来容易做起来难)。

有传言称 Django 会将这些更改合并到主线 Django 项目中,但尚未发生(截至 2014 年 5 月)。

一些相关链接:

UPDATE: This answer is now out of date.

For me the choice is djangoappengine.

It's a fork of the django project made specifically for no-sql databases like Google App Engine and MongoDB. The main benefit of it is that you get to piggy-back on all the cool stuff coming out of the django project, while also running on GAE's scalable architecture. Another benefit is that with djangoappengine, you can more easily move off of App Engine than if you used their API directly (although that is probably easier said than done).

There were rumors that Django would merge the changes into the mainline Django project, but it has not happened yet (as of May 2014).

Some relevant links:

罗罗贝儿 2024-12-15 05:13:03

我个人很喜欢使用以下模板在 App Engine 上使用 Flask:
https://github.com/kamalgill/flask-appengine-template

代码组织良好这个模板非常好,它包含许多不错的开发功能,例如分析和应用程序统计信息。

I personally have enjoyed using Flask on App Engine using this template:
https://github.com/kamalgill/flask-appengine-template

The code is organized pretty well in this template and it includes many of the nice development features like profiling and app stats.

温暖的光 2024-12-15 05:13:03

如果你想构建大型应用程序并需要更灵活的框架,那么你可以看看

Pyramid Python框架

以前它被称为Pylons。有很多优秀的公司使用这个框架。

您可以在其网站上找到有关将其部署到 appengine 的过程的说明: http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/deployment/gae_buildout.html 该过程使用构建还包括本地测试环境。

If you want to build large scale application and need a more flexible framework, then you can take a look at

Pyramid Python Framework

Previously it was called Pylons. There are lot of good companies using this framework.

You can find instructions for the process of deploying it to appengine on their website: http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/deployment/gae_buildout.html The process uses buildout and also includes a local testing environment.

送舟行 2024-12-15 05:13:03

我对这个样板非常满意:

https://github.com/coto/gae-boilerplate

看看它的功能和特点,很齐全!

I'm very happy with this boilerplate:

https://github.com/coto/gae-boilerplate

Take a look at its functions and features, it's very complete!

迷你仙 2024-12-15 05:13:03

(请注意,此答案已过时,不再有效。)


阅读 Tom Willis 对问题的评论以及 这个问题的接受的答案我注意到webapp/webapp2看起来很有希望。

  • 谷歌做出了一定程度的承诺
  • 没有必要为现有的 SDK 处理程序创建和维护自己的版本
  • 有一些库是使用 App Engine 创建的,它们基于 webapp,需要端口或适配器才能与其他框架一起
  • 使用可以在 appengine 外部使用
  • 单元测试易于设置和记录在此处

(Note that this answer is old and no longer valid.)


After reading Tom Willis' comment on the question and also this SO question's accepted answer I noticed that webapp/webapp2 looks promising.

  • There's some level of commitment from google
  • It is not necessary to create and maintain own versions for existing SDK handlers
  • There are libraries that were created with App Engine in mind which are based on webapp and would need a port or adapter to work with other frameworks
  • It can be used outside appengine
  • Unit testing is easy to setup and documented here
愁杀 2024-12-15 05:13:03

我编写了 GAEStarterKit,旨在让您尽快上手。它与 GAE-Boilerplate 或 gae-init 等项目类似,但有一些关键区别:

  • 首先也是最明显的,我使用了 UIKit 通过 HTML5 样板。 Boilerplate 是一个不错的选择,显然受欢迎程度会带来额外的好处,但为了快速入门,我发现 uikit 更“完整”一些。
  • 我投入了大量的工作来确保用户登录/注册系统尽可能经过深思熟虑。用户可以拥有多个电子邮件地址、多种身份验证方法,并与多个租户关联(如果适用)。非 Google 用户的社交登录端是通过 Authomatic 完成的,这是一个很棒的项目,非常好- 支持。
  • 虽然它的边缘有点粗糙,但我做了一些与 Django 的 GenericViews 非常相似的东西,但在 Flask 和 GAE 模型中。我为此使用了 WTForms 集成,因此它开箱即用,运行良好。它当然不完美,但已经相当不错了。
  • 我真的很认真地考虑过不再重复自己的想法。例如在 gae-init 中,您会发现很多 CRUD 代码。对于管理端,您可以通过一次导入和一个功能将模型添加到 GAEStarterKit 中的管理 GUI。

可能值得考虑。

I wrote GAEStarterKit, which aims to get you up to speed as quickly as possible. It's in a similar vain to projects like GAE-Boilerplate or gae-init, but a few key differences:

  • First and most obvious, I used UIKit over HTML5 Boilerplate. Boilerplate is a great choice, and obviously is popularity comes with perks, but for the purposes of getting started quickly, I find uikit a bit more "complete."
  • I put a lot of work into making sure the user login/registration system is as well-thought-out as possible. Users can have multiple email addresses, multiple authentication methods, and be associated with multiple tenants, if applicable. The social login side for non-Google users is done via Authomatic, which is a great project and very well-supported.
  • Although it's a little rough around the edges, I did something pretty similar to Django's GenericViews, but in Flask and with GAE Models. I used WTForms integration for that, so it all works pretty well out of the box. It's certainly not perfect, but it's pretty good.
  • I really took seriously the idea of not repeating myself. For example in gae-init, you'll find a lot of CRUD code. For the admin side, you can add a model to your admin GUI in GAEStarterKit with one import, and one function all.

Might be worth considering.

很酷又爱笑 2024-12-15 05:13:03

我很喜欢

http://ferris-framework.appspot.com/

专门为 GAE 编写的 。总的来说,我喜欢 Django,但不喜欢 gae,我觉得使用 django-nonrel 仍然需要太多警告,因此不值得。

I am enjoying

http://ferris-framework.appspot.com/

which was written specifically for GAE. I love Django in general, but not for gae, I felt using django-nonrel still requires too many caveats that it is not worth it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文