Skip to main content

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: <https://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 built by running make doc. It can also be found on the web.

Help

There is a #dulwich IRC channel on the OFTC, and a dulwich-discuss mailing list.

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 3.6 and later and Pypy.

Release files for dulwich 0.20.38

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dulwich 0.20.38
File Size Uploaded
dulwich-0.20.38.tar.gz 423.8 kB Details

Release files / dulwich-0.20.38.tar.gz

Download URL dulwich-0.20.38.tar.gz
Size 423.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7346790d8735c86fbbc5b70b674f0ef94096c1e5099ba7273491628239817fc8
BLAKE2b-256 checksum
How to use checksums
587abb7c82091a900bb1d3ae57a4a58075c81a762e53140a1db98c2ba7c123f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release history Release notifications | RSS feed

1.2.7

42 release files

1.2.6

42 release files

1.2.5

42 release files

1.2.4

42 release files

1.2.3

42 release files

1.2.2

42 release files

1.2.1

42 release files

1.2.0

42 release files

1.1.0

36 release files

1.0.0

26 release files

0.20.40

1 release file

0.20.39

1 release file

This release

0.20.38 This release

1 release file

0.20.36

1 release file

0.20.31

1 release file

0.20.9

9 release files

0.20.8

9 release files

0.20.7

7 release files

0.19.10

1 release file

0.19.9

1 release file

0.19.8

1 release file

0.19.7

1 release file

0.19.6

1 release file

0.19.5

1 release file

0.19.4

1 release file

0.19.3

1 release file

0.19.2

1 release file

0.19.1

1 release file

0.19.0

1 release file

0.18.6

1 release file

0.18.5

1 release file

0.18.4

1 release file

0.18.3

1 release file

0.18.2

1 release file

0.18.1

1 release file

0.18.0

1 release file

0.17.3

1 release file

0.17.2

1 release file

0.17.1

1 release file

0.16.3

1 release file

0.16.2

1 release file

0.16.1

1 release file

0.16.0

1 release file

0.15.0

1 release file

0.14.1

1 release file

0.14.0

1 release file

0.13.0

1 release file

0.12.0

1 release file

0.11.2

1 release file

0.11.1

1 release file

0.11.0

1 release file

0.10.0

1 release file

0.9.9

1 release file

0.9.8

1 release file

0.9.7

1 release file

0.9.6

1 release file

0.9.5

1 release file

0.9.4

1 release file

0.9.3

1 release file

0.9.2

1 release file

0.9.1

1 release file

0.9.0

0.8.7

0.8.6

0.8.5

0.8.4

0.8.3

0.8.2

0.8.1

0.8.0

0.7.1

0.7.0

0.6.2

0.6.1

0.6.0

0.5.0

0.4.1

0.4.0

0.3.3

0.3.2

0.3.1

0.3.0

0.2.1

0.1.1

0.1.0

0.0.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page