conf.LOGIN_DATA_STORE_PATH.value = None #101
-
In the examples, you don't go into detail about this option. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
To set a configuration (including the setting your title suggests) you have to create a configuration file, like described in the Configuration section of the README. |
Beta Was this translation helpful? Give feedback.
-
I am not sure what The configuration file that should be used for using python-n26 is parsed by a library called container-app-conf. The path (actually, there are multiple) to the configuration file is hardcoded and can be seen here. Of course this configuration file (yaml or toml file) can not contain python code, but only static things like a text (string) or a number.
container-app-conf does not need Voluptuous for a simple string config entry. I don't know why or where you would want to add this line. If you need/want to specify the path to the login data store file programmatically, you have to create an instance of the conf = Config(validate=False)
conf.LOGIN_DATA_STORE_PATH.value = acc[LOGIN_DATA_STORE_PATH]
conf.validate() However, when using this approach you also need to interact with the
What prevents you from doing that currently? Both when using the CLI and when using the Api in a custom python script, by default, the configuration file is read from the same places. There should not be a reason why doing what you wrote above does not work. In your initial message you said that you tried to use Just as an example: I use this configuration file: n26:
username: [email protected]
password: "abcdefg"
login_data_store_path: "~/.config/n26/token_data"
mfa_type: app
device_token: some-random-uuid which is located in |
Beta Was this translation helpful? Give feedback.
I am not sure what
__init__.py
you refer to, there is no such file in the project that contains anything about theLOGIN_DATA_STORE_PATH
configuration option. But answering the question: yes you can change the setting in the file if you use the CLI or the Api without explicitly and manually creating aConfig
object instance and passing it to theApi
instance. There is no hardcoded "None" value for this setting, its just the default. But it is only a default, you can of course change it to something else. Otherwise it shouldn't even be a setting afterall.The configuration file that should be used …