dulwich
Python Git Library
Install
dulwich on PyPI
pip
pip install dulwichuv
uv add dulwichpoetry
poetry add dulwichPackage facts
| License | Apache-2.0 OR GPL-2.0-or-later (unclear) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — urllib3, typing_extensions |
| Maintenance | actively maintained — 25 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: dulwich-1.2.12-py3-none-any.whl
Keywords: vcs, git
About dulwich
from the package's own PyPI description — quoted content, verbatim
Dulwich
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.
SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
The project is named after the part of London that Mr. and Mrs. Git live in the particular Monty Python sketch.
Differences with other Python Git libraries
Unlike other Python Git libraries, Dulwich is available as a standalone package that doesn't depend on git (like GitPython) being installed or any native code (like pygit2).
This comes at the cost of speed, but makes it easier to deploy in environments where git isn't available or where it's important to have a pure Python implementation.
To improve performance, Dulwich includes optional Rust bindings that can be used to speed up low-level operations.
Installation
By default, Dulwich' setup.py will attempt to build and install the optional Rust extensions. The reason for this is that they...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Dulwich provides a pure-Python interface to Git repositories without requiring git or native code to be installed, supporting both local and remote repo operations through lower-level and high-level APIs.
Low friction: ships as a wheel, depends only on urllib3 and typing_extensions, and maintains active development with a recent release 25 days ago. Optional Rust bindings can be skipped with --pure flag if compilation is undesirable.
Dual-licensed under Apache-2.0 OR GPL-2.0-or-later with unclear treatment; users must comply with at least one of these licenses. Check your own license obligations before use, particularly if bundling or modifying.
Usage
pip install dulwich
from dulwich.repo import Repo
r = Repo('.')
commit = r[r.head()]
print(commit.message)
Requires Python 3.10 or later; optional Rust extensions require a Rust toolchain (can be disabled with --pure flag during install).
Verdict: Dulwich is a mature, actively maintained library with no known vulnerabilities and low install friction. Its dual license and unclear treatment warrant verification before use in proprietary or GPL-sensitive contexts, but the pure-Python design and broad Python version support (3.10–3.14, PyPy) make it reliable for Git integration where native dependencies are undesirable.
Needs verification
- Whether the dual-license structure (Apache-2.0 OR GPL-2.0-or-later) is compatible with your project's license policy
- Performance impact of the pure-Python implementation versus the optional Rust bindings in your use case
- Repository activity level and community engagement beyond the last commit date
Similar packages
permissive · top 1,000 on PyPI
pippermissive · top 100 on PyPI
lightgbmunclear · top 1,000 on PyPI
gitdbpermissive · top 1,000 on PyPI
cuda-bindingsunclear · top 1,000 on PyPI
types-paramikopermissive · top 1,000 on PyPI
paramikocopyleft · top 1,000 on PyPI
h5pypermissive · top 1,000 on PyPI
gcloud-aio-storagepermissive · top 1,000 on PyPI
pysparkpermissive · top 1,000 on PyPI