source: TI10-WorkingGrid/trunk/CEDAR_specific/db_funcs.py @ 1675

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI10-WorkingGrid/trunk/CEDAR_specific/db_funcs.py@1675
Revision 1675, 420 bytes checked in by selatham, 13 years ago (diff)

further development

Line 
1#!/usr/bin/env python
2
3# functions for use with postgresdb2moles.py
4
5# db setup
6import pgdb
7
8def db_connect():
9        # Open a Postgres database connection
10        DATABASE = 'cedarmolesdev'
11        HOST     = 'chinook.badc.rl.ac.uk'
12        USER     = 'ndgadmin'
13        PW       = 'xxxxxxx'
14        SCHEMA   = 'ndgb'
15        connection_string = HOST + ':' + DATABASE + ':' + USER + ':' + PW
16        connection = pgdb.connect(connection_string)
17        return connection
18
19
20
Note: See TracBrowser for help on using the repository browser.