> built 2026-11-22 17:01 UTC from 6521c0b (master) · git2py 0.0.8. Details: build_info.json

# index.html.md

<!-- generated by epythet -->

# git2py

Some git (gitlab and github) tools.

To install:	`pip install git2py`

Note: The intent of this package was to provide a simple, high-level interface to git.
Namely to github and gitlab, allowing for easy access to the resources of these
platforms, and that would be easy to extend to other platforms.

What ended up happening is that we accumulated some useful tools, but stopped
development after our main purpose was acheived (migrating from gitlab to github).

We may pick this project up again in the future, but for now, it’s in a state of
“good enough for now”, and we’re keeping it around to use the tools we’ve built.

You may want to check out some other projects that may have more active development:

- [hubcap](https://github.com/thorwhalen/hubcap): A mapping interface to github
- [ps](https://github.com/thorwhalen/ps): Call any available system command from python
- some bits of
  [wads](https://github.com/i2mint/wads/blob/b82a534bfc9c3f20713e0768291c67c9c2467e01/wads/util.py#L39) and
  [isee](https://github.com/i2mint/isee/blob/54fa4b2343cb2510f7a9cc34fe4e512ef6050795/isee/common.py#L17)

<p class="epythet-aggregates">This documentation as a single file: <a href="git2py.md">git2py.md</a> (Markdown, for agents).</p>


# _autosummary/git2py.gitlab_utils.html.md

# git2py.gitlab_utils

Stores to talk to gitlab, using requests.

### Example

```text
ogl = GitLabAccessor(base_url="http://...", project_name=None)

print(ogl.get_project_names())  # prints all project names
ogl.set_project("PROJECT_NAME")  # sets the project to "PROJECT_NAME"
print(
    ogl.get_branch_names()
)  # gets the branch names of current project (as set previously)
print(
    ogl.get_branch("master")
)  # gets a json of information about the master branch of current project.
```

### Functions

| `get_request_constructor`()   |    |
|-------------------------------|----|
| `mk_url_factory`(base_url)    |    |

### Classes

| `GitLabAccessor`([base_url, project_name, ...])                                                 |    |
|-------------------------------------------------------------------------------------------------|----|
| [`GitlabProjectReader`](_autosummary/git2py.gitlab_utils.html.md#git2py.gitlab_utils.GitlabProjectReader)(base_url[, private_token]) |    |

### *class* git2py.gitlab_utils.GitlabProjectReader(base_url, private_token=None)

Bases: `KvReader`


# _autosummary/git2py.html.md

# git2py

Git tools.

#### NOTE
The intent of this package was to provide a simple, high-level interface to git.
Namely to github and gitlab, allowing for easy access to the resources of these
platforms, and that would be easy to extend to other platforms.

What ended up happening is that we accumulated some useful tools, but stopped
development after our main purpose was acheived (migrating from gitlab to github).

We may pick this project up again in the future, but for now, it’s in a state of
“good enough for now”, and we’re keeping it around to use the tools we’ve built.

You may want to check out some other projects that may have more active development:

- [hubcap](https://github.com/thorwhalen/hubcap): A mapping interface to github
- [ps](https://github.com/thorwhalen/ps): Call any available system command from python
- some bits of
  [wads](https://github.com/i2mint/wads/blob/b82a534bfc9c3f20713e0768291c67c9c2467e01/wads/util.py#L39) and
  [isee](https://github.com/i2mint/isee/blob/54fa4b2343cb2510f7a9cc34fe4e512ef6050795/isee/common.py#L17)

### Modules

| [`gitlab_utils`](_autosummary/git2py.gitlab_utils.html.md#module-git2py.gitlab_utils)   | Stores to talk to gitlab, using requests.           |
|--------------------------------------------------------------------------------------------|-----------------------------------------------------|
| [`migration`](_autosummary/git2py.migration.html.md#module-git2py.migration)         | Migrate git repositories between GitHub and GitLab. |


# _autosummary/git2py.migration.html.md

# git2py.migration

Migrate git repositories between GitHub and GitLab.

### Functions

| `cd`(path)                                 |    |
|--------------------------------------------|----|
| `create_issues_from_wikis`(gitlab_project) |    |
| `git`(\*args)                              |    |
| `migrate_project`(gitlab_project, ...)     |    |
| `mirror_repo`(\*args, \*\*kwargs)          |    |
| `npm`(\*args)                              |    |
| `run_cmd_line`(exe, \*args)                |    |
| `update_file`(path, pattern, replace)      |    |
| `work_under_tmp_dir`(func)                 |    |

### Classes

| `Migration`(gitlab_base_url, gitlab_token, ...)   |    |
|---------------------------------------------------|----|


# about-this-build.html.md

<!-- generated by epythet -->

# About this build

This documentation was built on **2026-11-22 17:01 UTC** from commit <a href="https://github.com/i2mint/git2py/commit/6521c0bae2e0ede31e9edda8df7f9f8a9b3169f6"><code>6521c0b</code></a> on branch <code>master</code>, for **git2py 0.0.8** (from <code>pyproject.toml</code>).

#### NOTE
Nothing suggests a mismatch: the tree was clean at the commit above, and the documented version is the one on PyPI.

## Source

|                     |                                                                                                                                                      |
|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
| Commit              | <a href="https://github.com/i2mint/git2py/commit/6521c0bae2e0ede31e9edda8df7f9f8a9b3169f6"><code>6521c0bae2e0ede31e9edda8df7f9f8a9b3169f6</code></a> |
| Branch              | <code>master</code>                                                                                                                                  |
| Tags at this commit | none                                                                                                                                                 |
| Working tree        | clean                                                                                                                                                |
| Remote              | <code>https://github.com/i2mint/git2py</code>                                                                                                        |

## Continuous integration

|              |                                                                                            |
|--------------|--------------------------------------------------------------------------------------------|
| Repository   | <code>i2mint/git2py</code>                                                                 |
| Run          | <a href="https://github.com/i2mint/git2py/actions/runs/45046967533">45046967533</a>        |
| Ref          | <code>refs/heads/master</code>                                                             |
| Event commit | <code>6521c0bae2e0ede31e9edda8df7f9f8a9b3169f6</code> (in the history of the built commit) |

## Tools

|          |         |
|----------|---------|
| epythet  | 0.2.23  |
| Sphinx   | 9.1.1   |
| docutils | 0.22.4  |
| Python   | 3.12.16 |

## Configuration as resolved

|               |                                                                   |
|---------------|-------------------------------------------------------------------|
| theme         | <code>auto</code> (Sphinx theme <code>pydata_sphinx_theme</code>) |
| accent        | <code>#93332f</code>                                              |
| api_generator | <code>autosummary</code>                                          |
| ignore        | <code>tests/</code>, <code>scrap/</code>, <code>examples/</code>  |
| agent_outputs | <code>true</code>                                                 |
| aggregates    | <code>md</code>                                                   |
| ai_artifacts  | <code>true</code>                                                 |

## Package on PyPI

Latest release: <a href="https://pypi.org/project/git2py/0.0.8/">0.0.8</a>, the same as the documented version.

## Reproduce

```bash
git clone https://github.com/i2mint/git2py && cd git2py
git checkout 6521c0bae2e0ede31e9edda8df7f9f8a9b3169f6
pip install "epythet==0.2.23"
epythet quickstart . --ignore tests/ scrap/ examples/
```

The same data, for machines: <a href="build_info.json"><code>build_info.json</code></a> (schema version 1).


# api.html.md

# API reference

| [`git2py`](_autosummary/git2py.html.md#module-git2py)   | Git tools.   |
|-------------------------------------------------------------------------|--------------|


