Skip to main content

This Python package provides a Software Development Kit (SDK) for interacting with Mediumroast for GitHub. It is used internally by Mediumroast, Inc. and meant for developers to make use of.

Project description

mediumroast_py

Introduction

This Python package provides a Software Development Kit (SDK) for interacting with Mediumroast for GitHub. It is used internally by Mediumroast, Inc. and meant for developers to make use of.

Notice

The SDK is in active development and is subject to change. The SDK is not yet stable and should not be used in production environments.

Installation

To install the package, you can use pip:

pip install mediumroast_py

Usage

To use the package, you will need to import the mediumroast_py modules and classes. The package provides three main classes for interacting with objects: Companies, Interactions, and Users.

Authentication

To use the package, you will need to authenticate with the Mediumroast API using the GitHubAuth class. Here is an example of how to authenticate with the Mediumroast API using a GitHub App installation and a private key file. You will need to set the MR_CLIENT_ID, MR_APP_ID, and YOUR_INSTALLATION_ID environment variables to the appropriate values for your GitHub App installation. You will also need to set the YOUR_PEM_FILE environment variable to the path of your private key file. Here is an example of how to authenticate with the Mediumroast API using a GitHub App installation and a private key file.

from mediumroast_py.api import Companies, Interactions, Users
from mediumroast_py.api.authorize import GitHubAuth

auth = GitHubAuth(env={'clientId': os.getenv('MR_CLIENT_ID')})
token = auth.get_access_token_pem(
      os.getenv('YOUR_PEM_FILE'), 
      os.getenv('MR_APP_ID'), 
      os.getenv('YOUR_INSTALLATION_ID')
)

Companies

The Companies class provides methods for interacting with companies in Mediumroast. You can use the get_all method to get information about all companies.

company_ctl = Companies(token_info['token'], os.getenv('YOUR_ORG') , process_name)
companies = company_ctl.get_all()

Interactions

The Interactions class provides methods for interacting with interactions in Mediumroast. You can use the get_all method to get information about all interactions.

interaction_ctl = Interactions(token_info['token'], os.getenv('YOUR_ORG') , process_name)
interactions = interaction_ctl.get_all()

Issues

If you encounter any issues with the SDK, please report them on the mediumroast_py issues page.

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

mediumroast_py-0.6.12.17.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

mediumroast_py-0.6.12.17-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file mediumroast_py-0.6.12.17.tar.gz.

File metadata

  • Download URL: mediumroast_py-0.6.12.17.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.7 Darwin/24.0.0

File hashes

Hashes for mediumroast_py-0.6.12.17.tar.gz
Algorithm Hash digest
SHA256 420d8fd88881bcb45ab5cf99237a222089b0ed657ca42c7927b1beb4ab5c5436
MD5 7920386f167d6c140bdcc340e91fd3d2
BLAKE2b-256 c054b8416016f85b83c1188e70d9913d48e52f3622afe3b359f6204cafda5278

See more details on using hashes here.

File details

Details for the file mediumroast_py-0.6.12.17-py3-none-any.whl.

File metadata

File hashes

Hashes for mediumroast_py-0.6.12.17-py3-none-any.whl
Algorithm Hash digest
SHA256 524f8d4a6e3d2fb46f63b88c0aa37cf37176f6ff3728d0e0b70e4512185d191d
MD5 b6a9e0419483d8678db004a82ed52546
BLAKE2b-256 03d165db35842043d7f54451e97e9d454fbc2f6386f1bd21802625dfe42fcaaa

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