Real-time SQL computation engine for streaming numerical data
Project description
RtBot SQL
Real-time SQL computation engine for streaming numerical data. Write SQL to define streaming pipelines — RtBot compiles them into high-performance C++ programs that process data incrementally, one message at a time.
Quick start
import math
from rtbot_sql import RtBotSql
sql = RtBotSql()
sql.configure_time_format(formatter=lambda ts: ts)
sql.execute("CREATE STREAM sensors (temperature DOUBLE)")
sql.execute("""
CREATE MATERIALIZED VIEW stats AS
SELECT temperature,
MOVING_AVERAGE(temperature, 50) AS avg_temp,
MOVING_STD(temperature, 50) AS std_temp
FROM sensors
""")
# Generate 200 readings: smooth sine wave with 3 injected spikes
readings = []
for i in range(200):
temp = 20.0 + 2.0 * math.sin(i * 2 * math.pi / 60) + 0.3 * math.sin(i * 7.1)
if i == 80:
temp = 35.0 # spike high
elif i == 130:
temp = 5.0 # spike low
elif i == 170:
temp = 38.0 # spike high
readings.append({"time": i, "temperature": temp})
sql.insert_dataframe("sensors", readings)
# Query only the anomalies
result = sql.execute("""
SELECT * FROM stats
WHERE ABS(temperature - avg_temp) > 2 * std_temp
""")
for col in result["columns"]:
print(f"{col:>15}", end="")
print()
for row in result["rows"]:
for val in row:
print(f"{val:>15.2f}", end="")
print()
Output:
temperature avg_temp std_temp
35.00 20.10 2.61
5.00 19.27 2.39
38.00 20.23 3.65
See the full documentation for more examples and the SQL reference.
With pandas
from rtbot_sql import RtBotSql
import pandas as pd
sql = RtBotSql()
sql.execute("CREATE STREAM sensors (temperature DOUBLE, pressure DOUBLE)")
sql.execute("""
CREATE MATERIALIZED VIEW alerts AS
SELECT temperature, pressure,
MOVING_AVERAGE(temperature, 50) AS avg_temp,
MOVING_STD(temperature, 50) AS std_temp
FROM sensors
WHERE ABS(temperature - MOVING_AVERAGE(temperature, 50)) > 2 * MOVING_STD(temperature, 50)
""")
df = pd.read_csv("sensor_history.csv")
sql.insert_dataframe("sensors", df)
results = sql.execute("SELECT * FROM alerts")
Features
- One language, all stages — the SQL you write in a notebook is the same SQL that runs in production
- Incremental execution — each new data point updates pipeline state in constant time
- Deterministic — same input always produces the same output, regardless of timing
- High performance — native C++ engine with Python bindings via pybind11
Documentation
License
Proprietary. See rtbot.dev for licensing options.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rtbot_sql-0.3.0-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: rtbot_sql-0.3.0-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 982.9 kB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15365ed948bffe0e201e29207716db38725d45c348bd9ea13b4b2a81f6d8e524
|
|
| MD5 |
5912264e2eb880509229b113530fb767
|
|
| BLAKE2b-256 |
116fd3428540b9fa0b5d4d4734612aa14516679666a5f703deb9836a0d69f19a
|
Provenance
The following attestation bundles were made for rtbot_sql-0.3.0-cp314-cp314-win_amd64.whl:
Publisher:
release.yaml on rtbot-dev/rtbot-sql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rtbot_sql-0.3.0-cp314-cp314-win_amd64.whl -
Subject digest:
15365ed948bffe0e201e29207716db38725d45c348bd9ea13b4b2a81f6d8e524 - Sigstore transparency entry: 1248724522
- Sigstore integration time:
-
Permalink:
rtbot-dev/rtbot-sql@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/rtbot-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rtbot_sql-0.3.0-cp314-cp314-manylinux2014_x86_64.whl.
File metadata
- Download URL: rtbot_sql-0.3.0-cp314-cp314-manylinux2014_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.14
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fa2f77b844ca08899eb07472115980f842f37c8bcaabadd68c408e5c51930cd
|
|
| MD5 |
90ac39a9bb4b28241778275fb5c6d9ee
|
|
| BLAKE2b-256 |
681e6ee07ce83e9b26b2007eb29f5d43ee83a390a354fbfa157e78ec6cf61ebb
|
Provenance
The following attestation bundles were made for rtbot_sql-0.3.0-cp314-cp314-manylinux2014_x86_64.whl:
Publisher:
release.yaml on rtbot-dev/rtbot-sql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rtbot_sql-0.3.0-cp314-cp314-manylinux2014_x86_64.whl -
Subject digest:
8fa2f77b844ca08899eb07472115980f842f37c8bcaabadd68c408e5c51930cd - Sigstore transparency entry: 1248724465
- Sigstore integration time:
-
Permalink:
rtbot-dev/rtbot-sql@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/rtbot-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rtbot_sql-0.3.0-cp314-cp314-manylinux2014_aarch64.whl.
File metadata
- Download URL: rtbot_sql-0.3.0-cp314-cp314-manylinux2014_aarch64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.14
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97ace819e48b10255a37ce3d283e47b16d061af9c46218e7179223cb5bc59402
|
|
| MD5 |
268603ce6eea9263865ce79afa63a891
|
|
| BLAKE2b-256 |
ef56030fe47120dfa349a6f7326187a855d079346049020003ad02da672a6501
|
Provenance
The following attestation bundles were made for rtbot_sql-0.3.0-cp314-cp314-manylinux2014_aarch64.whl:
Publisher:
release.yaml on rtbot-dev/rtbot-sql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rtbot_sql-0.3.0-cp314-cp314-manylinux2014_aarch64.whl -
Subject digest:
97ace819e48b10255a37ce3d283e47b16d061af9c46218e7179223cb5bc59402 - Sigstore transparency entry: 1248724540
- Sigstore integration time:
-
Permalink:
rtbot-dev/rtbot-sql@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/rtbot-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rtbot_sql-0.3.0-cp314-cp314-macosx_11_0_arm64.whl.
File metadata
- Download URL: rtbot_sql-0.3.0-cp314-cp314-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.14, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b4c1c4ac14fc3ba54dc355e87f89ab3fa179092857c80ae472c9c4084f755f2
|
|
| MD5 |
1d68b63b6fb2dfecbc065ff920117b3d
|
|
| BLAKE2b-256 |
f1060cdfefdc6314352732855efe504140c77c09e60848f25b369153ed638886
|
Provenance
The following attestation bundles were made for rtbot_sql-0.3.0-cp314-cp314-macosx_11_0_arm64.whl:
Publisher:
release.yaml on rtbot-dev/rtbot-sql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rtbot_sql-0.3.0-cp314-cp314-macosx_11_0_arm64.whl -
Subject digest:
6b4c1c4ac14fc3ba54dc355e87f89ab3fa179092857c80ae472c9c4084f755f2 - Sigstore transparency entry: 1248724580
- Sigstore integration time:
-
Permalink:
rtbot-dev/rtbot-sql@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/rtbot-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rtbot_sql-0.3.0-cp314-cp314-macosx_10_14_x86_64.whl.
File metadata
- Download URL: rtbot_sql-0.3.0-cp314-cp314-macosx_10_14_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.14, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cadcfd87b032350b3e719987870f36f79af675afd434a735db6b1698d18ab289
|
|
| MD5 |
55fa9839a018bf5793a70a8dfd34bc39
|
|
| BLAKE2b-256 |
94422ae77dcd3d0cbe7df865f5f92597a9b68de9b544f94208242036d259aaf3
|
Provenance
The following attestation bundles were made for rtbot_sql-0.3.0-cp314-cp314-macosx_10_14_x86_64.whl:
Publisher:
release.yaml on rtbot-dev/rtbot-sql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rtbot_sql-0.3.0-cp314-cp314-macosx_10_14_x86_64.whl -
Subject digest:
cadcfd87b032350b3e719987870f36f79af675afd434a735db6b1698d18ab289 - Sigstore transparency entry: 1248724485
- Sigstore integration time:
-
Permalink:
rtbot-dev/rtbot-sql@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/rtbot-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rtbot_sql-0.3.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: rtbot_sql-0.3.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 982.5 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9900fe7325078587ca95eaf02ee7094413d286260b991be8620450a7ba88bd8d
|
|
| MD5 |
839cf5237ef92a7c4129bf271d527bec
|
|
| BLAKE2b-256 |
5b25bc3ccf7963e2b074d4c96dc853591f6d275c745ec408348347f437f89ff6
|
Provenance
The following attestation bundles were made for rtbot_sql-0.3.0-cp313-cp313-win_amd64.whl:
Publisher:
release.yaml on rtbot-dev/rtbot-sql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rtbot_sql-0.3.0-cp313-cp313-win_amd64.whl -
Subject digest:
9900fe7325078587ca95eaf02ee7094413d286260b991be8620450a7ba88bd8d - Sigstore transparency entry: 1248724503
- Sigstore integration time:
-
Permalink:
rtbot-dev/rtbot-sql@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/rtbot-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rtbot_sql-0.3.0-cp313-cp313-manylinux2014_x86_64.whl.
File metadata
- Download URL: rtbot_sql-0.3.0-cp313-cp313-manylinux2014_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.13
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea887ae13f3bd6aab4fb9c9b1a44946e22fcb55a989e5985952bd4a5e5f38e46
|
|
| MD5 |
1af5894588777c81e7d36a79547e572a
|
|
| BLAKE2b-256 |
5fd06c9d6f66a93ee0b7a91c2c63604c91d9850abbd09f68e9ca1d6f884237fb
|
Provenance
The following attestation bundles were made for rtbot_sql-0.3.0-cp313-cp313-manylinux2014_x86_64.whl:
Publisher:
release.yaml on rtbot-dev/rtbot-sql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rtbot_sql-0.3.0-cp313-cp313-manylinux2014_x86_64.whl -
Subject digest:
ea887ae13f3bd6aab4fb9c9b1a44946e22fcb55a989e5985952bd4a5e5f38e46 - Sigstore transparency entry: 1248724564
- Sigstore integration time:
-
Permalink:
rtbot-dev/rtbot-sql@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/rtbot-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rtbot_sql-0.3.0-cp313-cp313-manylinux2014_aarch64.whl.
File metadata
- Download URL: rtbot_sql-0.3.0-cp313-cp313-manylinux2014_aarch64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.13
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cee4e9831694515695f8ff64ccf20347b0d325bd0011ec17f6d2690207d60093
|
|
| MD5 |
fc1a5cf3b522032252f8394b30950a0a
|
|
| BLAKE2b-256 |
8a33bef785a1e246d124a06ad2debee21a8a33f6b12a595f291411f73864b4e6
|
Provenance
The following attestation bundles were made for rtbot_sql-0.3.0-cp313-cp313-manylinux2014_aarch64.whl:
Publisher:
release.yaml on rtbot-dev/rtbot-sql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rtbot_sql-0.3.0-cp313-cp313-manylinux2014_aarch64.whl -
Subject digest:
cee4e9831694515695f8ff64ccf20347b0d325bd0011ec17f6d2690207d60093 - Sigstore transparency entry: 1248724439
- Sigstore integration time:
-
Permalink:
rtbot-dev/rtbot-sql@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/rtbot-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rtbot_sql-0.3.0-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: rtbot_sql-0.3.0-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00ef72787b6382254448a7fa6806829fff1f73846a226f91d4f2407589d1a30f
|
|
| MD5 |
ec5c6d81101a98877e1bad5e2a3cb003
|
|
| BLAKE2b-256 |
912dd75f04ee466e9f8dcc00c3c29628a9ec24f90e487c0e0575740d92147386
|
Provenance
The following attestation bundles were made for rtbot_sql-0.3.0-cp313-cp313-macosx_11_0_arm64.whl:
Publisher:
release.yaml on rtbot-dev/rtbot-sql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rtbot_sql-0.3.0-cp313-cp313-macosx_11_0_arm64.whl -
Subject digest:
00ef72787b6382254448a7fa6806829fff1f73846a226f91d4f2407589d1a30f - Sigstore transparency entry: 1248724403
- Sigstore integration time:
-
Permalink:
rtbot-dev/rtbot-sql@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/rtbot-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rtbot_sql-0.3.0-cp313-cp313-macosx_10_14_x86_64.whl.
File metadata
- Download URL: rtbot_sql-0.3.0-cp313-cp313-macosx_10_14_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.13, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
048dee0d1821f78f6036c1820a4994a0372aeb97b9fb9c7cb6cc7da670b75106
|
|
| MD5 |
5fadb8a8c92980a279454ea424d41a93
|
|
| BLAKE2b-256 |
f56b1d876fbd0751df5185f1ad0f99134f6a359d6e00650d89abad211f6c437c
|
Provenance
The following attestation bundles were made for rtbot_sql-0.3.0-cp313-cp313-macosx_10_14_x86_64.whl:
Publisher:
release.yaml on rtbot-dev/rtbot-sql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rtbot_sql-0.3.0-cp313-cp313-macosx_10_14_x86_64.whl -
Subject digest:
048dee0d1821f78f6036c1820a4994a0372aeb97b9fb9c7cb6cc7da670b75106 - Sigstore transparency entry: 1248724426
- Sigstore integration time:
-
Permalink:
rtbot-dev/rtbot-sql@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/rtbot-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@9572e1957bbd175ed21682f2ad789f64dbd4c306 -
Trigger Event:
push
-
Statement type: