Skip to main content

CLI to replace HTTP GET on GitHub API with clones

Project description

GHAPI-conversion

Python version range License Linting, testing, coverage, and release Tested OSs, others may work Documentation coverage codecov Code style: black Imports: isort PyPi: release

CLI to replace HTTP GET on GitHub API with clones.

Why

In GitHub Actions the macOS machines share the same IP range, meaning that users will come against the GitHub quota often. https://github.com/actions/virtual-environments/issues/602

To overcome this issue, use this tool instead of pip install -r. This tool clones rather than GETs:

  • https://api.github.com/repos/<org>/<repo>/zipball#egg=<package_name>
  • https://raw.githubusercontent.com/<org>/<repo>/<branch>/<file>

Additionally, it reuses already cloned repos.

Install package

PyPi

pip install ghapi-conversion

Development

Install dependencies

pip install -r requirements.txt
# On Python 2.7, `pip install mock` in order to run the tests without error

Install package

pip install -e .

Usage

$ python -m ghapi_conversion --help

usage: __main__.py [-h] [--version] (-r FILE | -l LINK)

CLI to replace HTTP GET on GitHub API with clones

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -r FILE, --requirement FILE
                        Install from the given requirements file. This option
                        can be used multiple times.
  -l LINK, --link LINK  Clone instead of HTTPS GET a
                        `https://api.github.com/repos/<org>/<repo>/zipball` or
                        `https://raw.githubusercontent.com/<org>/<repo>/<branch
                        >` link.

Alternatives

  • Manually replace current setup with clones, non GitHub API—or authed—hosted alternatives
  • Pack dependencies and download and extract this archive from non GitHub API—or authed—hosted alternative
  • Seamlessly do what ghapi_conversion does, by self-hosting a proxy server

License

CC0.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the CC0 license, shall be licensed under CC0, without any additional terms or conditions.

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

ghapi_conversion-0.0.7.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

ghapi_conversion-0.0.7-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file ghapi_conversion-0.0.7.tar.gz.

File metadata

  • Download URL: ghapi_conversion-0.0.7.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.0 importlib_metadata/3.7.3 packaging/20.9 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for ghapi_conversion-0.0.7.tar.gz
Algorithm Hash digest
SHA256 34af4e7d9da55cb07e003211d5d199779a888a8d31578da796b87af3d43a5f53
MD5 f2ffeb8c192665561998b560ce83de49
BLAKE2b-256 d10d293a5f6d64d0a6184af7817b530a092425c276d74d7678387b3a2cab1c95

See more details on using hashes here.

File details

Details for the file ghapi_conversion-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: ghapi_conversion-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.0 importlib_metadata/3.7.3 packaging/20.9 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for ghapi_conversion-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f267aa61922d450cdc2355849a522b46010716a96b150c75fd3e4066a660242c
MD5 16d31be8c8629a3e280e93513cb9c989
BLAKE2b-256 71696870e87a6e56aeeba9af2343fdf5157004b0d7f72e83c4672f26efae8d7d

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