Skip to main content
Version: 2.x

bursar.UsageMetrics

class bursar.UsageMetrics(*, operation, measures=None, dimensions=None, metadata=None)

Bases: BaseModel

One billable operation.

operation selects the configured operation. measures are non-negative numeric quantities used by price formulas; dimensions select an ordered price rule. This keeps provider model names, images, audio seconds and future AI workload attributes out of Bursar’s schema.

  • Parameters:
    • operation (str)
    • measures (Mapping *[*str , Decimal | int | float | str ] | None)
    • dimensions (Mapping *[*str , str | Decimal | int | float | bool ] | None)
    • metadata (Mapping *[*str , Any ] | None)

model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].