Universal artifact fetcher for Artifactory, GitLab, and Git.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file artifetch-0.0.13.tar.gz.
File metadata
- Download URL: artifetch-0.0.13.tar.gz
- Upload date:
- Size: 23.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d3b3a2fdcbb2ceb8cf864a3b2107ec80cdd02cf444c10bf48187ab489ff575f
|
|
| MD5 |
a6c310868e2585d861c7b8c030c0f8c4
|
|
| BLAKE2b-256 |
b6c4f995ecb408c77534f8a57d0024d19c01808d829aa8e041eedfa9dbf82270
|
Provenance
The following attestation bundles were made for artifetch-0.0.13.tar.gz:
Publisher:
publish.yml on gemmamary/artifetch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
artifetch-0.0.13.tar.gz -
Subject digest:
4d3b3a2fdcbb2ceb8cf864a3b2107ec80cdd02cf444c10bf48187ab489ff575f - Sigstore transparency entry: 641507966
- Sigstore integration time:
-
Permalink:
gemmamary/artifetch@062392d7de8cba25259dc4a7b606a260f8f001b7 -
Branch / Tag:
refs/tags/v0.0.13 - Owner: https://github.com/gemmamary
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@062392d7de8cba25259dc4a7b606a260f8f001b7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file artifetch-0.0.13-py3-none-any.whl.
File metadata
- Download URL: artifetch-0.0.13-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0ce759b8eaa197493b82a9be86879a8fe8093748cc26e2079803c4032d1c717
|
|
| MD5 |
8db2d135e9cf337b0707bbbe912f5738
|
|
| BLAKE2b-256 |
040b64e28ec1e5f686b5b12275f2a6721ef72c936c77861967e34580b210ad30
|
Provenance
The following attestation bundles were made for artifetch-0.0.13-py3-none-any.whl:
Publisher:
publish.yml on gemmamary/artifetch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
artifetch-0.0.13-py3-none-any.whl -
Subject digest:
f0ce759b8eaa197493b82a9be86879a8fe8093748cc26e2079803c4032d1c717 - Sigstore transparency entry: 641508012
- Sigstore integration time:
-
Permalink:
gemmamary/artifetch@062392d7de8cba25259dc4a7b606a260f8f001b7 -
Branch / Tag:
refs/tags/v0.0.13 - Owner: https://github.com/gemmamary
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@062392d7de8cba25259dc4a7b606a260f8f001b7 -
Trigger Event:
push
-
Statement type: