Why not fork docker-compose v1? It's Python! https://github.com/docker/compose/tree/1.29.2/compose
You could keep the YAML format and extend it, and still write compose files as pure Python.
You could keep the YAML format and extend it, and still write compose files as pure Python.
I'm not sure how that would work with the whole "lifecycle hooks" you've mentioned a few times, but maybe it would be easier than trying to compete with Docker Compose yourself by simply wrapping it.
I posted in another comment here too but we wrote a bunch of code to deal with programmatic generation of Docker Compose files, and it was really sweet to use! I've honestly thought about making that code[0] a stand-alone library because of how valuable it was.
0: https://github.com/lunasec-io/lunasec/blob/master/js/sdks/pa...