Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thoth-sourcemanagement-0.4.0.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

thoth_sourcemanagement-0.4.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file thoth-sourcemanagement-0.4.0.tar.gz.

File metadata

  • Download URL: thoth-sourcemanagement-0.4.0.tar.gz
  • Upload date:
  • Size: 25.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8

File hashes

Hashes for thoth-sourcemanagement-0.4.0.tar.gz
Algorithm Hash digest
SHA256 151f3048f7f4867e1de6e56272272de26914ff6e73badf5f600badf6d2ce4107
MD5 b26cb36c4a08d0c281c06516960d3779
BLAKE2b-256 322bcc86093b1245ac6083d1242b2494c098c0ead36294edf9446dcc6ce359d5

See more details on using hashes here.

File details

Details for the file thoth_sourcemanagement-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: thoth_sourcemanagement-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8

File hashes

Hashes for thoth_sourcemanagement-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eee2ca4a3729ddf07043804b27f7b76346a1d34829eabc6a85a76d3bd12c9050
MD5 0957f9eae3e5875993c7ff676df43e80
BLAKE2b-256 578bfa5e3a7698b6f6ce8d882e8fb199b683fbf19f4459dc4eb3b81663279d4e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page