Hello @zulfikhar_a
There is no easy way to do it. I mean, you can do it, but it would be quite challenging from the following perspectives:
+ different train releases might have different (additional) questions
+ depending of the choices you have, you will have different prompts (APIC-X. standby APIC, IPv6 oob etc
+ this is one time configuration for 99.9% of the fabrics.
If you still want to go for it, what comes to my mind is: use pexpect to ssh to UCS-C shell, then connect to APIC CLI using Serial over LAN connection, and from there you just respond to questions.
Hope it helps,
Sergiu