Author Archives: admin

Python Records. Connection Pool

Important Considerations:

  • Setup pool class to sqlalchemy.pool.NullPool when you create database so we don't allow pooling and only one connection is created, and it is correctly deleted when we call close method.
  • Connection needs to be closed at the end of each call. Close it in finally block.

Enabling ClearText Plugin on OSX for TLS Authentication

vi ~/Library/LaunchAgents/environment.plist

<?xml version="2.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>my.startup</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
<string>
launchctl setenv LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN 1
</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>

launchctl load ~/Library/LaunchAgents/environment.plist