sqlite-predict 0.0.1a4__py3-none-macosx_11_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,34 @@
1
+ """everpure.sqlite_predict: prediction as a SQL primitive.
2
+
3
+ import sqlite3
4
+ import sqlite_predict
5
+
6
+ db = sqlite3.connect(":memory:")
7
+ sqlite_predict.load(db)
8
+ db.execute("SELECT * FROM forecast('SELECT ts, value FROM readings', 24)")
9
+
10
+ The wheel bundles the zero-dependency loadable extension for your platform.
11
+ """
12
+ import os
13
+
14
+ __version__ = "0.0.1a1"
15
+
16
+
17
+ def loadable_path() -> str:
18
+ """Absolute path to the bundled loadable extension, without a file suffix
19
+ (the form SQLite's load_extension prefers: it appends the platform suffix
20
+ and derives the entry point)."""
21
+ here = os.path.dirname(os.path.abspath(__file__))
22
+ for ext in ("dylib", "so", "dll"):
23
+ if os.path.exists(os.path.join(here, "predict0." + ext)):
24
+ return os.path.join(here, "predict0")
25
+ raise FileNotFoundError(
26
+ "the sqlite-predict loadable was not bundled in this install")
27
+
28
+
29
+ def load(conn) -> None:
30
+ """Load sqlite-predict into a connection that exposes SQLite's
31
+ enable_load_extension / load_extension (e.g. a stdlib sqlite3.Connection)."""
32
+ conn.enable_load_extension(True)
33
+ conn.load_extension(loadable_path())
34
+ conn.enable_load_extension(False)
Binary file
@@ -0,0 +1,40 @@
1
+ Metadata-Version: 2.4
2
+ Name: sqlite-predict
3
+ Version: 0.0.1a4
4
+ Summary: Prediction as a SQL primitive for SQLite: forecast, detect_anomalies, predict, with replayable receipts.
5
+ License: MIT OR Apache-2.0
6
+ Project-URL: Homepage, https://github.com/PureStorage-OpenConnect/sqlite-predict
7
+ Project-URL: Source, https://github.com/PureStorage-OpenConnect/sqlite-predict
8
+ Keywords: sqlite,forecasting,anomaly-detection,machine-learning,time-series
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: C
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Topic :: Database
14
+ Classifier: Topic :: Scientific/Engineering
15
+ Requires-Python: >=3.8
16
+ Description-Content-Type: text/markdown
17
+
18
+ # everpure-sqlite-predict
19
+
20
+ Prediction as a SQL primitive for SQLite: `forecast()`, `detect_anomalies()`,
21
+ `predict()`, with replayable receipts. The wheel bundles the zero-dependency
22
+ loadable extension for your platform.
23
+
24
+ ```python
25
+ import sqlite3
26
+ from everpure import sqlite_predict
27
+
28
+ db = sqlite3.connect(":memory:")
29
+ sqlite_predict.load(db)
30
+
31
+ db.execute("CREATE TABLE readings(ts TEXT, value REAL)")
32
+ # ... insert rows ...
33
+ for row in db.execute(
34
+ "SELECT * FROM forecast('SELECT ts, value FROM readings', 24)"
35
+ ):
36
+ print(row)
37
+ ```
38
+
39
+ See the [project README](https://github.com/PureStorage-OpenConnect/sqlite-predict)
40
+ for the full SQL surface, models, and benchmarks.
@@ -0,0 +1,6 @@
1
+ sqlite_predict/__init__.py,sha256=w3TXZlylabthLsYqY5Kh6yuZtqklpCsaTEyF1BKR3gM,1189
2
+ sqlite_predict/predict0.dylib,sha256=Eq1MgSAvMunWnZVkQIScaecCtJSg6rB7_sC2JOGq1BU,239648
3
+ sqlite_predict-0.0.1a4.dist-info/RECORD,,
4
+ sqlite_predict-0.0.1a4.dist-info/WHEEL,sha256=ZXH3vDMl8AFCSH5yRAEZvhxcAfU_WRPmBH7oy36RDKI,106
5
+ sqlite_predict-0.0.1a4.dist-info/top_level.txt,sha256=doGfpqCLGkN0Zzitf9d_Py0ZMs8YK127PH9toWVPINM,15
6
+ sqlite_predict-0.0.1a4.dist-info/METADATA,sha256=3MHON2U6PpZYlgt2s4D2252Do1JwkhcJgWCsQOIgtWQ,1423
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (83.0.0)
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-macosx_11_0_arm64
5
+
@@ -0,0 +1 @@
1
+ sqlite_predict