Skip to main content

Intuitive Git for Python

Project description

ci CodeQL readthedocs.org python3.8 pypi codecov.io mit black

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

Uploaded Source

Built Distribution

gitspy-0.1.2-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file gitspy-0.1.2.tar.gz.

File metadata

  • Download URL: gitspy-0.1.2.tar.gz
  • Upload date:
  • Size: 4.8 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

Hashes for gitspy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f7063674138caaab048309e5121c2e15fd0a610020cfcadf7933a00c9f14a5fa
MD5 6924db341be531d62b474699ddaf06a8
BLAKE2b-256 11641637e0cb3c68711f6ef5db22920e6caf5035bd43bf6ae39302bc45f3822b

See more details on using hashes here.

File details

Details for the file gitspy-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: gitspy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.0 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

Hashes for gitspy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cf309b32fbaa3e44c599f898c760e04ce63a9e2a9f08896930820112aaa5b9dc
MD5 9038257c11edc494651b058c4c2a297a
BLAKE2b-256 eeaf6d0b3095d65b9459ae43a524953008be08643f9b07fc1a08a61090843078

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