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

Method get_organization

codecarbon/core/api_client.py:137–147  ·  view source on GitHub ↗

Get an organization

(self, organization_id)

Source from the content-addressed store, hash-verified

135 return r.json()
136
137 def get_organization(self, organization_id):
138 """
139 Get an organization
140 """
141 headers = self._get_headers()
142 url = self.url + "/organizations/" + organization_id
143 r = requests.get(url=url, timeout=2, headers=headers)
144 if r.status_code != 200:
145 self._log_error(url, {}, r)
146 return None
147 return r.json()
148
149 def update_organization(self, organization: OrganizationCreate):
150 """

Callers 1

show_configFunction · 0.95

Calls 3

_get_headersMethod · 0.95
_log_errorMethod · 0.95
jsonMethod · 0.80

Tested by

no test coverage detected