How to use the jovian.utils.credentials.get_guest_key function in jovian

To help you get started, we’ve selected a few jovian examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JovianML / jovian-py / jovian / utils / clone.py View on Github external
def _h(fresh):
    """Create a header to provide library metadata"""
    api_key, _ = read_api_key_opt()

    headers = {"x-jovian-source": "library",
               "x-jovian-library-version": __version__,
               "x-jovian-command": "clone" if fresh else "pull",
               "x-jovian-guest": get_guest_key(),
               "x-jovian-org": read_org_id()}

    if api_key is not None:
        headers["Authorization"] = "Bearer " + api_key

    return headers
github JovianML / jovian-py / jovian / utils / api.py View on Github external
def _h():
    """Create authorization header with API key"""
    return {"Authorization": "Bearer " + get_api_key(),
            "x-jovian-source": "library",
            "x-jovian-library-version": __version__,
            "x-jovian-guest": get_guest_key(),
            "x-jovian-org": read_org_id()}
github JovianML / jovian-py / jovian / utils / slack.py View on Github external
def _h():
    """Create a header to provide library metadata"""
    return {"Authorization": "Bearer " + get_api_key(),
            "x-jovian-source": "library",
            "x-jovian-library-version": __version__,
            "x-jovian-command": "add-slack",
            "x-jovian-guest": get_guest_key(),
            "x-jovian-org": read_org_id()}
github JovianML / jovian-py / jovian / utils / configure.py View on Github external
confirm = click.confirm(msg)

        if confirm:
            log('Removing existing configuration..')
        else:
            log('Skipping..')
            return

    # Remove existing credentials
    purge_creds()

    # Capture and save organization ID
    ensure_org(check_pro=False)

    # Ask for API Key
    get_guest_key()
    get_api_key()

    log('Configuration complete!')