Python C Other
Switch branches/tags
upstream/0.19.3 upstream/0.19.1 upstream/0.19.0 upstream/0.18.5 upstream/0.18.4 upstream/0.18.3 upstream/0.18.2 upstream/0.18.0 upstream/0.17.3 upstream/0.17.1 upstream/0.16.3 upstream/0.16.2 upstream/0.16.1 upstream/0.16.0 upstream/0.15.0 upstream/0.14.1 upstream/0.14.0 upstream/0.13.0 upstream/0.12.0 upstream/0.11.2 upstream/0.11.1 upstream/0.10.1 upstream/0.10.1+git20150525 upstream/0.10.1+git20150425 upstream/0.10.0 upstream/0.9.8 upstream/0.9.7 upstream/0.9.6 upstream/0.9.5 upstream/0.9.1 rc-fix-pack-protocol-v2 dulwich-0.19.3 dulwich-0.19.2 dulwich-0.19.1 dulwich-0.19.0 dulwich-0.18.6 dulwich-0.18.5 dulwich-0.18.4 dulwich-0.18.3 dulwich-0.18.2 dulwich-0.18.1 dulwich-0.18.0 dulwich-0.17.3 dulwich-0.17.2 dulwich-0.17.1 dulwich-0.17.0 dulwich-0.16.3 dulwich-0.16.2 dulwich-0.16.1 dulwich-0.16.0 dulwich-0.15.0 dulwich-0.14.1 dulwich-0.14.0 dulwich-0.13.0 dulwich-0.12.0 dulwich-0.11.1 dulwich-0.11.0 dulwich-0.10.1 dulwich-0.10.0 dulwich-0.9.10 dulwich-0.9.9 dulwich-0.9.8 dulwich-0.9.7 dulwich-0.9.6 dulwich-0.9.5 dulwich-0.9.4 dulwich-0.9.3 dulwich-0.9.2 dulwich-0.9.1 dulwich-0.9.0 dulwich-0.8.7 dulwich-0.8.6 dulwich-0.8.5 dulwich-0.8.4 dulwich-0.8.3 dulwich-0.8.2 dulwich-0.8.1 dulwich-0.8.0 dulwich-0.7.1 dulwich-0.7.0 dulwich-0.6.2 dulwich-0.6.1 dulwich-0.6.0 dulwich-0.5.0 dulwich-0.4.1 dulwich-0.4.0 dulwich-0.3.3 dulwich-0.3.2 dulwich-0.3.1 dulwich-0.3.0 dulwich-0.2.1 dulwich-0.2.0 dulwich-0.1.1 dulwich-0.1.0 debian/0.19.3-1 debian/0.19.1-1 debian/0.19.0-2 debian/0.19.0-1 debian/0.18.5-1 debian/0.18.4-1
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
bin Implement dulwich.porcelain.ls_files, avoid digraph in setup.cfg. Jun 20, 2018
devscripts Add script for updating preamble. Sep 17, 2016
docs Fix the tutorial tests on python3. Fixes: #573 Apr 12, 2018
dulwich Implement dulwich.porcelain.ls_files, avoid digraph in setup.cfg. Jun 20, 2018
examples Add example for using memoryrepo. Jun 3, 2018
.coveragerc Set source in coveragerc rather than passing on command-line. May 7, 2018
.gitignore Ignore .pyo files. Mar 25, 2018
.mailmap Update mailmap. Mar 17, 2018
.testr.conf testr: Allow id list files (fixes parallel runs). Dec 19, 2010
.travis.yml Fix restricted build for python3.3. May 18, 2018
AUTHORS Merge change from PuttySSHVendor => PLinkSSHVendor. Apr 2, 2018
CONTRIBUTING.md Reformat to 80 columns. Jan 7, 2018
COPYING As agreed by all contributors, change the license from: Aug 7, 2016
MANIFEST.in Update MANIFEST.in. Jan 15, 2017
Makefile Set source in coveragerc rather than passing on command-line. May 7, 2018
NEWS Implement dulwich.porcelain.ls_files, avoid digraph in setup.cfg. Jun 20, 2018
README.md Fix appveyor build link. Apr 13, 2018
README.swift.md Fix typo Sep 21, 2017
TODO Update TODO. Jan 7, 2018
appveyor.yml Attempt to fix 64 bit builds on Windows. May 1, 2017
build.cmd Attempt to fix 64 bit builds on Windows. May 1, 2017
dulwich.cfg Change homepage to www.dulwich.io. Jul 27, 2015
requirements.txt Enable SSL verification for `urllib3` Jan 29, 2018
setup.cfg Implement dulwich.porcelain.ls_files, avoid digraph in setup.cfg. Jun 20, 2018
setup.py Start on 0.19.4. Jun 17, 2018
tox.ini Run tests on Python3.3. Mar 20, 2017

README.md

Build Status Windows Build status

This is the Dulwich project.

It 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.

Main website: www.dulwich.io

License: Apache License, version 2 or GNU General Public License, version 2 or later.

The project is named after the part of London that Mr. and Mrs. Git live in in the particular Monty Python sketch.

Installation

By default, Dulwich' setup.py will attempt to build and install the optional C extensions. The reason for this is that they significantly improve the performance since some low-level operations that are executed often are much slower in CPython.

If you don't want to install the C bindings, specify the --pure argument to setup.py::

$ python setup.py --pure install

or if you are installing from pip::

$ pip install dulwich --global-option="--pure"

Note that you can also specify --global-option in a requirements.txt file, e.g. like this::

dulwich --global-option=--pure

Getting started

Dulwich comes with both a lower-level API and higher-level plumbing ("porcelain").

For example, to use the lower level API to access the commit message of the last commit:

>>> from dulwich.repo import Repo
>>> r = Repo('.')
>>> r.head()
'57fbe010446356833a6ad1600059d80b1e731e15'
>>> c = r[r.head()]
>>> c
<Commit 015fc1267258458901a94d228e39f0a378370466>
>>> c.message
'Add note about encoding.\n'

And to print it using porcelain:

>>> from dulwich import porcelain
>>> porcelain.log('.', max_entries=1)
--------------------------------------------------
commit: 57fbe010446356833a6ad1600059d80b1e731e15
Author: Jelmer Vernooij <jelmer@jelmer.uk>
Date:   Sat Apr 29 2017 23:57:34 +0000

Add note about encoding.

Further documentation

The dulwich documentation can be found in docs/ and on the web.

The API reference can be generated using pydoctor, by running "make pydoctor", or on the web.

Help

There is a #dulwich IRC channel on the Freenode, and dulwich-announce and dulwich-discuss mailing lists.

Contributing

For a full list of contributors, see the git logs or AUTHORS.

If you'd like to contribute to Dulwich, see the CONTRIBUTING file and list of open issues.

Supported versions of Python

At the moment, Dulwich supports (and is tested on) CPython 2.7, 3.3, 3.4, 3.5, 3.6 and Pypy.