classmethod splatnet3_scraper.query.QueryHandler.from_config_file(config_path=None, *, prefix='')

Creates a new instance of the class using a configuration file.

If the user does not provide a configuration file path, the default path will be used, which is .splatnet3_scraper in the user’s current working directory. The configuration file this method accepts is one that aligns with the standard configuration file format used by the standard library configparser module. The configuration file must have a [Tokens] section, which only requires the session_token option to be set. The session_token option must be set to the user’s session token. For a full list of all options that can be set in the config file, see the documentation for the Config class.

Parameters:
config_path : str | None

The path to the configuration file. If None, the default configuration file path of .splatnet3_scraper in the user’s current working directory will be used. Defaults to None.

prefix : str

The prefix to use for environment variables. This is useful if the user prefers to use both environment variables and configuration files. Defaults to “SN3S”.

Returns:

QueryHandler – A new instance of the class using the configuration file provided, with all the options set in the configuration file.