This package helps thoth app's interact with git forges like Github, Gitlab.
Project description
This library provides abstraction that allow’s thoth to interact with various source management systems. We use OGR underneath to interact with git forges.
Install
Use pipenv - This project is released on PyPI, so the latest release can be installed via pip or Pipenv as shown below:
pipenv install thoth-sourcemanagement
How to use -
from thoth.sourcemanagement.sourcemanagement import SourceManagement from thoth.sourcemanagement.enums import ServiceType # Service type you want to use service_type = ServiceType.GITHUB sm = SourceManagement(service_type, 'https://www.github.com', `private_token', 'username/repo_name')
Or if you want to use the application to interact as a Github Application -
# Service type you want to use service_type = ServiceType.GITHUB sm = SourceManagement(service_type=service_type, service_url='https://www.github.com', token=None, slug="username/repo_name", installation=True)
- The environment variables that need to be set are -
- GITHUB_PRIVATE_KEY_PATH - The path where the private key is located.
- GITHUB_APP_ID - The Application ID of the Github app.
You could then call all the functions offered by the Source Management class.
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.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size thoth_sourcemanagement-0.4.1-py3-none-any.whl (9.9 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size thoth-sourcemanagement-0.4.1.tar.gz (25.9 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for thoth_sourcemanagement-0.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7afdb123ac920f5eff9b6de3defc6b38b3cba3937d3c710a1460b64ec6fd8f5 |
|
MD5 | 2eddde3e2cd9a4a9c8317b8fcb555249 |
|
BLAKE2-256 | 589f2c6654d5428ca3ee597c9ed416a1a7fc540c89e8cad789c0fe6b1674022f |
Close
Hashes for thoth-sourcemanagement-0.4.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b4996d106c41cc1f85a841d99ab33f48881c5f98c83f368cd9123ba6a2df631 |
|
MD5 | 53a5376232f9ec8d6b731735f90e9337 |
|
BLAKE2-256 | aa697fe5f535491cfd1a60ea610dd40ebc3a498851440c41c84a93feade9636f |