Skip to main content

ghget logo

PyPI version PyPI - Downloads Build Status Code Style pre-commit Contributor Covenant GitHub

Description

Download single files or directories from a GitHub repository without cloning its entire contents.

Features

  • No need to manually create a raw GitHub url for individual files, just provide the web url.
  • Recursively download entire directories.
  • Download from private repos by setting a GITHUB_TOKEN environment variable.
  • Lightweight, easy to install, and easy to use.

Installation

The ghget package can be installed directly using pip.

pip install ghget

Usage

  • Easily download single files given the GitHub url:
$ ghget https://github.com/naiquevin/pipdeptree/blob/master/pipdeptree.py
Downloading pipdeptree.py file...
Done!
  • Recursively download a specific directory from a GitHub repo:
$ ghget https://github.com/pandas-dev/pandas/tree/master/scripts
Downloading scripts directory...
Done!

$ tree
.
└── scripts
    ├── __init__.py
    ├── generate_pip_deps_from_conda.py
    ├── list_future_warnings.sh
    ├── no_bool_in_generic.py
    ├── pandas_errors_documented.py
    ├── sync_flake8_versions.py
    ├── tests
    │   ├── __init__.py
    │   ├── conftest.py
    │   ├── test_no_bool_in_generic.py
    │   ├── test_sync_flake8_versions.py
    │   ├── test_use_pd_array_in_core.py
    │   └── test_validate_docstrings.py
    ├── use_pd_array_in_core.py
    ├── validate_docstrings.py
    └── validate_rst_title_capitalization.py

Options

usage: ghget [-h] url

positional arguments:
  url         The url for the file or directory you want to download.

optional arguments:
  -h, --help  show this help message and exit

Metadata

Release files for ghget 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ghget 0.3.1
File Size Uploaded
ghget-0.3.1.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ghget 0.3.1
File Interpreter ABI Platform
ghget-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / ghget-0.3.1.tar.gz

Download URL ghget-0.3.1.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
734d23096b8a0721543dbb01d05793f724db43559e34a00eb0925505ba50fc14
BLAKE2b-256 checksum
How to use checksums
2d7a13e7a60e496c63cf9f51981450f78ee42cd61a86803fb4c5a9ddcc9a124b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / ghget-0.3.1-py3-none-any.whl

Download URL ghget-0.3.1-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5039cec2d45cd5ff58269ae4c811dfa8f510c50a6fe70f360cf8e7dc561f3fb
BLAKE2b-256 checksum
How to use checksums
5eecf915e9f8d1e650683d008563be942395d40b27ebe1235fdafceb9b6376bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page