MCPcopy Create free account
hub / github.com/mlco2/codecarbon / login

Function login

codecarbon/cli/main.py:125–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123
124@codecarbon.command("login", short_help="Login to CodeCarbon")
125def login():
126 authorize()
127 api_endpoint = get_api_endpoint()
128 api = ApiClient(endpoint_url=api_endpoint)
129 access_token = get_access_token()
130 api.set_access_token(access_token)
131 api.check_auth()
132
133
134def get_api_key(project_id: str):

Callers

nothing calls this directly

Calls 6

set_access_tokenMethod · 0.95
check_authMethod · 0.95
authorizeFunction · 0.90
get_api_endpointFunction · 0.90
ApiClientClass · 0.90
get_access_tokenFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…