Skip to main content

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 clone by 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

  1. 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}")
  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

artifetch-0.0.10.tar.gz (27.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

artifetch-0.0.10-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file artifetch-0.0.10.tar.gz.

File metadata

  • Download URL: artifetch-0.0.10.tar.gz
  • Upload date:
  • Size: 27.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for artifetch-0.0.10.tar.gz
Algorithm Hash digest
SHA256 8268be6abbff72544292a5c4b94704437b5e200af27a17fae5641ccb56eff282
MD5 94aa6c9977b9fe70bb613aa01c4ff20d
BLAKE2b-256 a933eec168052527b27735d3d5ac276702754bf572a569bc433ad7cf01d58d9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for artifetch-0.0.10.tar.gz:

Publisher: publish.yml on gemmamary/artifetch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file artifetch-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: artifetch-0.0.10-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

Hashes for artifetch-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 90c4e5bd8ffd2436f2712c4053672fb1f6fc5d6092b6c7b9741705e356ce2a64
MD5 982da32f52ebd12bc14d1b0ba0fac262
BLAKE2b-256 4eacf7f3a56a5afee9eabcdf99f86e34d0698b8b1c60986b08ad595028e6074a

See more details on using hashes here.

Provenance

The following attestation bundles were made for artifetch-0.0.10-py3-none-any.whl:

Publisher: publish.yml on gemmamary/artifetch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page