Connect#

wehrdj.connect.connect(host=None, user=None, password=None, file=PosixPath('/home/docs/.djcredentials.json'), **kwargs) Connection[source]#

Connect to datajoint database.

Wrapper around datajoint.conn(), but loads credentials from an (unencrypted) file.

A bit less implicit than using environment variables, and less manual than typing them in every time.

Please for the love of god do not commit any passwords to a git repo ever.

Parameters
  • host (str) – IP Address

  • user (str) – Username ( typically “root” by default )

  • password (str) – uh Password

  • file (pathlib.Path) – file to load/save credentials to

  • **kwargs – passed to dj.conn

Returns

datajoint.connection.Connection