views:

187

answers:

2

Hi,

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!

+1  A: 

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.

Marcelo Cantos
A: 

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.

Benjamin