Forklet
Download any file or folder from any GitHub repo by branch, tag, or commit with glob pattern filtering.
Features
- ✅ Download entire repositories or specific files/folders
- ✅ Support for branches, tags, and specific commits
- ✅ Advanced filtering with glob patterns
- ✅ Rate limiting and intelligent retry mechanisms
- ✅ Concurrent downloads for better performance
- ✅ Both CLI and Python API interfaces
- ✅ Comprehensive error handling and logging
- ✅ Cache support for repeated downloads
Installation
pip install forklet
Or from source
git clone https://github.com/AllDotPy/Forklet.git
cd forklet
pip install -e .
CLI Usage
# Download entire repository
forklet download octocat/hello-world ./downloads
# Download specific branch
forklet download octocat/hello-world ./downloads --ref develop
# Download with filtering
forklet download octocat/hello-world ./downloads \
--include "*.py" \
--exclude "test_*" \
--max-size 1000000
# Download with authentication
forklet download private-owner/private-repo ./downloads --token YOUR_GITHUB_TOKEN
# Show repository information
forklet info octocat/hello-world
Python API Usage
from forklet import GitHubDownloader
from pathlib import Path
# Initialize downloader
downloader = GitHubDownloader(auth_token="your_github_token")
# Download entire repository
result = await downloader.download(
owner="octocat",
repo="hello-world",
destination=Path("./downloads"),
ref="main",
include_patterns=["*.py", "*.md"],
exclude_patterns=["test_*"]
)
print(f"Downloaded {len(result.downloaded_files)} files")
print(f"Total size: {result.progress.downloaded_bytes} bytes")
# Download specific directory
result = await downloader.download_directory(
owner="octocat",
repo="hello-world",
directory_path="src",
destination=Path("./src-only")
)
# Download specific file
result = await downloader.download_file(
owner="octocat",
repo="hello-world",
file_path="README.md",
destination=Path("./readme.md")
)
🤝 Contributing
We welcome contributions from the community! Please see the CONTRIBUTING.md guide for more information.
License 📜
Apache-2.0 license © 2025 AllDotPy
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
forklet-0.1.2.tar.gz
(66.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
forklet-0.1.2-py3-none-any.whl
(83.5 kB
view details)
File details
Details for the file forklet-0.1.2.tar.gz.
File metadata
- Download URL: forklet-0.1.2.tar.gz
- Upload date:
- Size: 66.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a33ee476bd509896647e5eb89815092b0babdf09ce122b53749474399dfc7e11
|
|
| MD5 |
1d7df058e3fc23b6ab2969bdd3065925
|
|
| BLAKE2b-256 |
218cab069aac3de9812bb95c42c3450bbf9efb9b3a00e5939c224dd989666844
|
File details
Details for the file forklet-0.1.2-py3-none-any.whl.
File metadata
- Download URL: forklet-0.1.2-py3-none-any.whl
- Upload date:
- Size: 83.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad6d4a41f0d24f3690ba65750c686f7527de0e0cf6fd429ed63a30481adc14e1
|
|
| MD5 |
28d5b4738cd8fa919fcb5f309a8dfc51
|
|
| BLAKE2b-256 |
079349867d98ecfc31e87b6f2e578bf477df93af8f2b2b6fcaf3e47210091a32
|