streaming-sql-engine 0.1.0__tar.gz → 0.1.1__tar.gz

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.
Files changed (36) hide show
  1. {streaming_sql_engine-0.1.0/streaming_sql_engine.egg-info → streaming_sql_engine-0.1.1}/PKG-INFO +69 -11
  2. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/README.md +68 -10
  3. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/pyproject.toml +1 -1
  4. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/setup.py +1 -1
  5. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/streaming_sql_engine/__init__.py +2 -2
  6. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1/streaming_sql_engine.egg-info}/PKG-INFO +69 -11
  7. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/LICENSE +0 -0
  8. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/MANIFEST.in +0 -0
  9. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/documentation/APACHE_DRILL_COMPARISON.md +0 -0
  10. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/documentation/API_JOIN_OPERATIONS.md +0 -0
  11. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/documentation/BEST_USE_CASES.md +0 -0
  12. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/documentation/COMPREHENSIVE_DOCUMENTATION.md +0 -0
  13. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/documentation/DEVELOPER_GUIDE.md +0 -0
  14. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/documentation/DUCKDB_COMPARISON.md +0 -0
  15. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/documentation/HOW_TO_ADD_TO_PROJECT.md +0 -0
  16. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/documentation/INSTALLATION.md +0 -0
  17. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/documentation/MULTI_SOURCE_EXAMPLE_README.md +0 -0
  18. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/documentation/MYSQL_USAGE.md +0 -0
  19. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/documentation/PERFORMANCE.md +0 -0
  20. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/documentation/QUICK_START.md +0 -0
  21. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/documentation/TECHNICAL_DOCUMENTATION.md +0 -0
  22. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/documentation/USER_GUIDE.md +0 -0
  23. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/requirements.txt +0 -0
  24. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/setup.cfg +0 -0
  25. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/streaming_sql_engine/db_connector.py +0 -0
  26. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/streaming_sql_engine/engine.py +0 -0
  27. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/streaming_sql_engine/evaluator.py +0 -0
  28. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/streaming_sql_engine/executor.py +0 -0
  29. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/streaming_sql_engine/jsonl_executor.py +0 -0
  30. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/streaming_sql_engine/operators.py +0 -0
  31. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/streaming_sql_engine/parser.py +0 -0
  32. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/streaming_sql_engine/planner.py +0 -0
  33. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/streaming_sql_engine.egg-info/SOURCES.txt +0 -0
  34. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/streaming_sql_engine.egg-info/dependency_links.txt +0 -0
  35. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/streaming_sql_engine.egg-info/requires.txt +0 -0
  36. {streaming_sql_engine-0.1.0 → streaming_sql_engine-0.1.1}/streaming_sql_engine.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streaming-sql-engine
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: A lightweight SQL execution engine for streaming row-by-row queries with joins
5
5
  Home-page: https://github.com/Ierofantis/streaming-sql-engine
6
6
  Author: Ierofantis
@@ -185,6 +185,73 @@ for row in engine.query(query):
185
185
  # {'name': 'Charlie', 'dept_name': 'Engineering'}
186
186
  ```
187
187
 
188
+ ## Real-World Example: Joining Multiple APIs
189
+
190
+ Join data from multiple free public APIs using SQL:
191
+
192
+ ```python
193
+ # Install: pip install streaming-sql-engine
194
+ import requests
195
+ from streaming_sql_engine import Engine
196
+
197
+ # Define API sources
198
+ def jsonplaceholder_users_api():
199
+ """Fetch users from JSONPlaceholder API."""
200
+ response = requests.get("https://jsonplaceholder.typicode.com/users")
201
+ for user in response.json():
202
+ yield {
203
+ "user_id": user["id"],
204
+ "user_name": user["name"],
205
+ "user_email": user["email"],
206
+ "user_city": user["address"]["city"],
207
+ }
208
+
209
+ def jsonplaceholder_posts_api():
210
+ """Fetch posts from JSONPlaceholder API."""
211
+ response = requests.get("https://jsonplaceholder.typicode.com/posts")
212
+ for post in response.json():
213
+ yield {
214
+ "post_id": post["id"],
215
+ "user_id": post["userId"],
216
+ "post_title": post["title"],
217
+ "post_body": post["body"][:100],
218
+ }
219
+
220
+ def rest_countries_api():
221
+ """Fetch countries from REST Countries API."""
222
+ response = requests.get("https://restcountries.com/v3.1/all")
223
+ for country in response.json():
224
+ yield {
225
+ "country_code": country.get("cca2", ""),
226
+ "country_name": country["name"].get("common", ""),
227
+ "capital": country.get("capital", ["N/A"])[0] if country.get("capital") else "N/A",
228
+ "population": country.get("population", 0),
229
+ }
230
+
231
+ # Create engine and register sources
232
+ engine = Engine()
233
+ engine.register("users", jsonplaceholder_users_api)
234
+ engine.register("posts", jsonplaceholder_posts_api)
235
+ engine.register("countries", rest_countries_api)
236
+
237
+ # Join Users + Posts from different APIs
238
+ query = """
239
+ SELECT
240
+ users.user_name,
241
+ users.user_email,
242
+ posts.post_title,
243
+ posts.post_body
244
+ FROM users
245
+ JOIN posts ON users.user_id = posts.user_id
246
+ WHERE users.user_id <= 3
247
+ """
248
+
249
+ for row in engine.query(query):
250
+ print(f"{row['user_name']} ({row['user_email']}): {row['post_title']}")
251
+ ```
252
+
253
+ This example demonstrates joining data from multiple REST APIs using standard SQL syntax - no ETL, no data copying, just pure SQL joins across different data sources!
254
+
188
255
  ## Supported SQL Features
189
256
 
190
257
  ### SELECT
@@ -267,15 +334,6 @@ The engine raises clear exceptions for:
267
334
  - **Streaming**: Results are yielded as soon as they're produced
268
335
  - **No buffering**: Intermediate results are not fully materialized
269
336
 
270
- ## Documentation
271
-
272
- - **[TECHNICAL_DOCUMENTATION.md](TECHNICAL_DOCUMENTATION.md)**: Complete technical documentation explaining architecture, algorithms, and design decisions
273
- - **[DEVELOPER_GUIDE.md](DEVELOPER_GUIDE.md)**: Guide for developers who want to understand, modify, or extend the codebase
274
- - **[PERFORMANCE.md](PERFORMANCE.md)**: Performance comparison with database joins and optimization tips
275
- - **[MYSQL_USAGE.md](MYSQL_USAGE.md)**: MySQL-specific usage guide
276
- - **[QUICK_START.md](QUICK_START.md)**: Quick start guide for new users
277
- - **[INSTALLATION.md](INSTALLATION.md)**: Detailed installation instructions
278
-
279
337
  ## Installation from PyPI
280
338
 
281
339
  Once published, you can install the package directly from PyPI:
@@ -286,4 +344,4 @@ pip install streaming-sql-engine
286
344
 
287
345
  ## License
288
346
 
289
- MIT License - see [LICENSE](LICENSE) file for details.
347
+ MIT License
@@ -145,6 +145,73 @@ for row in engine.query(query):
145
145
  # {'name': 'Charlie', 'dept_name': 'Engineering'}
146
146
  ```
147
147
 
148
+ ## Real-World Example: Joining Multiple APIs
149
+
150
+ Join data from multiple free public APIs using SQL:
151
+
152
+ ```python
153
+ # Install: pip install streaming-sql-engine
154
+ import requests
155
+ from streaming_sql_engine import Engine
156
+
157
+ # Define API sources
158
+ def jsonplaceholder_users_api():
159
+ """Fetch users from JSONPlaceholder API."""
160
+ response = requests.get("https://jsonplaceholder.typicode.com/users")
161
+ for user in response.json():
162
+ yield {
163
+ "user_id": user["id"],
164
+ "user_name": user["name"],
165
+ "user_email": user["email"],
166
+ "user_city": user["address"]["city"],
167
+ }
168
+
169
+ def jsonplaceholder_posts_api():
170
+ """Fetch posts from JSONPlaceholder API."""
171
+ response = requests.get("https://jsonplaceholder.typicode.com/posts")
172
+ for post in response.json():
173
+ yield {
174
+ "post_id": post["id"],
175
+ "user_id": post["userId"],
176
+ "post_title": post["title"],
177
+ "post_body": post["body"][:100],
178
+ }
179
+
180
+ def rest_countries_api():
181
+ """Fetch countries from REST Countries API."""
182
+ response = requests.get("https://restcountries.com/v3.1/all")
183
+ for country in response.json():
184
+ yield {
185
+ "country_code": country.get("cca2", ""),
186
+ "country_name": country["name"].get("common", ""),
187
+ "capital": country.get("capital", ["N/A"])[0] if country.get("capital") else "N/A",
188
+ "population": country.get("population", 0),
189
+ }
190
+
191
+ # Create engine and register sources
192
+ engine = Engine()
193
+ engine.register("users", jsonplaceholder_users_api)
194
+ engine.register("posts", jsonplaceholder_posts_api)
195
+ engine.register("countries", rest_countries_api)
196
+
197
+ # Join Users + Posts from different APIs
198
+ query = """
199
+ SELECT
200
+ users.user_name,
201
+ users.user_email,
202
+ posts.post_title,
203
+ posts.post_body
204
+ FROM users
205
+ JOIN posts ON users.user_id = posts.user_id
206
+ WHERE users.user_id <= 3
207
+ """
208
+
209
+ for row in engine.query(query):
210
+ print(f"{row['user_name']} ({row['user_email']}): {row['post_title']}")
211
+ ```
212
+
213
+ This example demonstrates joining data from multiple REST APIs using standard SQL syntax - no ETL, no data copying, just pure SQL joins across different data sources!
214
+
148
215
  ## Supported SQL Features
149
216
 
150
217
  ### SELECT
@@ -227,15 +294,6 @@ The engine raises clear exceptions for:
227
294
  - **Streaming**: Results are yielded as soon as they're produced
228
295
  - **No buffering**: Intermediate results are not fully materialized
229
296
 
230
- ## Documentation
231
-
232
- - **[TECHNICAL_DOCUMENTATION.md](TECHNICAL_DOCUMENTATION.md)**: Complete technical documentation explaining architecture, algorithms, and design decisions
233
- - **[DEVELOPER_GUIDE.md](DEVELOPER_GUIDE.md)**: Guide for developers who want to understand, modify, or extend the codebase
234
- - **[PERFORMANCE.md](PERFORMANCE.md)**: Performance comparison with database joins and optimization tips
235
- - **[MYSQL_USAGE.md](MYSQL_USAGE.md)**: MySQL-specific usage guide
236
- - **[QUICK_START.md](QUICK_START.md)**: Quick start guide for new users
237
- - **[INSTALLATION.md](INSTALLATION.md)**: Detailed installation instructions
238
-
239
297
  ## Installation from PyPI
240
298
 
241
299
  Once published, you can install the package directly from PyPI:
@@ -246,4 +304,4 @@ pip install streaming-sql-engine
246
304
 
247
305
  ## License
248
306
 
249
- MIT License - see [LICENSE](LICENSE) file for details.
307
+ MIT License
@@ -9,7 +9,7 @@ license-files = []
9
9
 
10
10
  [project]
11
11
  name = "streaming-sql-engine"
12
- version = "0.1.0"
12
+ version = "0.1.1"
13
13
  description = "A lightweight SQL execution engine for streaming row-by-row queries with joins"
14
14
  readme = "README.md"
15
15
  requires-python = ">=3.8"
@@ -12,7 +12,7 @@ with open("requirements.txt", "r", encoding="utf-8") as fh:
12
12
 
13
13
  setup(
14
14
  name="streaming-sql-engine",
15
- version="0.1.0",
15
+ version="0.1.1",
16
16
  author="Ierofantis",
17
17
  author_email="teopanta1986@gmail.com",
18
18
  description="A lightweight SQL execution engine for streaming row-by-row queries with joins",
@@ -1,5 +1,5 @@
1
1
  """
2
- Rivulet - Streaming SQL Join Engine
2
+ Streaming SQL Join Engine
3
3
 
4
4
  A lightweight SQL execution engine that processes queries row-by-row
5
5
  without loading full tables into memory.
@@ -16,7 +16,7 @@ from .db_connector import (
16
16
  create_table_source
17
17
  )
18
18
 
19
- __version__ = "0.1.0"
19
+ __version__ = "0.1.1"
20
20
  __all__ = [
21
21
  "Engine",
22
22
  "PostgreSQLPool",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streaming-sql-engine
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: A lightweight SQL execution engine for streaming row-by-row queries with joins
5
5
  Home-page: https://github.com/Ierofantis/streaming-sql-engine
6
6
  Author: Ierofantis
@@ -185,6 +185,73 @@ for row in engine.query(query):
185
185
  # {'name': 'Charlie', 'dept_name': 'Engineering'}
186
186
  ```
187
187
 
188
+ ## Real-World Example: Joining Multiple APIs
189
+
190
+ Join data from multiple free public APIs using SQL:
191
+
192
+ ```python
193
+ # Install: pip install streaming-sql-engine
194
+ import requests
195
+ from streaming_sql_engine import Engine
196
+
197
+ # Define API sources
198
+ def jsonplaceholder_users_api():
199
+ """Fetch users from JSONPlaceholder API."""
200
+ response = requests.get("https://jsonplaceholder.typicode.com/users")
201
+ for user in response.json():
202
+ yield {
203
+ "user_id": user["id"],
204
+ "user_name": user["name"],
205
+ "user_email": user["email"],
206
+ "user_city": user["address"]["city"],
207
+ }
208
+
209
+ def jsonplaceholder_posts_api():
210
+ """Fetch posts from JSONPlaceholder API."""
211
+ response = requests.get("https://jsonplaceholder.typicode.com/posts")
212
+ for post in response.json():
213
+ yield {
214
+ "post_id": post["id"],
215
+ "user_id": post["userId"],
216
+ "post_title": post["title"],
217
+ "post_body": post["body"][:100],
218
+ }
219
+
220
+ def rest_countries_api():
221
+ """Fetch countries from REST Countries API."""
222
+ response = requests.get("https://restcountries.com/v3.1/all")
223
+ for country in response.json():
224
+ yield {
225
+ "country_code": country.get("cca2", ""),
226
+ "country_name": country["name"].get("common", ""),
227
+ "capital": country.get("capital", ["N/A"])[0] if country.get("capital") else "N/A",
228
+ "population": country.get("population", 0),
229
+ }
230
+
231
+ # Create engine and register sources
232
+ engine = Engine()
233
+ engine.register("users", jsonplaceholder_users_api)
234
+ engine.register("posts", jsonplaceholder_posts_api)
235
+ engine.register("countries", rest_countries_api)
236
+
237
+ # Join Users + Posts from different APIs
238
+ query = """
239
+ SELECT
240
+ users.user_name,
241
+ users.user_email,
242
+ posts.post_title,
243
+ posts.post_body
244
+ FROM users
245
+ JOIN posts ON users.user_id = posts.user_id
246
+ WHERE users.user_id <= 3
247
+ """
248
+
249
+ for row in engine.query(query):
250
+ print(f"{row['user_name']} ({row['user_email']}): {row['post_title']}")
251
+ ```
252
+
253
+ This example demonstrates joining data from multiple REST APIs using standard SQL syntax - no ETL, no data copying, just pure SQL joins across different data sources!
254
+
188
255
  ## Supported SQL Features
189
256
 
190
257
  ### SELECT
@@ -267,15 +334,6 @@ The engine raises clear exceptions for:
267
334
  - **Streaming**: Results are yielded as soon as they're produced
268
335
  - **No buffering**: Intermediate results are not fully materialized
269
336
 
270
- ## Documentation
271
-
272
- - **[TECHNICAL_DOCUMENTATION.md](TECHNICAL_DOCUMENTATION.md)**: Complete technical documentation explaining architecture, algorithms, and design decisions
273
- - **[DEVELOPER_GUIDE.md](DEVELOPER_GUIDE.md)**: Guide for developers who want to understand, modify, or extend the codebase
274
- - **[PERFORMANCE.md](PERFORMANCE.md)**: Performance comparison with database joins and optimization tips
275
- - **[MYSQL_USAGE.md](MYSQL_USAGE.md)**: MySQL-specific usage guide
276
- - **[QUICK_START.md](QUICK_START.md)**: Quick start guide for new users
277
- - **[INSTALLATION.md](INSTALLATION.md)**: Detailed installation instructions
278
-
279
337
  ## Installation from PyPI
280
338
 
281
339
  Once published, you can install the package directly from PyPI:
@@ -286,4 +344,4 @@ pip install streaming-sql-engine
286
344
 
287
345
  ## License
288
346
 
289
- MIT License - see [LICENSE](LICENSE) file for details.
347
+ MIT License