hi there -
this question lacks specifics. There are no configuration options that are relevant to the "alembic init" command in any case so it's not clear what config settings you are seeing as "ignored"; init uses only the name of the ini file given and this works:
from alembic.config import Config
from alembic import command
alembic_cfg = Config("my_alembic_init.ini")
command.init(alembic_cfg, "./my_test_init")
output:
Creating directory /home/classic/dev/alembic/my_test_init ... done
Creating directory /home/classic/dev/alembic/my_test_init/versions ... done
Generating /home/classic/dev/alembic/my_test_init/script.py.mako ... done
Generating /home/classic/dev/alembic/my_test_init/README ... done
File /home/classic/dev/alembic/my_alembic_init.ini already exists, skipping
Generating /home/classic/dev/alembic/my_test_init/env.py ... done
Please edit configuration/connection/logging settings in '/home/classic/dev/alembic/my_alembic_init.ini' before proceeding.
Perhaps you're suggesting that the "my_alembic_init.ini" file should be *written* to include the options that are present in the object? We are using Python stdlib configparser:
https://docs.python.org/3/library/configparser.html and it is actually news to me that this even includes an option to "write" the file. I would suggest running alembic.init(), then programmatically reading the .ini file that's generated, as this depends upon lots of settings set up in templates like alembic/templates/generic/alembic.ini.mako which are not otherwise present in Alembic, then add the options you want, then write the file. this will get you that result, hope this helps.