• Stars
    star
    1,943
  • Rank 23,853 (Top 0.5 %)
  • Language
    Python
  • License
    Other
  • Created over 15 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pure-Python Git implementation

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.

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 --no-binary dulwich dulwich --config-settings "--build-option=--pure"

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

dulwich --config-settings "--build-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 <[email protected]>
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.

More Repositories

1

xandikos

A CalDAV/CardDAV server
Python
301
star
2

prometheus-xmpp-alerts

XMPP Web hook for Prometheus
Python
31
star
3

silver-platter

Automate the creation of merge proposals for scriptable changes
Python
26
star
4

python-fastimport

Git Fastimport parser and generator in Python
Python
21
star
5

ognibuild

Detect and invoke build systems
Rust
20
star
6

awesome-codemods

Curated list of tools that can fix your code for you
18
star
7

subvertpy

Alternative Python bindings for Subversion
C
14
star
8

setuptools-protobuf

protobuf support for setuptools
Python
14
star
9

upstream-ontologist

discover information about upstream projects
Rust
13
star
10

janitor

Platform for making incremental changes to code in VCSes
Python
10
star
11

redirect-webfinger

Simple webfinger redirect implementation (to e.g. another Mastodon server)
Python
9
star
12

ptabtools

Library for reading PowerTab and GuitarPro files, and related conversion tools
C
7
star
13

subversion-rs

Rust bindings for Subversion
Rust
6
star
14

disperse

Automatic repository releasing
Rust
6
star
15

makefile-lossless

Lossless makefile parser
Rust
6
star
16

buildlog-consultant

Build log parser and analyser
Rust
6
star
17

samba-gtk

GTK+ frontends for Samba
Python
5
star
18

litegpodder

Minimal implementation of the gpodder API
Python
5
star
19

deb822-lossless

Rust parser for the Deb822 file format
Rust
5
star
20

sftp-rs

Rust implementation of SFTP
Rust
5
star
21

lintian-brush

Mirror of https://salsa.debian.org/jelmer/lintian-brush
Python
4
star
22

ctrlproxy

IRC bouncer
C
4
star
23

awesome-merge-drivers

List of great merge drivers for git and other version control tools
3
star
24

action-debianize

GitHub action for debianizing a repository
Shell
3
star
25

dissolve

Python
3
star
26

debian-changelog-rs

Debian Changelog parser in rust
Rust
3
star
27

debmutate

Manipulate Debian packages while preserving formatting
Python
2
star
28

debversion-rs

Rust parser/validator for Debian version strings
Rust
2
star
29

ftdi-cil

CIL (.NET) bindings for the FTDI library
C#
2
star
30

valhalla-client-rs

An API client for the Valhalla API
Rust
2
star
31

dystros

Tools for managing iCalendar and vCard files in Git
Python
2
star
32

wadl

Wadl parser for rust
Rust
2
star
33

debian-watch-rs

Rust parser for debian/watch files
Rust
2
star
34

apr-rs

Rust bindings for APR
Rust
2
star
35

iptable-rs

Rust datastructure for easy IP prefix traversal / manipulation
Rust
1
star
36

debbugs-rs

Rust client for the Debian bug tracking system
Rust
1
star
37

dirty-tracker-rs

Track which files have changed under a directory
Rust
1
star
38

r-description-rs

Rust parser and editor for R DESCRIPTION files and R versions
Rust
1
star
39

action-disperse-validate

GitHub action for validating disperse configuration
Dockerfile
1
star
40

upstream-ontologist-py

Python bindings for the upstream ontologist
Python
1
star
41

prometheus-splitwise-exporter

Prometheus exporter for Splitwise.com
Python
1
star
42

aiohttp-openmetrics

OpenMetrics endpoint provider for aiohttp
Python
1
star
43

build-farm

The Samba Build-Farm
Python
1
star
44

pam-krb5-migrate

PAM module for migrating to Kerberos
C
1
star
45

tdb-rs

Rust bindings for TDB
Rust
1
star
46

nagios-mit-krb5

Nagios plugins for checking MIT Kerberos servers
Python
1
star
47

nagios-heimdal

Nagios plugins for checking Heimdal servers
Python
1
star
48

at89prog

command-line programmer for AT89S8252 and similar processors connected via the serial port
C
1
star
49

brouter-client-rs

Rust client for the BRouter engine
Rust
1
star
50

launchpadlib-rs

Rust library for accessing launchpad
Rust
1
star
51

debcargo

Debcargo
Rust
1
star
52

pyo3-filelike

Rust wrapper for Python file-like objects
Rust
1
star