There is a way to set alarms from application. ProfileMatic does it, you can check the sources. It's C++, but might be doable from Python too?