This shows a config file which can be parsed with Python's configparser. Rules.py will read this config file and construct a JSON object with IP addresses dynamically.
[domain1-rule]
Name = domain1-rule
RuleType = Forward
DomainName = domain1
Ips = 10.10.10.10, 10.10.10.11, 10.10.10.12
Port = 53