Python bindings for libgit2
C Python
Latest commit f18de42 May 7, 2017 @lfos lfos Randomize OID object hashes
Instead of using type punning to convert the OID to a Python hash, use
_Py_HashBytes() to hash the OID again. This means we no longer make any
assumptions on the internal representation of OID values or Python
hashes (before this commit, we at least relied on the fact that OID
hases are longer than Python hashes). Moreover, the random seed stored
in PYTHONHASHSEED is now honored.

This also fixes a compiler warning seen with -Wstrict-aliasing.

Signed-off-by: Lukas Fleischer <>


pygit2 - libgit2 bindings in Python

Pygit2 is a set of Python bindings to the libgit2 shared library, libgit2 implements Git plumbing. Pygit2 works with Python 2.7, 3.3, 3.4, 3.5, 3.6 and PyPy 2.6


How to install


116 developers have contributed at least 1 commit to pygit2:

J. David Ibáñez           Carlos Martín Nieto       Nico von Geyso
W. Trevor King            Dave Borowitz             Matthias Bartelmeß
Daniel Rodríguez Troitiño Richo Healey              Christian Boos
Julien Miotte             Richard Möhn              Xu Tao
Jose Plana                Matthew Duggan            Matthew Gamble
Martin Lenders            Petr Hosek                Victor Garcia
Xavier Delannoy           Yonggang Luo              Nick Hynes
Patrick Steinhardt        Tamir Bahar               Valentin Haenel
Michael Jones             Bernardo Heynemann        Brodie Rao
John Szakmeister          Vlad Temian               Nicolas Dandrimont
David Versmisse           Rémi Duraffort            Santiago Perez De Rosso
Sebastian Thiel           Thom Wiggers              Alok Singhal
Anatoly Techtonik         Fraser Tweedale           Han-Wen Nienhuys
Jason Ziglar              Leonardo Rhodes           Petr Viktorin
Robert Hölzl              Ron Cohen                 Thomas Kluyver
Alex Chamberlain          Alexander Bayandin        Amit Bakshi
Andrey Devyatkin          Arno van Lumig            Ben Davis
Dustin Raimondi           Eric Schrijver            Greg Fitzgerald
Guillermo Pérez           Hervé Cauwelier           Huang Huang
Ian P. McCullough         Igor Gnatenko             Jack O'Connor
Jared Flatow              Jiunn Haur Lim            Jun Omae
Kaarel Kitsemets          Kevin KIN-FOO             Masud Rahman
Michael Sondergaard       Ondřej Nový               Sarath Lakshman
Szucs Krisztian           Vicent Marti              Zoran Zaric
Adam Spiers               Andrew Chin               András Veres-Szentkirályi
Ash Berlin                Benjamin Kircher          Benjamin Pollack
Bryan O'Sullivan          Cam Cope                  Chason Chaffin
Chris Rebert              Colin Watson              Daniel Bruce
David Fischer             David Sanders             David Six
Devaev Maxim              Eric Davis                Erik Meusel
Erik van Zijst            Ferengee                  Gustavo Di Pietro
Holger Frey               Hugh Cole-Baker           Jasper Lievisse Adriaanse
Josh Bleecher Snyder      Justin Clift              Kyriakos Oikonomakos
Lukas Fleischer           Mathieu Bridon            Matthaus Woolard
Nicolás Sanguinetti       Noah Fontes               Óscar San José
Peter Dave Hello          Philippe Ombredanne       Ridge Kennedy
Ross Nicoll               Rui Abreu Ferreira        Sheeo
Soasme                    Vladimir Rutsky           Yu Jianjian
chengyuhang               earl


GPLv2 with linking exception.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation.

In addition to the permissions in the GNU General Public License, the authors give you unlimited permission to link the compiled version of this file into combinations with other programs, and to distribute those combinations without any restriction coming from the use of this file. (The General Public License restrictions do apply in other respects; for example, they cover modification of the file, and distribution when not linked into a combined executable.)

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.