Advertisement
Guest User

Untitled

a guest
Apr 9th, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. creds = json.loads(os.getenv('VCAP_SERVICES', '{}'))['hana'][0]['credentials']
  2. connection = dbapi.connect(
  3.     port=int(creds['port']),
  4.     address=creds['host'],
  5.     user=creds['user'],
  6.     password=creds['password'],
  7.     sslTrustStore=creds['certificate'],
  8.     sslCryptoProvider='openssl',
  9.     currentSchema=creds['schema'],
  10.     encrypt=True
  11. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement