This task will be a quite hard. The list of available libraries is very limited. Maybe the best one is Cling written in Java. It's used by BubbleUPnP and other good applications. The second one is libupnp written in C. There are also Intel Leyna, Platinum UPnP and dlnap.
But. There is only one ready-made Python implementation - Coherence. It's abandoned now. And wasn't updated for a very long time.
This task will be a quite hard. The list of available libraries is very limited. Maybe the best one is Cling written in Java. It's used by BubbleUPnP and other good applications. The second one is libupnp written in C. There are also Intel Leyna, Platinum UPnP and dlnap.
But. There is only one ready-made Python implementation - Coherence. It's abandoned now. And wasn't updated for a very long time.