It would be great if we could change the default branch with python-gitlab (see documentation): https://docs.gitlab.com/ce/api/projects.html#edit-project