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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gitspy-0.3.0.tar.gz.
File metadata
- Download URL: gitspy-0.3.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.8.13 Darwin/22.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74e582d2f13001f61133e02c5ceb252a1511d3859cfdff16637e50ba0f3091bd
|
|
| MD5 |
cd53689e6855d8f0b008a345fcfd7810
|
|
| BLAKE2b-256 |
910145bd2bee216bdc7bd78c986a34e974b738f27933fa825b0de3feb38ded0b
|
File details
Details for the file gitspy-0.3.0-py3-none-any.whl.
File metadata
- Download URL: gitspy-0.3.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.8.13 Darwin/22.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ca2e79c39d95d1a374d35bd3f31741fec168884fb58243adda65ea4bdfbe13d
|
|
| MD5 |
663ad122e43291b1d7b8d69550dedbe6
|
|
| BLAKE2b-256 |
81ff7dea711a903e27e2b99f3d1e0dcb1f41604b275167e781ac15854381642c
|