Dulwich aims to provide an interface to git repos (both local and remote) that doesn't call out to git directly but instead uses pure Python.