gitbolt 0.0.0.dev1__py3-none-any.whl → 0.0.0.dev2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
gitbolt/__init__.py CHANGED
@@ -4,6 +4,7 @@
4
4
  """
5
5
  Git command interfaces with default implementation using subprocess calls.
6
6
  """
7
+ from pathlib import Path
7
8
 
8
9
  # region imports
9
10
  # region base related imports
@@ -16,3 +17,22 @@ from gitbolt.base import Version as Version
16
17
  from gitbolt.base import Add as Add
17
18
  # endregion
18
19
  # endregion
20
+
21
+
22
+ def get_git(git_root_dir: Path = Path.cwd()) -> Git:
23
+ """
24
+ Get operational and programmatic ``Git``.
25
+
26
+ Examples:
27
+
28
+ * Get git version:
29
+
30
+ >>> import subprocess
31
+ >>> import gitbolt
32
+ >>> git = gitbolt.get_git()
33
+ >>> assert git.version == subprocess.run(['git', 'version'], capture_output=True, text=True).stdout.strip()
34
+
35
+ :param git_root_dir: Path to the git repo root directory. Defaults to current working directory.
36
+ """
37
+ from gitbolt.git_subprocess.impl.simple import SimpleGitCommand
38
+ return SimpleGitCommand(git_root_dir)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitbolt
3
- Version: 0.0.0.dev1
3
+ Version: 0.0.0.dev2
4
4
  Summary: Fast, flexible and type-safe Git commands in Python.
5
5
  Author-email: Suhas Krishna Srivastava <suhas.srivastava@vaastav.tech>
6
6
  Maintainer-email: Suhas Krishna Srivastava <suhas.srivastava@vaastav.tech>
@@ -1,4 +1,4 @@
1
- gitbolt/__init__.py,sha256=oGR5nG5-sMwKrU0xa5wNuBYX4bfUa4KjSKS0WpwfVM0,536
1
+ gitbolt/__init__.py,sha256=JoTGr9hj_Ua8hlyO-_52HTGSqPgG2tM31V7-nvq0uXw,1123
2
2
  gitbolt/_internal_init.py,sha256=alSsIMgBWHmOdUo7P1ewftR12xPv8vb3ZgECuVsRMwk,485
3
3
  gitbolt/add.py,sha256=F16d0SQfLrjbpUzJIjKFwGU4KLSjqtYLOA9oZ5gdNS0,31731
4
4
  gitbolt/base.py,sha256=eUjzfu0OilCrOpxpwRyCSs7HD83OaXk6BCzxT8LKKhU,9322
@@ -20,8 +20,8 @@ gitbolt/git_subprocess/impl/simple.py,sha256=nMxZYp1ayX6kyigLzIfrT5kNLvTd3KjYPDU
20
20
  gitbolt/git_subprocess/runner/__init__.py,sha256=LPxbj3AwKLXyDxxCLwAVtl5b5SKjaNDj99lkKz6VSOU,177
21
21
  gitbolt/git_subprocess/runner/base.py,sha256=Sof2WaNyYULiObRF7WjaGs7-yGrdyeHUXchE2tg1820,1562
22
22
  gitbolt/git_subprocess/runner/simple_impl.py,sha256=ov8lXamu489twQanej0lCkkjBmEXvXxqGrWI_aK3JzQ,2484
23
- gitbolt-0.0.0.dev1.dist-info/licenses/LICENSE,sha256=pOzr5bMWS6mHi3vro8d5vw0qW1i14rVq2XFrDuystVY,11372
24
- gitbolt-0.0.0.dev1.dist-info/METADATA,sha256=405JbuYEnngAtA4a-mVwfhSNMZTmOwDzzzZjMAnk2-Y,10724
25
- gitbolt-0.0.0.dev1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
26
- gitbolt-0.0.0.dev1.dist-info/top_level.txt,sha256=QCXclkzSPZjgamcwB6XuKJexaJ1as_TLUUSGdIDA7VY,8
27
- gitbolt-0.0.0.dev1.dist-info/RECORD,,
23
+ gitbolt-0.0.0.dev2.dist-info/licenses/LICENSE,sha256=pOzr5bMWS6mHi3vro8d5vw0qW1i14rVq2XFrDuystVY,11372
24
+ gitbolt-0.0.0.dev2.dist-info/METADATA,sha256=_v6jEbj5nl1U_aB4-TarZpGiZZ3fe9k1sjjqMMksopk,10724
25
+ gitbolt-0.0.0.dev2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
26
+ gitbolt-0.0.0.dev2.dist-info/top_level.txt,sha256=QCXclkzSPZjgamcwB6XuKJexaJ1as_TLUUSGdIDA7VY,8
27
+ gitbolt-0.0.0.dev2.dist-info/RECORD,,