一个用于谷歌应用引擎的python web框架。

时间:2021-02-23 23:14:37

(Please note that this question and some of the answers are old)

(请注意,这个问题和一些答案已经过时了)


I want to use an existing python framework to develop an application on google appengine.

我想使用现有的python框架来开发谷歌appengine上的应用程序。

It should be quick and easy to start and support test driven development practices in an easy way.

以一种简单的方式启动和支持测试驱动的开发实践应该是快速和容易的。

Can you recommend a stack? What about django?

你能推荐一个堆栈吗?django呢?


Additional Information:

附加信息:

There are several django ports, but the * questions are already old. There were several django/appengine solutions, I do not know which one is currently leading. (This is now outdated, see accepted answer and also the other answers).

有几个django端口,但是*问题已经过时了。有几个django/appengine解决方案,我不知道哪个解决方案目前领先。(这已经过时了,请参阅已接受的答案和其他答案)。

But also other frameworks are interesting, not only django.

而且其他框架也很有趣,不仅仅是django。

What also sounds good but is not a condition is the possibility to run the app on the framework and the appengine and maybe later run it on a self hosted (noSql-) version of this framework (which maybe could be django, or maybe somehting else).

听起来不错,但不是条件是在框架和appengine上运行应用程序的可能性,之后可能会在这个框架的自托管(noSql-)版本上运行它(可能是django,或者可能是其他的)。

7 个解决方案

#1


3  

For me the choice is djangoappengine.

对我来说,选择是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).

它是django项目的一个分支,专门为像谷歌应用引擎和MongoDB这样的无sql数据库。它的主要好处是,您可以在使用GAE的可伸缩架构的同时,利用django项目带来的所有酷东西。另一个好处是,使用djangoappengine,与直接使用它们的API相比,您可以更容易地退出应用程序引擎(尽管这可能说起来容易做起来难)。

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

有传言称,Django将把这些变更合并到主线Django项目中,但到2014年5月还没有发生。

Some relevant links:

一些相关的链接:

#2


2  

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

我个人很喜欢使用这个模板:https://github.com/kamalgill/flask-appengine模板。

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

该代码在这个模板中组织得非常好,它包含了许多优秀的开发特性,如概要分析和应用程序统计。

#3


2  

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

如果您希望构建大型应用程序,并且需要一个更灵活的框架,那么您可以查看一下。

Pyramid Python Framework

金字塔Python框架

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.

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

#4


2  

I'm very happy with this boilerplate:

我对这个样板很满意:

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

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

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

看看它的功能和特点,它是非常完整的!

#5


2  

(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.

在阅读了Tom Willis关于这个问题的评论之后,我注意到webapp/webapp2看起来很有前途。

  • There's some level of commitment from google
  • 谷歌有一定程度的承诺
  • It is not necessary to create and maintain own versions for existing SDK handlers
  • 不需要为现有的SDK处理程序创建和维护自己的版本
  • 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
  • 有一些库是基于应用程序引擎创建的,它们基于webapp,需要一个端口或适配器来与其他框架协同工作。
  • It can be used outside appengine
  • 可以在appengine外使用。
  • Unit testing is easy to setup and documented here
  • 单元测试在这里很容易设置和记录

#6


1  

I am enjoying

我享受

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

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.

这是专门为GAE编写的。我喜欢《被解救的姜戈》,但不喜欢gae,我觉得使用Django -nonrel仍然需要太多的说明,说明它不值得。

#7


1  

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:

我写了GAEStarterKit,它的目的是让你尽快达到速度。它与GAE-Boilerplate或gae-init等项目类似,但有几个关键区别:

  • 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."
  • 首先,也是最明显的,我在HTML5样板中使用了UIKit。样板是一个很好的选择,显然流行伴随着额外津贴,但是为了快速开始,我发现uikit更“完整”一些。
  • 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.
  • 我做了很多工作,以确保用户登录/注册系统是尽可能周全的。用户可以有多个电子邮件地址、多个身份验证方法,如果适用,还可以与多个租户关联。非google用户的社交登录端是通过Authomatic完成的,这是一个很棒的项目,并且得到了很好的支持。
  • 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.
  • 尽管有点粗糙,但我在Flask和GAE模型中做了一些与Django的通用视图非常相似的事情。我使用WTForms集成,所以这一切都很好用。它当然不是完美的,但它非常好。
  • 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.
  • 我真的很认真地考虑过不重复自己的想法。例如,在gae-init中,您将发现许多CRUD代码。对于管理方面,您可以在GAEStarterKit中为管理GUI添加一个模型,其中包含一个导入和一个全部功能。

Might be worth considering.

可能值得考虑。

#1


3  

For me the choice is djangoappengine.

对我来说,选择是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).

它是django项目的一个分支,专门为像谷歌应用引擎和MongoDB这样的无sql数据库。它的主要好处是,您可以在使用GAE的可伸缩架构的同时,利用django项目带来的所有酷东西。另一个好处是,使用djangoappengine,与直接使用它们的API相比,您可以更容易地退出应用程序引擎(尽管这可能说起来容易做起来难)。

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

有传言称,Django将把这些变更合并到主线Django项目中,但到2014年5月还没有发生。

Some relevant links:

一些相关的链接:

#2


2  

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

我个人很喜欢使用这个模板:https://github.com/kamalgill/flask-appengine模板。

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

该代码在这个模板中组织得非常好,它包含了许多优秀的开发特性,如概要分析和应用程序统计。

#3


2  

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

如果您希望构建大型应用程序,并且需要一个更灵活的框架,那么您可以查看一下。

Pyramid Python Framework

金字塔Python框架

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.

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

#4


2  

I'm very happy with this boilerplate:

我对这个样板很满意:

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

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

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

看看它的功能和特点,它是非常完整的!

#5


2  

(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.

在阅读了Tom Willis关于这个问题的评论之后,我注意到webapp/webapp2看起来很有前途。

  • There's some level of commitment from google
  • 谷歌有一定程度的承诺
  • It is not necessary to create and maintain own versions for existing SDK handlers
  • 不需要为现有的SDK处理程序创建和维护自己的版本
  • 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
  • 有一些库是基于应用程序引擎创建的,它们基于webapp,需要一个端口或适配器来与其他框架协同工作。
  • It can be used outside appengine
  • 可以在appengine外使用。
  • Unit testing is easy to setup and documented here
  • 单元测试在这里很容易设置和记录

#6


1  

I am enjoying

我享受

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

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.

这是专门为GAE编写的。我喜欢《被解救的姜戈》,但不喜欢gae,我觉得使用Django -nonrel仍然需要太多的说明,说明它不值得。

#7


1  

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:

我写了GAEStarterKit,它的目的是让你尽快达到速度。它与GAE-Boilerplate或gae-init等项目类似,但有几个关键区别:

  • 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."
  • 首先,也是最明显的,我在HTML5样板中使用了UIKit。样板是一个很好的选择,显然流行伴随着额外津贴,但是为了快速开始,我发现uikit更“完整”一些。
  • 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.
  • 我做了很多工作,以确保用户登录/注册系统是尽可能周全的。用户可以有多个电子邮件地址、多个身份验证方法,如果适用,还可以与多个租户关联。非google用户的社交登录端是通过Authomatic完成的,这是一个很棒的项目,并且得到了很好的支持。
  • 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.
  • 尽管有点粗糙,但我在Flask和GAE模型中做了一些与Django的通用视图非常相似的事情。我使用WTForms集成,所以这一切都很好用。它当然不是完美的,但它非常好。
  • 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.
  • 我真的很认真地考虑过不重复自己的想法。例如,在gae-init中,您将发现许多CRUD代码。对于管理方面,您可以在GAEStarterKit中为管理GUI添加一个模型,其中包含一个导入和一个全部功能。

Might be worth considering.

可能值得考虑。