(metrics)
- revenue - Revenue metrics
- profit - Profit metrics
- burn_rate - Burn rate metrics
- runway - Runway metrics
- expenses - Expense metrics
- spending - Spending metrics
Revenue metrics for the authenticated team.
from midday import Midday
with Midday(
token="MIDDAY_API_KEY",
) as m_client:
res = m_client.metrics.revenue(from_="2023-01-01", to="2023-12-31", currency="USD")
# Handle response
print(res)| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
from_ |
str | ✔️ | N/A | 2023-01-01 |
to |
str | ✔️ | N/A | 2023-12-31 |
currency |
Optional[str] | ➖ | N/A | USD |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.GetRevenueResponseSchema
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Profit metrics for the authenticated team.
from midday import Midday
with Midday(
token="MIDDAY_API_KEY",
) as m_client:
res = m_client.metrics.profit(from_="2023-01-01", to="2023-12-31", currency="USD")
# Handle response
print(res)| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
from_ |
str | ✔️ | N/A | 2023-01-01 |
to |
str | ✔️ | N/A | 2023-12-31 |
currency |
Optional[str] | ➖ | N/A | USD |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.GetProfitResponseSchema
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Burn rate metrics for the authenticated team.
from midday import Midday
with Midday(
token="MIDDAY_API_KEY",
) as m_client:
res = m_client.metrics.burn_rate(from_="2023-01-01", to="2023-12-31", currency="USD")
# Handle response
print(res)| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
from_ |
str | ✔️ | N/A | 2023-01-01 |
to |
str | ✔️ | N/A | 2023-12-31 |
currency |
Optional[str] | ➖ | N/A | USD |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
List[models.GetBurnRateResponseSchema]
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Runway metrics for the authenticated team.
from midday import Midday
with Midday(
token="MIDDAY_API_KEY",
) as m_client:
res = m_client.metrics.runway(from_="2023-01-01", to="2023-12-31", currency="USD")
# Handle response
print(res)| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
from_ |
str | ✔️ | N/A | 2023-01-01 |
to |
str | ✔️ | N/A | 2023-12-31 |
currency |
Optional[str] | ➖ | N/A | USD |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Expense metrics for the authenticated team.
from midday import Midday
with Midday(
token="MIDDAY_API_KEY",
) as m_client:
res = m_client.metrics.expenses(from_="2023-01-01", to="2023-12-31", currency="USD")
# Handle response
print(res)| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
from_ |
str | ✔️ | N/A | 2023-01-01 |
to |
str | ✔️ | N/A | 2023-12-31 |
currency |
Optional[str] | ➖ | N/A | USD |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.GetExpensesResponseSchema
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Spending metrics for the authenticated team.
from midday import Midday
with Midday(
token="MIDDAY_API_KEY",
) as m_client:
res = m_client.metrics.spending(from_="2023-01-01", to="2023-12-31", currency="USD")
# Handle response
print(res)| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
from_ |
str | ✔️ | N/A | 2023-01-01 |
to |
str | ✔️ | N/A | 2023-12-31 |
currency |
Optional[str] | ➖ | N/A | USD |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
List[models.SpendingResultArray]
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |