Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import cx_Oracle
username = "user"
password = "pass"
database = "tnsname"
con = cx_Oracle.connect(username, password, database)
cur = con.cursor()
@timfreund
timfreund / pseudoquery.py
Created July 25, 2014 21:36
Run a query against a raw connection from SQLAlchemy
from sqlalchemy import create_engine
class SQLKeyring:
"""A SQLKeyring object provides a tiny bit of glue between
the secure credential storage of the Python Keyring Lib and
the database connectivity of SQLAlchemy
"""
def get_connection_url(self, name):
return self.keyring.get_password('sqlkeyring', name)
@timfreund
timfreund / execute_tests.sh
Created July 13, 2014 18:26
fig config and glue for kallithea ci
#!/usr/bin/env bash
set -x
here=`dirname $0`
env
python ${here}/fig-config-glue.py ${here}/../test.ini
sleep 10
nosetests