Skip to main content

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.

Metadata

Release files for mediumroast_py_api 0.6.12.20

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mediumroast_py_api 0.6.12.20
File Size Uploaded
mediumroast_py_api-0.6.12.20.tar.gz 24.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mediumroast_py_api 0.6.12.20
File Interpreter ABI Platform
mediumroast_py_api-0.6.12.20-py3-none-any.whl Python 3 none any Details

Total release size: 50.4 kB

Release files / mediumroast_py_api-0.6.12.20.tar.gz

Download URL mediumroast_py_api-0.6.12.20.tar.gz
Size 24.0 kB
Tags Source
SHA-256 checksum
How to use checksums
50311f91fefdf4b86ea52ab6540571646b5bd487f65b8d51b49bfc40cbf5c229
BLAKE2b-256 checksum
How to use checksums
7c77b196e39095180bcc2cde40debbcf5a8c3669a0b7c2099045784dcfca5a7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.11.0 Linux/6.8.0-55-generic

Release files / mediumroast_py_api-0.6.12.20-py3-none-any.whl

Download URL mediumroast_py_api-0.6.12.20-py3-none-any.whl
Size 26.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06e421f7c3467fa9437cb3a5b6e700b4c772cf30dd1b0183edcc6e97487d93df
BLAKE2b-256 checksum
How to use checksums
91f986eb7bd3f731b3545667928a8cd87ee59b6b66860016a96d5952dc7ec0de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.11.0 Linux/6.8.0-55-generic

Release history Release notifications | RSS feed

This release

0.6.12.20 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page