LoginSignup
1
0

More than 5 years have passed since last update.

How to escape connection string in cx_Oracle SQLAlchemy

Last updated at Posted at 2018-02-07

How to escape connection string

If database password contains special characters, connection string should be escaped as URLencode:

  • NG
create_engine('oracle+cx_oracle://user:$$$$@host/database'))
  • OK
create_engine('oracle+cx_oracle://user:%24%24%24%24@host/database')

or

create_engine('oracle+cx_oracle://user:%s@host/database' % urlquote('$$$$'))

References

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0