def from_key(api_key, session=None, **kwargs):
    if not session:
        session = requests.session()
    # If I'm being passed an API key then I should use only this api key
    # if trust_env=True then Heroku will silently fallback to netrc authentication

    session.trust_env = False
    h = Heroku(session=session, **kwargs)

    # Login.
    h.authenticate(api_key)

    return h
Returns an authenticated Heroku instance, via API Key.
dataset/ETHPy150Open martyzz1/heroku3.py/heroku3/core.py/from_key