@finalclass LineItemOne phase’s one billing line: what was consumed, and what that costs.
quantity is a string for the same reason EstimatedUsd.amount is: division by 730
hours yields 28 significant digits and the exact figure is what lets a reader check
the arithmetic against the rate table, which is the only defence against a rate that
drifts without anyone noticing.
Constructor
Section titled “Constructor”LineItem declares no __new__ or __init__, so it is not constructed directly: an instance comes back from another call in this package.
Properties
Section titled “Properties”amount
Section titled “amount”amount: Amountdisplay_quantity
Section titled “display_quantity”display_quantity: strThe quantity at display precision, for a column a human scans.
duration
Section titled “duration”duration: Duration | Noneline: str | NoneThe AWS billing line, or None for a phase with no published rate to attribute
it to.
note: strphase: strThe lifecycle phase, as the Python StrEnum spells it.
quantity
Section titled “quantity”quantity: strThe consumed quantity, exact, as a string.
unit: strMethods
Section titled “Methods”to_dict
Section titled “to_dict”def to_dict() -> dictCore’s JSON shape for a line item, as a dict. An unpriced line has no usd key at
all.
Special methods
Section titled “Special methods”__repr__
Section titled “__repr__”def __repr__() -> str__str__
Section titled “__str__”def __str__() -> strProvenance
Section titled “Provenance”This page is generated from bindings/microvms-py/microvms.pyi by Griffe 2.3.0, run from site/scripts/gen-reference.mjs on every pnpm run sync, so an edit made here is overwritten by the next run.
To change the page, change the doc comment in the binding’s Rust source, then regenerate the declarations with mise run stubs. mise run stubs:check fails when the committed file no longer matches the source.