Artifetch (High-Level README)
Overview
Artifetch is a universal fetcher for developer assets. In v1 it focuses on Git-based workflows and related content.
The purpose of Artifetch
- Fetch full repositories via shallow Git clone (with optional branch/tag).
- Fetch repository content without Git (entire repo contents, a subfolder flattened into the destination, or a single file).
- Fetch build artifacts (e.g., GitLab job artifacts, Artifactory downloads).
Core Fetchers
- RepoCloneFetcher (module: artifetch.fetchers.repo_clone)
Shallow
git cloneby default, optional branch/tag checkout. See detailed guide: docs/RepoCloneFetcher.md
Installation
From PyPI: pip install artifetch
From source: pip install -e .
High-Level Usage Examples
- Clone a repository (default branch)
from pathlib import Path
from artifetch.fetchers.repo_clone import RepoCloneFetcher
fetcher = RepoCloneFetcher()
target = fetcher.fetch("https://gitlab.com/org/repo.git", Path("./repos"))
print(f"Cloned to: {target}")
- Clone a repository (specific branch)
from pathlib import Path
from artifetch.fetchers.repo_clone import RepoCloneFetcher
fetcher = RepoCloneFetcher()
target = fetcher.fetch("git@gitlab.com:org/repo.git", Path("./repos"), branch="release/2025.10")
print(f"Cloned to: {target}")
CLI Usage
Artifetch also includes a CLI for automation. Your command layout may vary depending on your integration. Typical examples:
Clone via CLI (default branch)
artifetch repo-clone --source "https://gitlab.com/org/repo.git" --dest ./repos
Clone via CLI (specific branch)
artifetch repo-clone --source "git@gitlab.com:org/repo.git" --dest ./repos --branch main
Environment Variables
Common variables (used by RepoCloneFetcher and/or RepoContentFetcher):
- GIT_BINARY : Path to git executable (RepoCloneFetcher). Default: auto-detect via PATH.
- ARTIFETCH_GIT_HOST : Host for shorthand normalization (RepoCloneFetcher). Default: gitlab.com
- ARTIFETCH_GIT_PROTO : ssh or https for shorthand (RepoCloneFetcher). Default: ssh
- ARTIFETCH_GIT_USER : SSH user for shorthand (RepoCloneFetcher). Default: git
- GITLAB_TOKEN : Optional token for private GitLab when using RepoContentFetcher (and GitLabFetcher).
- ARTIFETCH_GITLAB_API_BASE: Optional explicit GitLab API base (e.g., https://git.example.local/api/v4)
- ARTIFETCH_GIT_HOST (same name, used by RepoContentFetcher env-discovery for GitLab host if needed)
Example (shell): export ARTIFETCH_GIT_PROTO=https export ARTIFETCH_GIT_HOST=git.mycorp.local
Or in a .env file: ARTIFETCH_GIT_PROTO=https ARTIFETCH_GIT_HOST=git.mycorp.local
Documentation
- docs/RepoCloneFetcher.md (detailed clone behavior, flags, troubleshooting)
- RepoContentFetcher (coming soon)
- GitLabFetcher (coming soon)
- ArtifactoryFetcher (coming soon)
Roadmap
-
RepoContentFetcher (module: artifetch.fetchers.repo_content) Download repository files without
.git(full repo snapshot, a subfolder flattened, or a single file). -
GitLabFetcher (module: artifetch.fetchers.gitlab) Retrieve GitLab job artifacts.
-
ArtifactoryFetcher (module: artifetch.fetchers.artifactory) Download artifacts from Artifactory.
License
MIT
Metadata
Release files for artifetch 0.0.14
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 | |
|---|---|---|---|---|
| artifetch-0.0.14.tar.gz | 27.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| artifetch-0.0.14-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.0 kB
Release files / artifetch-0.0.14.tar.gz
| Download URL | artifetch-0.0.14.tar.gz |
|---|---|
| Size | 27.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
501b4856706362e24f7131326d9fd734cf4a21a0636013ed13f713ed775d3aa4
|
|
BLAKE2b-256 checksum How to use checksums |
3a96f35e230e3110a427a0542cc2c5fa11ffd0808653b44048a048699c177055
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2025.
Transparency logRelease files / artifetch-0.0.14-py3-none-any.whl
| Download URL | artifetch-0.0.14-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bc0df11e43c687bbe9b73fbad374325a895c8a573b8b880b8b56e57c45109927
|
|
BLAKE2b-256 checksum How to use checksums |
a63984f04118eee86c05f4361802cefd64ab03f9e4fbfe43e52b3c6fd1fa6181
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2025.
Transparency logSecurity for artifetch 0.0.14
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for artifetch-0.0.14.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2025.
Transparency logA 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.