Skip to main content

Intuitive Git for Python

Project description

License PyPI CI pre-commit.ci status CodeQL codecov.io readthedocs.org python3.8 Black pylint

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.3.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

gitspy-0.3.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

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

Hashes for gitspy-0.3.0.tar.gz
Algorithm Hash digest
SHA256 74e582d2f13001f61133e02c5ceb252a1511d3859cfdff16637e50ba0f3091bd
MD5 cd53689e6855d8f0b008a345fcfd7810
BLAKE2b-256 910145bd2bee216bdc7bd78c986a34e974b738f27933fa825b0de3feb38ded0b

See more details on using hashes here.

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

Hashes for gitspy-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ca2e79c39d95d1a374d35bd3f31741fec168884fb58243adda65ea4bdfbe13d
MD5 663ad122e43291b1d7b8d69550dedbe6
BLAKE2b-256 81ff7dea711a903e27e2b99f3d1e0dcb1f41604b275167e781ac15854381642c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page