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.0.15.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mediumroast_py-0.6.0.15-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mediumroast_py-0.6.0.15.tar.gz
Algorithm Hash digest
SHA256 9ad2a72473aa3bee0236940130f628e721bcc5453a75c57af50749391be0eb13
MD5 61858a7039cfac0b6ee5019e29b5dac1
BLAKE2b-256 5c0b45bd79fc3dca23b8a8561aed8b5947809c15d03fc6585cf47cfc001f5115

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mediumroast_py-0.6.0.15-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.7 Darwin/23.6.0

File hashes

Hashes for mediumroast_py-0.6.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 a52c6633d9a10ba48d5a4090762d200ad936499efc3bf982484cfa34f3be9fb6
MD5 38d35789879cf45ef366374cdee75ea4
BLAKE2b-256 c5ef3944c53ba45e1254e7e8b908212770851434ac3f9ddfb9f0d9acfeb47011

See more details on using hashes here.

Supported by

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