Skip to main content

import-git-files

import-git-files Documentation Status

Read The Docs

import-git-files enables defining file imports from 1 or more git repositories (public or private) to local destinations.

This supports use of polyrepos that may be related. Each repository may follow release definitions that the repository should only contain what is released together, yet it may be a sub-project or related project to other repositories. This import tool allows defining imports into other projects which can include commit shas, tags, and releases.

Installation

Requires Python 3.6+ and either OS X or Linux. It is not tested or supported on Windows. This is only developed and tested against GitHub repositories, but may work elsewhere.

pip install import-git-files

Usage

usage: import-git-files [-h] [--version] [-v] [-t TEMPORARY_DIRECTORY_PARENT]
                        [--ssh-key SSH_KEY]
                        input

Import files from other repositories. Define the imports in a JSON file and
pass as input argument. If the repositories are private and require
authentication but you do not have cached credentials and are using it in a
non-interactive way, you can either define a Personal Access Token in your
Environment under variable GITHUB_TOKEN or you can specify a path to an SSH
Deploy Key.

positional arguments:
  input                 The input json with a hash of repo URLs and their
                        value being hash of source path and destination path.
                        Source path should be relative to root of repository
                        and the destination path can be absolute or it can be
                        relative to the PWD.

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -v, --verbose         Set logging to verbose
  -t TEMPORARY_DIRECTORY_PARENT, --temporary-directory-parent TEMPORARY_DIRECTORY_PARENT
                        Optionally set the parent directory for temporary
                        directories or else will use system tmp default.
  --ssh-key SSH_KEY     Path to an SSH Key with access to the repository. This
                        file needs 600 permissions. This cannot be defined in
                        combination with GITHUB_TOKEN environment variable.

note: When needing to setup non-interactive authentication methods, SSH deploy key is preferred over Personal Access Token. If using a PAT, avoid setting verbose logging as it may expose the token.

You can also use import_git_files module in your project and the included context manager, GitExtractedFiles. See the docs for more information.

Metadata

Release files for import-git-files 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for import-git-files 0.1.0
File Size Uploaded
import-git-files-0.1.0.tar.gz 16.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for import-git-files 0.1.0
File Interpreter ABI Platform
import_git_files-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.0 kB

Release files / import-git-files-0.1.0.tar.gz

Download URL import-git-files-0.1.0.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b769a2eb40a4655571072f0f9f478c59b47c08e417a96a1581949c73633c14ca
BLAKE2b-256 checksum
How to use checksums
2a399d8a5bd9721210390aed59212c4cca92701c066cd262b10168856b0d5fc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

Release files / import_git_files-0.1.0-py3-none-any.whl

Download URL import_git_files-0.1.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
100688c8feb1cd99889889192fd2134a7e9469132376ecbd609f1581dff2970a
BLAKE2b-256 checksum
How to use checksums
4d7f5ee7c8225c6fcc0ad9b8f480713d58e793ca74b8261ac67a2b33eebb582c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page