Best Git library for Python?

D

Dun Peal

Hi folks,

I'm writing a Python program to operate on Git repositories.

The program works at the user level of abstraction: i.e. it needs to
do everything that an end user can do with Git.

I'm talking about the high-level commands like git-clone, git-branch,
git-fetch, git-merge, git-rebase, git-push.

Having lower-level functionality would be nice, but not essential.

What is essential is reliability: the library should work correctly
even under reasonable load, and fail noisily and predictably in the
extreme situations that simply can't be handled correctly.

What's the best library to use?

Thanks, D
 
D

Dun Peal

Why not just call Git itself?

That's what I'm doing right now, but since this is a mission-critical
process, it would be nice to have a more reliable exception detection
and handling mechanism. With my straight calling-out-to-git
implementation, the calling Python code doesn't even know about
crashes or any kind of out-of-band behavior, much less able to do
something about it.

Also, I assume a library could provide an additional safety net over a
bare "subprocess out to the git CLI client", improving the consistency
of its behavior. For instance, it could implement mutex locks to avoid
operations running over each other, which is important for our high-
load needs.
 
L

Lawrence D'Oliveiro

In message
Dun said:
That's what I'm doing right now, but since this is a mission-critical
process, it would be nice to have a more reliable exception detection
and handling mechanism.

You can already check the exit status from the subprocess. What more do you
need?
For instance, it could implement mutex locks to avoid
operations running over each other, which is important for our high-
load needs.

Git itself should be quite capable of taking care of such issues.
 
D

Dun Peal

You can already check the exit status from the subprocess. What more do you
need?

A robust mechanism to deal with said issues...

Of course I can write it myself, but it would save much time and
effort if I could use something that's already written.

D
 
L

Lawrence D'Oliveiro

In message
Dun said:
A robust mechanism to deal with said issues...

You haven’t explained what “issues†will not be reported via a failure exit
status.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top