Universal artifact fetcher for Artifactory, GitLab, and Git.
Project description
Artifetch
Artifetch is a universal artifact fetcher. In v1, it focuses on Git repositories with:
- Fast shallow clones by default
- Optional branch/tag checkout
- Support for HTTPS, SSH, and GitLab-style shorthand (
group/repo→ full URL)
Features
- Git provider:
- Shallow clone (
--depth 1,--no-tags) - Branch/tag selection via
--branch/-b
- Shallow clone (
Installation
From PyPI:
pip install artifetch
From source:
pip install -e .
CLI Usage
# Clone default branch into ./repos/monorepo
artifetch https://gitlab.com/org/monorepo.git -d ./repos -p git
# Clone and checkout to a specific branch
artifetch https://gitlab.com/org/monorepo.git -d ./repos -p git -b release/1.0
Options:
source: Git URL or shorthand--dest, -d: Destination folder (default:.)--branch, -b: Branch or tag--verbose, -v: Enable debug logs
Python API
High-level helper
from pathlib import Path
from artifetch.core import fetch
dest = Path("./workspace")
# Full repo
path = fetch("https://gitlab.com/org/monorepo.git", dest=dest)
print(path) # ./workspace/monorepo
# Branch
path = fetch("https://gitlab.com/org/monorepo.git", dest=dest, branch="release/1.0")
Direct Git provider
from pathlib import Path
from artifetch.providers.git import GitFetcher
f = GitFetcher()
dest = Path("./workspace")
# SSH URL
p = f.fetch("git@gitlab.com:org/monorepo.git", dest, branch="main")
# HTTPS
p = f.fetch("https://gitlab.com/org/monorepo.git", dest)
Environment Variables
| Variable | Purpose | Default |
|---|---|---|
| GIT_BINARY | Path to git executable | auto-detect |
| ARTIFETCH_GIT_HOST | Host for shorthand normalization | gitlab.com |
| ARTIFETCH_GIT_PROTO | ssh or https for shorthand | ssh |
| ARTIFETCH_GIT_USER | SSH user for shorthand | git |
Example:
shell:
export ARTIFETCH_GIT_PROTO=https
export ARTIFETCH_GIT_HOST=git.mycorp.local
or .env file
ARTIFETCH_GIT_PROTO=https
ARTIFETCH_GIT_HOST=git.mycorp.local
Behavior Details
- Destination rules:
- Full repo →
dest/<repo_name>
- Full repo →
Troubleshooting
- git not found: Install Git or set
GIT_BINARY. - Destination exists: Remove or rename before retry.
Roadmap
- GitLab artifacts
- Artifactory downloads
- Repository Content
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.7.tar.gz.
File metadata
- Download URL: artifetch-0.0.7.tar.gz
- Upload date:
- Size: 16.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 |
9cddf1d3353484c08eaec6599a107a4ce9aae0206595e7ded76692c038e0982e
|
|
| MD5 |
dc0aa651da72c42bbad423c84fb939a8
|
|
| BLAKE2b-256 |
931c1765a9e690ec658ab3544ed38168ece73f74e59ebce0d65ea424019aae1d
|
Provenance
The following attestation bundles were made for artifetch-0.0.7.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.7.tar.gz -
Subject digest:
9cddf1d3353484c08eaec6599a107a4ce9aae0206595e7ded76692c038e0982e - Sigstore transparency entry: 637797013
- Sigstore integration time:
-
Permalink:
gemmamary/artifetch@87294870b02adf1e605e1b08a29635ab64181eba -
Branch / Tag:
refs/tags/v0.0.7 - Owner: https://github.com/gemmamary
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@87294870b02adf1e605e1b08a29635ab64181eba -
Trigger Event:
push
-
Statement type:
File details
Details for the file artifetch-0.0.7-py3-none-any.whl.
File metadata
- Download URL: artifetch-0.0.7-py3-none-any.whl
- Upload date:
- Size: 11.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 |
fcc839142643f1859bb1dcfa2e03c26a4724f0b5376ce8d262c3aacf7d5d2079
|
|
| MD5 |
2862ef64a0052648f7ef67f7868019e4
|
|
| BLAKE2b-256 |
2d474982c0a4c7253ef2cf3c991f03a66541fadf21919b5714988ba5eb068a5e
|
Provenance
The following attestation bundles were made for artifetch-0.0.7-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.7-py3-none-any.whl -
Subject digest:
fcc839142643f1859bb1dcfa2e03c26a4724f0b5376ce8d262c3aacf7d5d2079 - Sigstore transparency entry: 637797032
- Sigstore integration time:
-
Permalink:
gemmamary/artifetch@87294870b02adf1e605e1b08a29635ab64181eba -
Branch / Tag:
refs/tags/v0.0.7 - Owner: https://github.com/gemmamary
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@87294870b02adf1e605e1b08a29635ab64181eba -
Trigger Event:
push
-
Statement type: