Civciv5
Grand Emperor
I'm sorry but I can't find anything in those files that let me declare war through python.Look here: DoC plugs into the onBeginGameTurn event trigger for this (regular BtS might do that with CvEventManager.py). The linked Python module makes a call to a different module that actually spawns the units. In this case that is the checkTurn method in AIWars.py, which calls the checkConquest methods for the specific stages of the spawned invasions.
I am always hesitant to point people to my mod for examples on how to mod stuff in BtS, because RFC is already heavily modified and modularized, so emulating it might not work because you're missing the required utility methods, or needlessly complicated because your own use case is much simpler. So take everything you see with a grain of salt. It's useful to understand how everything is connected, not so much for outright copying code.
I really need this feature for my Middle East mod to simulate historical invasions and I need a civ to auto declare war on a specific date.