MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / get_remaining

Method get_remaining

uncommon_route/spend_control.py:226–230  ·  view source on GitHub ↗
(self, window: Literal["hourly", "daily", "session"])

Source from the content-addressed store, hash-verified

224 return self._session_spent
225
226 def get_remaining(self, window: Literal["hourly", "daily", "session"]) -> float | None:
227 limit = getattr(self._limits, window, None)
228 if limit is None:
229 return None
230 return max(0.0, limit - self.get_spending(window))
231
232 def status(self) -> SpendingStatus:
233 now = self._now()

Calls 1

get_spendingMethod · 0.95