Skip to main content

Python Git Library

Project description

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

The latest release series to support Python 2.x was the 0.19 series. See the 0.19 branch in the Dulwich git repository.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dulwich-0.20.22.tar.gz (414.1 kB view details)

Uploaded Source

Built Distributions

dulwich-0.20.22-cp39-cp39-win_amd64.whl (487.0 kB view details)

Uploaded CPython 3.9 Windows x86-64

dulwich-0.20.22-cp38-cp38-win_amd64.whl (487.0 kB view details)

Uploaded CPython 3.8 Windows x86-64

dulwich-0.20.22-cp37-cp37m-win_amd64.whl (486.9 kB view details)

Uploaded CPython 3.7m Windows x86-64

dulwich-0.20.22-cp36-cp36m-win_amd64.whl (486.9 kB view details)

Uploaded CPython 3.6m Windows x86-64

File details

Details for the file dulwich-0.20.22.tar.gz.

File metadata

  • Download URL: dulwich-0.20.22.tar.gz
  • Upload date:
  • Size: 414.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2

File hashes

Hashes for dulwich-0.20.22.tar.gz
Algorithm Hash digest
SHA256 949ecf4fe8dfa73cc7acd695d0e14b0f4ff904ca5c2253e7f3fb1e3caa04816f
MD5 210a0327fa76c7ba374d78beeb27d8b0
BLAKE2b-256 ae71cb573395e780b1d0406a632e6904d3e933f3a80ea4386d5ae2f3be41d00b

See more details on using hashes here.

File details

Details for the file dulwich-0.20.22-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: dulwich-0.20.22-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 487.0 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for dulwich-0.20.22-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0e307bd901496e3dfdcb756f5456d58908eb9c554826e5ce2e97c3ca56b04e0d
MD5 582248ef4e473c02ba311e81581d7afa
BLAKE2b-256 dad0575005d7072558ab44a91df942bdb8aff0471e2347d8ef17659469973a2c

See more details on using hashes here.

File details

Details for the file dulwich-0.20.22-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: dulwich-0.20.22-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 487.0 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for dulwich-0.20.22-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 b8b3642fb566a593933eb84b4015e2ae32e983f775a636bbc58aa2b4bc84dd43
MD5 a1c6471bdedbb624eff876b24b6d2eb4
BLAKE2b-256 e8b5b263184e7183949877f374e1c7c5a00774c0ae15a0de1d9f113c4f23858a

See more details on using hashes here.

File details

Details for the file dulwich-0.20.22-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: dulwich-0.20.22-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 486.9 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for dulwich-0.20.22-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 180a6a6c71cda0dbe8dcdf552cb76d99f6a19c30fda65c570a5c9e2c6a8fa326
MD5 4e8c1ac31695fe3281761c14e62ebacc
BLAKE2b-256 affcd2898807ecbaa21c66746fa4cdb272772e551dc7915d062ad6d8f0458e9b

See more details on using hashes here.

File details

Details for the file dulwich-0.20.22-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: dulwich-0.20.22-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 486.9 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.8

File hashes

Hashes for dulwich-0.20.22-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 c94fcdc2cb571a40f10c63ac9cf09ce124523c2a025e655fca1005589a2dc19a
MD5 5ea700a419ce4ce2c20d569cc012623f
BLAKE2b-256 ddea212cf49b10c0850c199ddfe78c28edde899ada899a777ae0f4b6d9155474

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page