Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #7229
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <smackay@flagstonesoftware.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.007 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'schema': 0.07; 'python': 0.08; 'controlled': 0.09; 'skip:f 30': 0.14; '--config': 0.16; 'jython).': 0.16; 'name)': 0.16; 'placeholder': 0.16; 'replaces': 0.16; 'stuart': 0.16; 'url:contrib': 0.16; 'url:fab': 0.16; 'thanks!': 0.16; 'cc:addr:python-list': 0.17; 'source.': 0.19; 'command': 0.19; 'template': 0.19; 'header:In-Reply-To:1': 0.21; 'java': 0.21; 'modify': 0.22; 'cc:2**0': 0.22; 'cc:no real name:2**0': 0.23; 'trying': 0.23; 'deployment': 0.23; 'code': 0.24; 'values': 0.25; 'extract': 0.25; '(and': 0.25; 'changed': 0.25; 'server': 0.29; 'cc:addr:python.org': 0.30; 'config': 0.30; 'deployed': 0.30; 'separate': 0.31; 'django': 0.31; 'done': 0.32; 'app': 0.32; 'source': 0.34; 'file': 0.34; 'option': 0.35; 'header :User-Agent:1': 0.35; 'using': 0.35; 'connection': 0.37; 'running': 0.37; 'similar': 0.37; 'takes': 0.37; 'something': 0.37; 'url:docs': 0.37; 'url:en': 0.37; 'reasons': 0.37; 'subject:Web': 0.37; 'edit': 0.38; 'url:org': 0.38; 'data': 0.38; 'subject:: ': 0.38; 'either': 0.39; 'allows': 0.40; 'production': 0.68; 'received:89': 0.68; 'granted': 0.68; 'url:0': 0.69; 'portugal': 0.84; 'url:api': 0.91 |
| Date | Wed, 08 Jun 2011 11:22:17 +0100 |
| From | Stuart MacKay <smackay@flagstonesoftware.com> |
| User-Agent | Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 |
| MIME-Version | 1.0 |
| To | Burhan <burhan.khalid@gmail.com> |
| Subject | Re: Web Applications - Separating DB Connections |
| References | <00104e8a-a09c-442c-8b74-f64abf8dcce7@l2g2000prg.googlegroups.com> |
| In-Reply-To | <00104e8a-a09c-442c-8b74-f64abf8dcce7@l2g2000prg.googlegroups.com> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-AntiAbuse | This header was added to track abuse, please include it with any abuse report |
| X-AntiAbuse | Primary Hostname - ebony.uk-dns.com |
| X-AntiAbuse | Original Domain - python.org |
| X-AntiAbuse | Originator/Caller UID/GID - [47 12] / [47 12] |
| X-AntiAbuse | Sender Address Domain - flagstonesoftware.com |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.24.1307533616.11593.python-list@python.org> (permalink) |
| Lines | 36 |
| NNTP-Posting-Host | 82.94.164.166 |
| X-Trace | 1307533617 news.xs4all.nl 49184 [::ffff:82.94.164.166]:57468 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:7229 |
Show key headers only | View raw
A simple way to do this is use fabric for deployment. It allows you to upload a file as if it was a template and replaces any placeholder strings with values supplied when you upload. The values can be supplied either in a config file or interactively when the deployment takes place. For my django deployments to a production server I have the database connection information in a config file that is separate from the app source. The name of the config file is passed on the command line when running the deployment. See fabric.contrib.files.upload_template on http://docs.fabfile.org/en/1.0.1/api/contrib/files.html and the --config option on http://docs.fabfile.org/en/1.0.1/usage/fab.html Stuart MacKay Lisbon, Portugal > Hello Everyone: > > I am trying to find a way to extract and remove database connection > information (username, password, schema name) from the application > source. I need to do this because in my organization - for security > reasons - access to databases is controlled by a separate department; > and as such, when a solution is deployed to production - the > authentication credentials for the databases are changed (and not told > to the development team). > > Currently all development is done in Java and with that they have > the ability to publish databases as a service in their application > server; this way users can be granted access to modify the credentials > to the JDBC data source without having to edit source code of the > application being deployed. I am looking for something similar in > Python (short of using Jython). > > Thanks!
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Web Applications - Separating DB Connections Burhan <burhan.khalid@gmail.com> - 2011-06-08 00:46 -0700
Re: Web Applications - Separating DB Connections Stuart MacKay <smackay@flagstonesoftware.com> - 2011-06-08 11:22 +0100
Re: Web Applications - Separating DB Connections Burhan <burhan.khalid@gmail.com> - 2011-06-08 07:19 -0700
Re: Web Applications - Separating DB Connections Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-06-09 00:06 -0700
csiph-web