Project source code layout?

Allen Fowler allen.fowler at yahoo.com
Wed Jun 3 14:54:52 EDT 2009


Hello,

I'm new to Python, and am looking for some suggestions as to the source code layout for a new project.

The project will be a tg/pylons daemon, a static website, and a collection of other scripts that will interact with the app and DB.

Here is what I am thinking so far:

root_folder/
- app/ -- Code for pylons/TG web app
- web/ -- Public static web files (and wsgi / fastCGI connector files)
- db/ -- SQlite DB
- scripts/ -- Various custom programs that will also interact with the DB / app. (Some cron, some interactive.)
- config/ -- 3-rd party API tokens, DB parameters, etc.

However, I am still wondering about a few items:

1) Where to create the virtualpython installation that will be used by both the app and the scripts. 

2) Where to put our in-house created python modules so that they can be imported by both the TG app and our own scripts.

3) How to cleanly provide the various config settings to both the web app and scripts. 

Any suggestions? ideas?

fwiw, I am planing on keeping the whole thing in a Mercurial repository.

Thank you,
Allen
:)


      




More information about the Python-list mailing list