Your question seems to be more related to general argument parsing in python than with elixir.
Anyway, I have a similar problem, and I have solved it by using different configuration files and parsing them with the configparse module in python.
For example, I have two config files, and each of them describes the db url, username, password, etc.. of one database. When I want to switch to another configuration, I pass an option like --configfile guest to the script (I use argparse for the command line interface), then the script looks for a config file called guest.txt, and reads all the informations there.
This is a lot safer, because if you pass a metadata string as a command line argument you can have some security issues, and moreover it is a lot longer to type.
By the way, you can also find useful to write a Makefile to store the most common options.
e.g. cat >Makefile
debug_db:
ipython connect_db.py -config guest -i
connect_root:
ipython connect_db.py -config db1_root -i
connect_db1:
ipython connect_db.py -config db1 -i
and on teh command line, you only have to type 'make debug_db' or 'make connect_db1' to execute a rule.