Metadata-Version: 2.4
Name: sqlite-predict
Version: 0.0.1a6
Summary: Prediction as a SQL primitive for SQLite: forecast, detect_anomalies, and predict, in a zero-dependency loadable extension.
License: MIT OR Apache-2.0
Project-URL: Homepage, https://github.com/PureStorage-OpenConnect/sqlite-predict
Project-URL: Source, https://github.com/PureStorage-OpenConnect/sqlite-predict
Keywords: sqlite,forecasting,anomaly-detection,machine-learning,time-series
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: C
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Database
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# sqlite-predict

Prediction as a SQL primitive for SQLite: `forecast()`, `detect_anomalies()`,
`predict()`. The wheel bundles the zero-dependency loadable extension for your
platform.

```python
import sqlite3
import sqlite_predict

db = sqlite3.connect(":memory:")
sqlite_predict.load(db)

db.execute("CREATE TABLE readings(ts TEXT, value REAL)")
# ... insert rows ...

# forecast() is an aggregate: your query supplies the rows, and each
# group returns one JSON document
doc = db.execute("SELECT forecast(ts, value, 24) FROM readings").fetchone()[0]
print(doc)
```

See the [project README](https://github.com/PureStorage-OpenConnect/sqlite-predict)
for the full SQL surface, models, and benchmarks.
