Metadata-Version: 2.5
Name: precog-api
Version: 1.3.0
Summary: Precog REST API exposing TimesFM-3 forecasts.
Project-URL: Homepage, https://github.com/Albe83/precog
Project-URL: Repository, https://github.com/Albe83/precog
Project-URL: Issues, https://github.com/Albe83/precog/issues
Project-URL: Changelog, https://github.com/Albe83/precog/blob/main/CHANGELOG.md
License: MIT
Keywords: forecasting,time-series,timesfm,zero-shot
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.12
Requires-Dist: fastapi>=0.115
Requires-Dist: numpy>=1.26
Requires-Dist: precog-schemas<0.2.0,>=0.1.0
Requires-Dist: prometheus-client>=0.20
Requires-Dist: pydantic-settings>=2.4
Requires-Dist: pydantic>=2.7
Requires-Dist: uvicorn[standard]>=0.53.0
Provides-Extra: engine
Requires-Dist: timesfm[torch]>=3.0.2; extra == 'engine'
Provides-Extra: otel
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.27; extra == 'otel'
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.48b0; extra == 'otel'
Requires-Dist: opentelemetry-sdk>=1.27; extra == 'otel'
Description-Content-Type: text/markdown

# precog-api

Precog **REST Execution API**: Google
[TimesFM-3](https://research.google/blog/timesfm-3-a-zero-shot-foundation-model-for-multivariate-forecasting/)
zero-shot forecasting as a synchronous, typed HTTP service.

This is the Python distribution of the Precog API. Containers and Helm remain
the preferred production deployment path; install this package for development,
labs and Python-native environments. The distribution contains **no model
weights**.

## Install

```bash
pip install precog-api             # base install: fake engine only, no torch
pip install "precog-api[engine]"   # real TimesFM-3 engine (weights download at runtime)
```

The base install is lightweight and runs the deterministic fake engine, which is
enough to exercise the REST contract.

## Run

```bash
PRECOG_ENGINE=fake precog-api      # http://localhost:8000
precog-api                         # real engine (requires the [engine] extra)
```

Configuration uses the `PRECOG_` prefix (`PRECOG_ENGINE`, `PRECOG_DEVICE`,
`PRECOG_MAX_*`, `PRECOG_API_KEY`, ...). See the repository documentation.

## License

Application code is MIT. The TimesFM-3 model weights are distributed under the
TimesFM Non-Commercial License v1.0 and are **not** part of this distribution.
