ccproxy.pricing.updater¶
ccproxy.pricing.updater
¶
Pricing updater for managing periodic refresh of pricing data.
PricingUpdater
¶
Manages periodic updates of pricing data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cache
|
PricingCache
|
Pricing cache instance |
required |
settings
|
PricingSettings
|
Pricing configuration settings |
required |
Source code in ccproxy/pricing/updater.py
get_current_pricing
async
¶
Get current pricing data with automatic updates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
force_refresh
|
bool
|
Force refresh even if cache is valid |
False
|
Returns:
Type | Description |
---|---|
PricingData | None
|
Current pricing data as PricingData model |
Source code in ccproxy/pricing/updater.py
force_refresh
async
¶
Force a refresh of pricing data.
Returns:
Type | Description |
---|---|
bool
|
True if refresh was successful |
Source code in ccproxy/pricing/updater.py
clear_cache
¶
Clear all cached pricing data.
Returns:
Type | Description |
---|---|
bool
|
True if cache was cleared successfully |
Source code in ccproxy/pricing/updater.py
get_pricing_info
async
¶
Get information about current pricing state.
Returns:
Type | Description |
---|---|
dict[str, Any]
|
Dictionary with pricing information |
Source code in ccproxy/pricing/updater.py
validate_external_source
async
¶
Validate that external pricing source is accessible.
Returns:
Type | Description |
---|---|
bool
|
True if external source is accessible and has valid data |