Download single files or folders from a github repository without cloning its entire contents.
Project description
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
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
ghget-0.3.1.tar.gz
(5.1 kB
view details)
Built Distribution
ghget-0.3.1-py3-none-any.whl
(5.7 kB
view details)
File details
Details for the file ghget-0.3.1.tar.gz
.
File metadata
- Download URL: ghget-0.3.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 734d23096b8a0721543dbb01d05793f724db43559e34a00eb0925505ba50fc14 |
|
MD5 | a9785d7c2f5ea0c8a39eb075328d12d8 |
|
BLAKE2b-256 | 2d7a13e7a60e496c63cf9f51981450f78ee42cd61a86803fb4c5a9ddcc9a124b |
File details
Details for the file ghget-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: ghget-0.3.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5039cec2d45cd5ff58269ae4c811dfa8f510c50a6fe70f360cf8e7dc561f3fb |
|
MD5 | c7f1c849e56a869570b746c92ff1649a |
|
BLAKE2b-256 | 5eecf915e9f8d1e650683d008563be942395d40b27ebe1235fdafceb9b6376bd |