开发者

The anatomy of a Python web project: development, packaging, deployment

I'm new to Python (from Java+Ant) and was wondering if someone could detail how to best use Fabric+Pip+Virtualenv to set up a Python web application package skeleton.

The end goal is to be able to do any of the following with a single command:

  • Set up a development environment on a fresh dev bo开发者_Python百科x (installing all deps)
  • Run all tests
  • Package and deploy to staging
  • Deploy staging to production
  • Other typical dev flow tasks: migrate schema, etc.

I'm using Debian+git+Tornado, but I'd like to keep this OS/SCM/framework agnostic if possible.

I've done some searching but I'm yet to find something definitive that covers this from top to bottom. I would find this very helpful, I imagine there are a few other ex-Java/PHP/whatever guys out there who would too.

Thanks!


Check out my answer here. It doesn't address all of your questions (mostly the first bullet-point, in fact), but hopefully it gets you started.


Keeping it framework agnostic will probably be quite hard.

But maybe you'll find the following paster templates (for Django projects though) quite useful too. http://morethanseven.net/2010/03/28/More-django-project-templates.html

Though Paster has quite a learning curve (at least from my point of view), it'll cover your needs for "project skeletons" quite nicely. Actually, with Paster templates, you can achieve similar things to what Maven Archetypes do for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜