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]
Metadata
Release files for labhub 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| labhub-1.1.0.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| labhub-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.3 kB
Release files / labhub-1.1.0.tar.gz
| Download URL | labhub-1.1.0.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e12ab2ce27b300af5670eae6fe3c34f1d4cb12f8ad5e048b6ea3bbdc5d50a5d3
|
|
BLAKE2b-256 checksum How to use checksums |
b481707e9498648423cfccb264547a17b7df554e9065801c33d4ae429c380a23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.13.0
|
Release files / labhub-1.1.0-py3-none-any.whl
| Download URL | labhub-1.1.0-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7874e8e9b7d1f4333e2485fa516f0f87e7e155e714f3d2ab14d6e38199aabeb0
|
|
BLAKE2b-256 checksum How to use checksums |
876e0837a789788baf32b35abd48a0375687d32149e92b47e4a1fd9d509df078
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.13.0
|