Config
You can use Config to set the default data provider.
from datamule import Config
config = Config()
config.set_default_source("datamule") # set default source to datamule, can also be "sec"
print(f"Default source: {config.get_default_source()}")
Note: that you first need to get an API key from datamule, and set it as an environment variable.
PowerShell
[System.Environment]::SetEnvironmentVariable('DATAMULE_API_KEY', 'your-api-key', 'User')
Bash
echo 'export DATAMULE_API_KEY="your-api-key"' >> ~/.bashrc
source ~/.bashrc
Zsh (macOS default)
echo 'export DATAMULE_API_KEY="your-api-key"' >> ~/.zshrc
source ~/.zshrc
Note
After setting the environment variable, you may need to restart your terminal/shell for the changes to take effect.
Note
Premium Downloader may be much faster depending on your laptop’s specs and internet connection.
Note
Premium Downloader is in beta and may have bugs. To check for errors go to output_dir/errors.json