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

Function api_get

codecarbon/cli/main.py:113–121  ·  view source on GitHub ↗

ex: test-api

()

Source from the content-addressed store, hash-verified

111 "test-api", short_help="Make an authenticated GET request to an API endpoint"
112)
113def api_get():
114 """
115 ex: test-api
116 """
117 api_endpoint = get_api_endpoint()
118 api = ApiClient(endpoint_url=api_endpoint)
119 api.set_access_token(get_access_token())
120 organizations = api.get_list_organizations()
121 print(organizations)
122
123
124@codecarbon.command("login", short_help="Login to CodeCarbon")

Callers

nothing calls this directly

Calls 5

set_access_tokenMethod · 0.95
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…