In Datajoint, you are prompted for username and password. I am creating a readthedocs website with Sphinx and I need the system to not prompt for username and password. How can I turn it off?
Asked
Active
Viewed 55 times
2 Answers
3
Thanks for asking this question! There are basically three ways to do this:
- dj.config.save_local(): This will save the entire dj.config as
json
on your project level - dj.config.save_global(): This will save is on a system level
- System Variables
DJ_HOST
,DJ_USER
, andDJ_PASS
: Can be set for once likeexport
in terminal or permanently in~/.bashrc
or~/.zsh_profile
for linux/mac or in your system settings/environment variable settings for windows
Please check DataJoint Documentation for more details

Drew Yang
- 76
- 3
-
1Example `dj_local_conf.json`: https://github.com/datajoint/workflow-deeplabcut/blob/main/dj_example_local_conf.json Example saving auto-generation: https://github.com/datajoint/workflow-deeplabcut/blob/main/notebooks/01-Configure.ipynb – Chris Broz May 09 '22 at 18:08
1
DataJoint asks for database credentials only when they are not already provided in the settings dictionary dj.config
. These values can be set programmatically, loaded from a configuration file, or loaded from environment variables. These settings are described in the documentation: https://docs.datajoint.org/python/setup/01-Install-and-Connect.html

Dimitri Yatsenko
- 230
- 1
- 4
-
Yes, but I am trying to run unit test and I don't want to authenticate to a server. – Phil Jun 16 '22 at 23:02