GitPython is a python library used to interact with git repositories, high-level like git-porcelain, or low-level like git-plumbing.
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 4 4
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 5 5
It provides abstractions of git objects for easy access of repository data, and additionally allows you to access the git repository more directly using either a pure python implementation, or the faster, but more resource intensive git command implementation.
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 6 6
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 7 7
The object database implementation is optimized for handling large quantities of objects and large datasets, which is achieved by using low-level structures and data streaming.
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 8 8
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 9 9
### REQUIREMENTS
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 10 10
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 11 11
* Git ( tested with 1.8.3.4 )
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 12 12
* Python Nose - used for running the tests
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 13 13
- Tested with nose 1.3.0
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 14 14
* Mock by Michael Foord used for tests
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 15 15
- Tested with 1.0.1
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 16 16
* Coverage - used for tests coverage
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 17 17
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 18 18
The list of dependencies are listed in /requirements.txt and /test-requirements.txt. The installer takes care of installing them for you though.
or if you want to obtain a copy from the Pypi repository:
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 30 30
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 31 31
pip install gitpython
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 32 32
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 33 33
Both commands will install the required package dependencies.
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 34 34
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 35 35
A distribution package can be obtained for manual installation at:
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 36 36
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 37 37
http://pypi.python.org/pypi/GitPython
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 38 38
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 39 39
### RUNNING TESTS
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 40 40
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 41 41
The easiest way to run test is by using [tox](https://pypi.python.org/pypi/tox) a wrapper around virtualenv. It will take care of setting up environnements with the proper dependencies installed and execute test commands. To install it simply:
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 42 42
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 43 43
pip install tox
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 44 44
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 45 45
Then run:
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 46 46
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 47 47
tox
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 48 48
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 49 49
### SOURCE
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 50 50
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 51 51
GitPython's git repo is available on GitHub, which can be browsed at [github](https://github.com/gitpython-developers/GitPython) and cloned like that:
Now that there seems to be a massive user base, this should be motivation enough to let git-python return to a proper state, which means
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 73 73
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 74 74
* no open pull requests
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 75 75
* no open issues describing bugs
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 76 76
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 77 77
#### FUTURE GOALS
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 78 78
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 79 79
There has been a lot of work in the master branch, which is the direction I want git-python to go. Namely, it should be able to freely mix and match the back-end used, depending on your requirements and environment.
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 80 80
e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e 81 81
* make new master work similarly to 0.3, but with the option to swap for at least one additional backend