Giter Club home page Giter Club logo

mediumroast_py's Introduction

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.

mediumroast_py's People

Contributors

miha42-github avatar

Watchers

 avatar

mediumroast_py's Issues

Installation instructions for early adopters

The top page mentions the following. Yet I can't find the early installation for early adopters section
"you should pay attention to section entitled Installation for Early Adopters and Testers."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.