@@ -11,13 +11,7 @@ ApiClient
1111---------
1212
1313``` python
14- ApiClient(
15- base_url: str ,
16- * ,
17- api_key: str | None = None ,
18- cookies: dict[str , str ] | None = None ,
19- debug: bool = False ,
20- )
14+ ApiClient(base_url: str , * , api_key: str | None = None , cookies: dict[str , str ] | None = None , debug: bool = False )
2115```
2216
2317Client for the Dreadnode API.
@@ -102,14 +96,7 @@ def __init__(
10296### export\_ metrics
10397
10498``` python
105- export_metrics(
106- project: str ,
107- * ,
108- filter : str | None = None ,
109- status: StatusFilter = " completed" ,
110- metrics: list[str ] | None = None ,
111- aggregations: list[MetricAggregationType] | None = None ,
112- ) -> pd.DataFrame
99+ export_metrics(project: str , * , filter : str | None = None , status: StatusFilter = ' completed' , metrics: list[str ] | None = None , aggregations: list[MetricAggregationType] | None = None ) -> pd.DataFrame
113100```
114101
115102Exports metric data for a specific project.
@@ -191,15 +178,7 @@ def export_metrics(
191178### export\_ parameters
192179
193180``` python
194- export_parameters(
195- project: str ,
196- * ,
197- filter : str | None = None ,
198- status: StatusFilter = " completed" ,
199- parameters: list[str ] | None = None ,
200- metrics: list[str ] | None = None ,
201- aggregations: list[MetricAggregationType] | None = None ,
202- ) -> pd.DataFrame
181+ export_parameters(project: str , * , filter : str | None = None , status: StatusFilter = ' completed' , parameters: list[str ] | None = None , metrics: list[str ] | None = None , aggregations: list[MetricAggregationType] | None = None ) -> pd.DataFrame
203182```
204183
205184Exports parameter data for a specific project.
@@ -286,15 +265,7 @@ def export_parameters(
286265### export\_ runs
287266
288267``` python
289- export_runs(
290- project: str ,
291- * ,
292- filter : str | None = None ,
293- status: StatusFilter = " completed" ,
294- aggregations: list[MetricAggregationType] | None = None ,
295- format : ExportFormat = " parquet" ,
296- base_dir: str | None = None ,
297- ) -> str
268+ export_runs(project: str , * , filter : str | None = None , status: StatusFilter = ' completed' , aggregations: list[MetricAggregationType] | None = None , format : ExportFormat = ' parquet' , base_dir: str | None = None ) -> str
298269```
299270
300271Export runs using pagination - always writes to disk .
@@ -405,15 +376,7 @@ def export_runs(
405376### export\_ timeseries
406377
407378``` python
408- export_timeseries(
409- project: str ,
410- * ,
411- filter : str | None = None ,
412- status: StatusFilter = " completed" ,
413- metrics: list[str ] | None = None ,
414- time_axis: TimeAxisType = " relative" ,
415- aggregations: list[TimeAggregationType] | None = None ,
416- ) -> pd.DataFrame
379+ export_timeseries(project: str , * , filter : str | None = None , status: StatusFilter = ' completed' , metrics: list[str ] | None = None , time_axis: TimeAxisType = ' relative' , aggregations: list[TimeAggregationType] | None = None ) -> pd.DataFrame
417380```
418381
419382Exports timeseries data for a specific project.
@@ -481,7 +444,6 @@ def export_timeseries(
481444 Returns:
482445 A DataFrame containing the exported timeseries data.
483446 """
484- import pandas as pd
485447
486448 response = self .request(
487449 " GET" ,
@@ -524,9 +486,7 @@ def get_device_codes(self) -> DeviceCodeResponse:
524486### get\_ github\_ access\_ token
525487
526488``` python
527- get_github_access_token(
528- repos: list[str ],
529- ) -> GithubTokenResponse
489+ get_github_access_token(repos: list[str ]) -> GithubTokenResponse
530490```
531491
532492Try to get a GitHub access token for the given repositories.
@@ -619,21 +579,15 @@ def get_run(self, run: str | ULID) -> Run:
619579### get\_ run\_ tasks
620580
621581``` python
622- get_run_tasks(
623- run: str | ULID , * , format : Literal[" tree" ]
624- ) -> list[TaskTree]
582+ get_run_tasks(run: str | ULID , * , format : Literal[' tree' ]) -> list[TaskTree]
625583```
626584
627585``` python
628- get_run_tasks(
629- run: str | ULID , * , format : Literal[" flat" ] = " flat"
630- ) -> list[Task]
586+ get_run_tasks(run: str | ULID , * , format : Literal[' flat' ] = ' flat' ) -> list[Task]
631587```
632588
633589``` python
634- get_run_tasks(
635- run: str | ULID , * , format : TraceFormat = " flat"
636- ) -> list[Task] | list[TaskTree]
590+ get_run_tasks(run: str | ULID , * , format : TraceFormat = ' flat' ) -> list[Task] | list[TaskTree]
637591```
638592
639593Gets all tasks for a specific run.
@@ -683,21 +637,15 @@ def get_run_tasks(
683637### get\_ run\_ trace
684638
685639``` python
686- get_run_trace(
687- run: str | ULID , * , format : Literal[" tree" ]
688- ) -> list[TraceTree]
640+ get_run_trace(run: str | ULID , * , format : Literal[' tree' ]) -> list[TraceTree]
689641```
690642
691643``` python
692- get_run_trace(
693- run: str | ULID , * , format : Literal[" flat" ] = " flat"
694- ) -> list[Task | TraceSpan]
644+ get_run_trace(run: str | ULID , * , format : Literal[' flat' ] = ' flat' ) -> list[Task | TraceSpan]
695645```
696646
697647``` python
698- get_run_trace(
699- run: str | ULID , * , format : TraceFormat = " flat"
700- ) -> list[Task | TraceSpan] | list[TraceTree]
648+ get_run_trace(run: str | ULID , * , format : TraceFormat = ' flat' ) -> list[Task | TraceSpan] | list[TraceTree]
701649```
702650
703651Retrieves the run trace (spans+tasks) of a specific run.
@@ -867,11 +815,7 @@ def list_runs(self, project: str) -> list[RunSummary]:
867815### poll\_ for\_ token
868816
869817``` python
870- poll_for_token(
871- device_code: str ,
872- interval: int = DEFAULT_POLL_INTERVAL ,
873- max_poll_time: int = DEFAULT_MAX_POLL_TIME ,
874- ) -> AccessRefreshTokenResponse
818+ poll_for_token(device_code: str , interval: int = DEFAULT_POLL_INTERVAL , max_poll_time: int = DEFAULT_MAX_POLL_TIME ) -> AccessRefreshTokenResponse
875819```
876820
877821Poll for the access token with the given device code.
@@ -908,12 +852,7 @@ def poll_for_token(
908852### request
909853
910854``` python
911- request(
912- method: str ,
913- path: str ,
914- params: dict[str , Any] | None = None ,
915- json_data: dict[str , Any] | None = None ,
916- ) -> httpx.Response
855+ request(method: str , path: str , params: dict[str , Any] | None = None , json_data: dict[str , Any] | None = None ) -> httpx.Response
917856```
918857
919858Makes an HTTP request to the API and raises exceptions for errors.
@@ -1016,18 +955,7 @@ MetricAggregationType
1016955---------------------
1017956
1018957``` python
1019- MetricAggregationType = Literal[
1020- " avg" ,
1021- " median" ,
1022- " min" ,
1023- " max" ,
1024- " sum" ,
1025- " first" ,
1026- " last" ,
1027- " count" ,
1028- " std" ,
1029- " var" ,
1030- ]
958+ MetricAggregationType = Literal[' avg' , ' median' , ' min' , ' max' , ' sum' , ' first' , ' last' , ' count' , ' std' , ' var' ]
1031959```
1032960
1033961How to aggregate metrics in traces and runs
0 commit comments