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

Function get_token

codecarbon/cli/main.py:151–156  ·  view source on GitHub ↗
(project_id: str)

Source from the content-addressed store, hash-verified

149
150@codecarbon.command("get-token", short_help="Get project token")
151def get_token(project_id: str):
152 # api = ApiClient(endpoint_url=API_URL) # TODO: get endpoint from config
153 # api.set_access_token(get_access_token())
154 token = get_api_key(project_id)
155 print("Your token: " + token)
156 print("Add it to the api_key field in your configuration file")
157
158
159@codecarbon.command("config", short_help="Generate or show config")

Callers

nothing calls this directly

Calls 1

get_api_keyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…