get_project_performance
imerit_ango.sdk.SDK.
get_project_performance(project_id, interval, batches)
Get all performance metrics of a project.
Parameters
project_id: string
The unique identifier for the project. You can find the project ID in the user interface or retrieve it using the
list_projects
function.
interval: list[datetime], default None
Format: [start_datetime, end_datetime]
Example:
[datetime.now() - timedelta(days=7), datetime.now()]
batches: list[str], default None
Filter performance metrics by batch (e.g., only get tasks belonging to the batch specified)
Example
['batch_1', 'batch_2']
Returns:
output: dict
A dictionary containing the result of the operation.
Example
Get all performance metrics:
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK
load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
project_id = os.getenv('PROJECT_ID')
ango_sdk = SDK(api_key)
sdk_response = ango_sdk.get_project_performance(project_id)
Filter metrics by time and batches:
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK
from datetime import datetime, timedelta
load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
project_id = os.getenv('PROJECT_ID')
ango_sdk = SDK(api_key)
sdk_response = ango_sdk.get_project_performance(project_id=project_id,
interval=[datetime.now() - timedelta(days=7), datetime.now()],
batches=["Batch-1", "Batch-2"])
Last updated