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.1.tar.gz
(5.6 kB
view details)
Built Distribution
File details
Details for the file labhub-1.0.1.tar.gz
.
File metadata
- Download URL: labhub-1.0.1.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4d05aa8b6cc6b56edd8f5ca086b853e1798addd14256c23eab187cb2861e428 |
|
MD5 | 77c6d1c9a255ff96bfb2742379c58e15 |
|
BLAKE2b-256 | 4000e4db42d0c632cc73a3f80b5444afba42f8452379f0d031cf6ccab99603c9 |
File details
Details for the file labhub-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: labhub-1.0.1-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 | 3f56521a78047532115c98945df8fff156e4df5e0584fad65e71ea88c56c8d3b |
|
MD5 | f208be4c8e9b08766b47ec0e7bf41c90 |
|
BLAKE2b-256 | 73b956b5f7c2bccd430d9c238390b7d854f48568e204c479778bd1189675a6e3 |