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.1.0.tar.gz
(5.7 kB
view details)
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 labhub-1.1.0.tar.gz.
File metadata
- Download URL: labhub-1.1.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e12ab2ce27b300af5670eae6fe3c34f1d4cb12f8ad5e048b6ea3bbdc5d50a5d3
|
|
| MD5 |
7597ce4d9211cdcd837cd1c53ea51a5a
|
|
| BLAKE2b-256 |
b481707e9498648423cfccb264547a17b7df554e9065801c33d4ae429c380a23
|
File details
Details for the file labhub-1.1.0-py3-none-any.whl.
File metadata
- Download URL: labhub-1.1.0-py3-none-any.whl
- Upload date:
- Size: 5.6 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 |
7874e8e9b7d1f4333e2485fa516f0f87e7e155e714f3d2ab14d6e38199aabeb0
|
|
| MD5 |
e62ec1815ba9d934c2ed92575edda59d
|
|
| BLAKE2b-256 |
876e0837a789788baf32b35abd48a0375687d32149e92b47e4a1fd9d509df078
|