简体   繁体   中英

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM