githubtakeout


Namegithubtakeout JSON
Version 0.1.8 PyPI version JSON
download
home_pageNone
SummaryArchive public Git Repos and Gists from GitHub
upload_time2025-08-21 18:46:49
maintainerCorey Goldberg
docs_urlNone
authorCorey Goldberg
requires_python>=3.12
licenseNone
keywords git github archive backup export takeout
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # githubtakeout

## Archive Git Repos and Gists from GitHub

---

- Copyright (c) 2015-2025 [Corey Goldberg][github-home]
- Development: [GitHub][github-repo]
- Download/Install: [PyPI][pypi-githubtakeout]
- License: [MIT][mit-license]

----

## About:

`githubtakeout` is a data export tool for archiving Git repositories hosted on GitHub.
It clones a user's repos and creates an archive of each.

It supports public/private repos and public/secret gists. By default, it doesn't save
commit history or branches (`.git` directory), or Gist repositories (both can be enabled
with command line options).

When you run the program, archives of your repos will be saved in a directory named
`backups` inside your current working directory, unless a different location is specified
using the `--dir` option.

Archives are saved in compressed zip format (`.zip`) by default, but can also be saved
as tarballs (`.tar.gz`) using the `--format=tar` option.

## Requirements:

- Python 3.12+
- Git 1.7+
- Python packages:
    - [GitPython][pypi-gitpython]
    - [PyGithub][pypi-pygithub]
    - [rich][pypi-rich]

## Installation:

Install from [PyPI][pypyi-githubtakeout]:

```
pip install githubtakeout
```

## Authentication:

By default, `githubtakeout` will only retrieve an account's public repos. To access private repos and secret gists,
you need to authenticate.

First, you must create a [personal access token][github-pat] on Github (either a fine-grained or classic personal
access token). Once you have a token, you can set the `GITHUB_TOKEN` environment variable:

```
$ export GITHUB_TOKEN=<access token>
```

If you prefer to be prompted for your token each time you run the program, use the `--token` argument.

### CLI Options:

```
usage: githubtakeout [-h] [--dir DIR] [--format {tar,zip}] [--gists] [--history] [--list] [--token] username

positional arguments:
  username            github username

options:
  -h, --help          show this help message and exit
  --dir DIR           output directory (default: ./)
  --format {tar,zip}  archive format (default: zip)
  --gists             include gists
  --history           include commit history and branches (.git directory)
  --list              list repos only
  --token             prompt for auth token
```

## Usage Examples:

### Install from PyPI with pipx, Run:

```
pipx install githubtakeout
githubtakeout <github username>
```

### Clone Repo, Create/Activate Virtual Environment, Install from Source, Run:

```
git clone git@github.com:cgoldberg/githubtakeout.git
cd ./githubtakeout
python3 -m venv venv
source venv/bin/activate
pip install .
githubtakeout <github username>
```


[github-home]: https://github.com/cgoldberg
[github-repo]: https://github.com/cgoldberg/sudokubot
[github-pat]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
[pypi-githubtakeout]: https://pypi.org/project/githubtakeout
[pypi-gitpython]: https://pypi.org/project/GitPython
[pypi-pygithub]: https://pypi.org/project/PyGithub
[pypi-rich]: https://pypi.org/project/rich
[mit-license]: https://raw.githubusercontent.com/cgoldberg/githubtakeout/refs/heads/master/LICENSE

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "githubtakeout",
    "maintainer": "Corey Goldberg",
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "git, github, archive, backup, export, takeout",
    "author": "Corey Goldberg",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/4a/8a/5f72455d555e68b07858f1448a9d5e66549b237cc8153d66be90e242c8e5/githubtakeout-0.1.8.tar.gz",
    "platform": null,
    "description": "# githubtakeout\r\n\r\n## Archive Git Repos and Gists from GitHub\r\n\r\n---\r\n\r\n- Copyright (c) 2015-2025 [Corey Goldberg][github-home]\r\n- Development: [GitHub][github-repo]\r\n- Download/Install: [PyPI][pypi-githubtakeout]\r\n- License: [MIT][mit-license]\r\n\r\n----\r\n\r\n## About:\r\n\r\n`githubtakeout` is a data export tool for archiving Git repositories hosted on GitHub.\r\nIt clones a user's repos and creates an archive of each.\r\n\r\nIt supports public/private repos and public/secret gists. By default, it doesn't save\r\ncommit history or branches (`.git` directory), or Gist repositories (both can be enabled\r\nwith command line options).\r\n\r\nWhen you run the program, archives of your repos will be saved in a directory named\r\n`backups` inside your current working directory, unless a different location is specified\r\nusing the `--dir` option.\r\n\r\nArchives are saved in compressed zip format (`.zip`) by default, but can also be saved\r\nas tarballs (`.tar.gz`) using the `--format=tar` option.\r\n\r\n## Requirements:\r\n\r\n- Python 3.12+\r\n- Git 1.7+\r\n- Python packages:\r\n    - [GitPython][pypi-gitpython]\r\n    - [PyGithub][pypi-pygithub]\r\n    - [rich][pypi-rich]\r\n\r\n## Installation:\r\n\r\nInstall from [PyPI][pypyi-githubtakeout]:\r\n\r\n```\r\npip install githubtakeout\r\n```\r\n\r\n## Authentication:\r\n\r\nBy default, `githubtakeout` will only retrieve an account's public repos. To access private repos and secret gists,\r\nyou need to authenticate.\r\n\r\nFirst, you must create a [personal access token][github-pat] on Github (either a fine-grained or classic personal\r\naccess token). Once you have a token, you can set the `GITHUB_TOKEN` environment variable:\r\n\r\n```\r\n$ export GITHUB_TOKEN=<access token>\r\n```\r\n\r\nIf you prefer to be prompted for your token each time you run the program, use the `--token` argument.\r\n\r\n### CLI Options:\r\n\r\n```\r\nusage: githubtakeout [-h] [--dir DIR] [--format {tar,zip}] [--gists] [--history] [--list] [--token] username\r\n\r\npositional arguments:\r\n  username            github username\r\n\r\noptions:\r\n  -h, --help          show this help message and exit\r\n  --dir DIR           output directory (default: ./)\r\n  --format {tar,zip}  archive format (default: zip)\r\n  --gists             include gists\r\n  --history           include commit history and branches (.git directory)\r\n  --list              list repos only\r\n  --token             prompt for auth token\r\n```\r\n\r\n## Usage Examples:\r\n\r\n### Install from PyPI with pipx, Run:\r\n\r\n```\r\npipx install githubtakeout\r\ngithubtakeout <github username>\r\n```\r\n\r\n### Clone Repo, Create/Activate Virtual Environment, Install from Source, Run:\r\n\r\n```\r\ngit clone git@github.com:cgoldberg/githubtakeout.git\r\ncd ./githubtakeout\r\npython3 -m venv venv\r\nsource venv/bin/activate\r\npip install .\r\ngithubtakeout <github username>\r\n```\r\n\r\n\r\n[github-home]: https://github.com/cgoldberg\r\n[github-repo]: https://github.com/cgoldberg/sudokubot\r\n[github-pat]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens\r\n[pypi-githubtakeout]: https://pypi.org/project/githubtakeout\r\n[pypi-gitpython]: https://pypi.org/project/GitPython\r\n[pypi-pygithub]: https://pypi.org/project/PyGithub\r\n[pypi-rich]: https://pypi.org/project/rich\r\n[mit-license]: https://raw.githubusercontent.com/cgoldberg/githubtakeout/refs/heads/master/LICENSE\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Archive public Git Repos and Gists from GitHub",
    "version": "0.1.8",
    "project_urls": {
        "download": "https://pypi.org/project/githubtakeout",
        "homepage": "https://github.com/cgoldberg/githubtakeout",
        "source": "https://github.com/cgoldberg/githubtakeout"
    },
    "split_keywords": [
        "git",
        " github",
        " archive",
        " backup",
        " export",
        " takeout"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d7f00c961dc517f1e121721fdd197a46cf4a55b477128b6fa7442f2b506b6a92",
                "md5": "18b67e8618fa4db52760e3057aab2630",
                "sha256": "cfcbe02ffc8acb489844b52bf26304f96e46c31436438eb9af99aca57cfcb9e8"
            },
            "downloads": -1,
            "filename": "githubtakeout-0.1.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "18b67e8618fa4db52760e3057aab2630",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 7667,
            "upload_time": "2025-08-21T18:46:48",
            "upload_time_iso_8601": "2025-08-21T18:46:48.278330Z",
            "url": "https://files.pythonhosted.org/packages/d7/f0/0c961dc517f1e121721fdd197a46cf4a55b477128b6fa7442f2b506b6a92/githubtakeout-0.1.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4a8a5f72455d555e68b07858f1448a9d5e66549b237cc8153d66be90e242c8e5",
                "md5": "36ce96453a16ea3d391a32f1bac172c6",
                "sha256": "929690f82f6f6788b05b9a03da2625d5e8a4fb89ad9d34ae9467630e3a0a6a27"
            },
            "downloads": -1,
            "filename": "githubtakeout-0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "36ce96453a16ea3d391a32f1bac172c6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 7219,
            "upload_time": "2025-08-21T18:46:49",
            "upload_time_iso_8601": "2025-08-21T18:46:49.400797Z",
            "url": "https://files.pythonhosted.org/packages/4a/8a/5f72455d555e68b07858f1448a9d5e66549b237cc8153d66be90e242c8e5/githubtakeout-0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-21 18:46:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cgoldberg",
    "github_project": "githubtakeout",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "githubtakeout"
}
        
Elapsed time: 0.53282s