tlnw-get-file
tlnw-get-file is a small cross-platform Python CLI that retrieves a single file or folder from a Git repository by using sparse checkout and then moves it into a relative destination under the current working directory.
Installation
python -m pip install .
Usage
tlnw-get-file --git --repo https://github.com/owner/repo.git --source path/to/file.txt --dest output.txt
The CLI always supports these common options:
--help: show the current version, usage, and available options--debug: enable debug logging--version: print the current version
Version 0.1.0 requires --git mode.
Git mode
--repomust be an HTTPS repository URL.--sourcemust be a single relative file or folder path inside the repository.--destmust be a relative path from the current working directory and must not contain..path segments.
If TLNW_GIT_ACCESS_TOKEN is set, the command injects it into the HTTPS clone URL by using x-access-token authentication. If the variable is absent, the repository is cloned as a public repository.
Destination behavior
- If
--destpoints to an existing directory, the retrieved source is moved inside it. - If
--destends with/or\, that directory is created and the retrieved source is moved inside it. - Otherwise, a file source is written to the exact destination file path.
- Otherwise, a directory source is moved to the exact destination directory path, which allows renaming the retrieved folder.
Examples
Retrieve a file to a specific output filename:
tlnw-get-file --git --repo https://github.com/owner/repo.git --source docs/spec.md --dest specs/current.md
Retrieve a folder into a destination directory:
tlnw-get-file --git --repo https://github.com/owner/repo.git --source templates/api --dest vendor/
Enable debug logging:
tlnw-get-file --debug --git --repo https://github.com/owner/repo.git --source path/to/file.txt --dest output.txt
Development
python -m pip install -e .[dev]
python -m pytest
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 tlnw_get_file-0.1.0.tar.gz.
File metadata
- Download URL: tlnw_get_file-0.1.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82275984f2d0dc797b067671ce52bb99b45d307ab99d79da9d6af70dd867b907
|
|
| MD5 |
6648f764cfaebca41873026a09d4bca0
|
|
| BLAKE2b-256 |
be80ae77cc15c98adaabbdba14b16ac21131b25be849e9048b1d3d9371c89007
|
Provenance
The following attestation bundles were made for tlnw_get_file-0.1.0.tar.gz:
Publisher:
publish-to-pypi.yml on tellersnetwork/tlnw-get-file
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tlnw_get_file-0.1.0.tar.gz -
Subject digest:
82275984f2d0dc797b067671ce52bb99b45d307ab99d79da9d6af70dd867b907 - Sigstore transparency entry: 2205054684
- Sigstore integration time:
-
Permalink:
tellersnetwork/tlnw-get-file@84ea1756844f3b2861e314da1ba715476cdde330 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tellersnetwork
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@84ea1756844f3b2861e314da1ba715476cdde330 -
Trigger Event:
release
-
Statement type:
File details
Details for the file tlnw_get_file-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tlnw_get_file-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65a8ecf7e7ba1329d95506a0951b528dfe1aaec37a7c7fba60e32319ddba3805
|
|
| MD5 |
ac7616e36f3f834841912926da043479
|
|
| BLAKE2b-256 |
23ffc5272f9337cc5ed2f948dbc396b7b40dd2952f8bd4085d86bfcaa5120083
|
Provenance
The following attestation bundles were made for tlnw_get_file-0.1.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on tellersnetwork/tlnw-get-file
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tlnw_get_file-0.1.0-py3-none-any.whl -
Subject digest:
65a8ecf7e7ba1329d95506a0951b528dfe1aaec37a7c7fba60e32319ddba3805 - Sigstore transparency entry: 2205054698
- Sigstore integration time:
-
Permalink:
tellersnetwork/tlnw-get-file@84ea1756844f3b2861e314da1ba715476cdde330 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tellersnetwork
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@84ea1756844f3b2861e314da1ba715476cdde330 -
Trigger Event:
release
-
Statement type: