Metadata-Version: 2.4
Name: valuator
Version: 0.2.1
Summary: A lightweight library to fetch and search AI model pricing data
Author: Vikas Konaparthi
Author-email: vikaskonaparthi@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: aiohttp>=3.8.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Valuator

A lightweight Python library to fetch AI model pricing data and perform searches to retrieve input and output costs per token for matching models.

## Installation

```bash
pip install valuator

import asyncio
from valuator import Valuator

async def main():
    valuator = Valuator()
    try:
        await valuator.initialize()
        print(valuator.get_model_costs("claude.*haiku"))
        print(valuator.get_model_costs("gpt-4"))
    finally:
        await valuator.close()

asyncio.run(main())
```

## Features

Fetches model pricing data from a specified URL or local cache.

Performs regex-based searches on model names for flexible matching.

Returns only input_cost_per_token and output_cost_per_token for matched models.

Optimized for low memory usage with efficient data structures (sets, cached regex).

Asynchronous HTTP requests for fast data retrieval.

## Requirements

Python 3.8+

aiohttp

License MIT License
