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
Metadata
Release files for forklet 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| forklet-0.1.2.tar.gz | 66.1 kB | Without provenance | Details for forklet-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| forklet-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for forklet-0.1.2-py3-none-any.whl |
Total release size: 149.5 kB
Release files / forklet-0.1.2.tar.gz
| Download URL | forklet-0.1.2.tar.gz |
|---|---|
| Size | 66.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a33ee476bd509896647e5eb89815092b0babdf09ce122b53749474399dfc7e11
|
|
BLAKE2b-256 checksum How to use checksums |
218cab069aac3de9812bb95c42c3450bbf9efb9b3a00e5939c224dd989666844
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.18
|
Release files / forklet-0.1.2-py3-none-any.whl
| Download URL | forklet-0.1.2-py3-none-any.whl |
|---|---|
| Size | 83.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ad6d4a41f0d24f3690ba65750c686f7527de0e0cf6fd429ed63a30481adc14e1
|
|
BLAKE2b-256 checksum How to use checksums |
079349867d98ecfc31e87b6f2e578bf477df93af8f2b2b6fcaf3e47210091a32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.18
|
Security for forklet 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.