Intuitive Git for Python
Project description
Intuitive Git for Python
Install
Dependencies: git ^2.0.0 (tested)
pip install gitspy
Development
poetry install
Example Usage
Get branch
Capture will store stdout, which can then be consumed by calling git.stdout()
Default is to return returncode and print stdout and stderr to console
>>> import gitspy
>>> git = gitspy.Git()
>>> git.init(capture=True) # ['...']
0
Consume stdout (a list containing a str)
>>> len(git.stdout()) # []
1
No commands have been called yet since last call to stdout so stdout is empty
>>> len(git.stdout()) # []
0
Stdout can be accrued
>>> git.init(capture=True) # ['...']
0
>>> git.init(capture=True) # ['...', '...']
0
>>> len(git.stdout()) # []
2
Stdout is consumed
>>> len(git.stdout()) # []
0
Get commit hash
>>> git.rev_parse("HEAD", capture=True) # ['...']
0
>>> len(git.stdout()[0]) # []
40
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gitspy-0.2.0.tar.gz
(4.6 kB
view details)
Built Distribution
File details
Details for the file gitspy-0.2.0.tar.gz
.
File metadata
- Download URL: gitspy-0.2.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.11+ Linux/5.16.18-200.fc35.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a86f494ecada237f24d2137de2b41e1060fea4f43fd9148e79ea23951b594b0b |
|
MD5 | 129eb77ac23838a232a5ab1bb8be35df |
|
BLAKE2b-256 | 4727820141c146da7f063bc4f43a8a8f051e0a3b922793c7f36dc825f394ca22 |
File details
Details for the file gitspy-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: gitspy-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.11+ Linux/5.16.18-200.fc35.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f41d5ca48b20ff2a166d0520023ab21ef87dab7e0e222da53c73b307a6bcec06 |
|
MD5 | 7f1402b6b1a74ccb166cc5af2f26aeb0 |
|
BLAKE2b-256 | 29b623dda71833a7abac7858ae4745db3c6c3390e8d5972d1ee02fffaa60eaed |