# simplegit A python module for simple interaction with git via subprocess.
### How? ` # pip install simplegit ` (note: this doesn’t work via pip yet. Working on that.) `python from simplegit import Git git = Git() output_lines, returncode, error_lines = git.status() `
### Why? In personal projects, I always find myself writing scripts to automate parts of the development process. One example is checking out a gh-pages branch for a Github Pages website, pushing to gh-pages, then checking out master again - usually I have a script called push.py which automates this. If you’re conditionally ignoring files based on the branch, you have even more processing to do (including extra commits). It’s kind of clumsy to execute these git commands using python’s subprocess, so simplegit provides a nice wrapper.
### How does it work? The Git class form simplegit simply takes a call to it (for example Git().status(“-s”)), builds a subprocess command, executes it, and returns the relevant information. Any git command (e.g. status, commit, push, pull) is available, since the python object blindly proxies the function name to build the command (e.g. git.add(“-A”) -> git add -A). Some examples:
`python lines, rtncode, err_lines = git.status("-s") lines, rtncode, err_lines = git.commit("-m 'A fun message'") `
If you need to call a git command that would produce a python syntax error, like ls-files, you can use Git().call:
`python git.call("ls-files", "--others --exclude-standard") `
### Contributing Right now, this is just a one-off side project that I started. If you’d like to contribute or have ideas, pull requests are welcome!
Metadata
Release files for simplegit 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| simplegit-0.0.1.tar.gz | 3.1 kB | Without provenance | Details for simplegit-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simplegit-0.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for simplegit-0.0.1-py2.py3-none-any.whl |
Total release size: 7.7 kB
Release files / simplegit-0.0.1.tar.gz
| Download URL | simplegit-0.0.1.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49a1257bc7c0b60b66fb6399292c91b11dca16fcde202fa4b49ed1826936479e
|
|
BLAKE2b-256 checksum How to use checksums |
a1e3caecf11eabed0a21883aab19ee25950988d330141f34a89bf82f1b77c57a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / simplegit-0.0.1-py2.py3-none-any.whl
| Download URL | simplegit-0.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
194692972e98a84bb8d0ef023de9204fefe97461ffa84eb462d5ee39ce3d921a
|
|
BLAKE2b-256 checksum How to use checksums |
a3086a0d8c2cf15c4635cafcd1c9bd1351c251c6e0a9ddbff9db5d288ad1fd95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for simplegit 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.