Seamlessly work with with Github, Gitlab and self-hosted Gitlab repositories using one interface
Project description
labhub
Seamlessly work with with Github, Gitlab and self-hosted Gitlab repositories using one interface.
Currently supports read-only operations.
Install
pip install labhub
Useage
# import repos and types
from labhub import GitHubRepo, GitLabRepo, Directory, File
# Create repo objects
gh = GitHubRepo("hamolicious/test-repo", github_token, ref=ref)
gl = GitLabRepo(53, gitlab_token, host="https://gitlab.selfhosted.byme", ref=ref)
# list files in repo
files: list[Directory | File] = gh.ls(path)
# file operations
f_or_d = gh.ls()[0]
f_or_d.name # base name 'README.md'
f_or_d.path # file and path 'a/b/c'
f.get_data() # bytes
d.contents # list[File | Directory]
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
labhub-1.0.0.tar.gz
(5.5 kB
view details)
Built Distribution
File details
Details for the file labhub-1.0.0.tar.gz
.
File metadata
- Download URL: labhub-1.0.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cc59073776a255c922d1fb4db90ef1a847d21cf4c9ae719b2f1442b8e5054d1 |
|
MD5 | 1aa13e1893ddd62c3e2ecfb2ed4288eb |
|
BLAKE2b-256 | 368cadf45081e4bc5cf56ba07b940d456c142cb1dc003b2864d72bc3fa69d9aa |
File details
Details for the file labhub-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: labhub-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a131c51771a3587816be6c2d552170a55cb51ef4e54c854afa3677183964983 |
|
MD5 | 876b318a4ab7b59f36a1cecf18210b51 |
|
BLAKE2b-256 | 4a6b7f3922980ab7d9ee43cd1320cc81c1858f5ae355292bb89db2710a4b40e0 |