Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Commit 9cd5b26

Browse files
feat: add get_cycles function to fetch cycles from the api
1 parent 5d1a385 commit 9cd5b26

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

runregistry/runregistry.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,14 @@ def get_datasets(limit=40000, compress_attributes=True, **kwargs) -> list:
251251
return datasets
252252

253253

254+
def get_cycles():
255+
url = "{}/cycles/global".format(api_url)
256+
headers = _get_headers(token=_get_token())
257+
if os.getenv("ENVIRONMENT") == "development":
258+
print(url)
259+
return requests.get(url, headers=headers).json()
260+
261+
254262
def _get_lumisection_helper(url, run_number, dataset_name="online", **kwargs):
255263
"""
256264
Puts the headers for all other lumisection methods

0 commit comments

Comments
 (0)