ultsql 1.0.15__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.
- ultsql-1.0.15/LICENSE +29 -0
- ultsql-1.0.15/PKG-INFO +82 -0
- ultsql-1.0.15/README.md +48 -0
- ultsql-1.0.15/pyproject.toml +39 -0
- ultsql-1.0.15/setup.cfg +4 -0
- ultsql-1.0.15/setup.py +18 -0
- ultsql-1.0.15/src/ultsql/__init__.py +7 -0
- ultsql-1.0.15/src/ultsql/client.py +43 -0
- ultsql-1.0.15/src/ultsql/py.typed +1 -0
- ultsql-1.0.15/src/ultsql.egg-info/PKG-INFO +82 -0
- ultsql-1.0.15/src/ultsql.egg-info/SOURCES.txt +11 -0
- ultsql-1.0.15/src/ultsql.egg-info/dependency_links.txt +1 -0
- ultsql-1.0.15/src/ultsql.egg-info/top_level.txt +1 -0
ultsql-1.0.15/LICENSE
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, Om Patel & UltSQL Engine Authors.
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
ultsql-1.0.15/PKG-INFO
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ultsql
|
|
3
|
+
Version: 1.0.15
|
|
4
|
+
Summary: Universal Python client for the UltSQL 100% Pure-Dart multimodal database engine.
|
|
5
|
+
Home-page: https://github.com/ompatel3158/ULTSQL
|
|
6
|
+
Author: Om Patel
|
|
7
|
+
Author-email: Om Patel <ompatel3158@gmail.com>
|
|
8
|
+
License-Expression: BSD-3-Clause
|
|
9
|
+
Project-URL: Homepage, https://github.com/ompatel3158/ULTSQL
|
|
10
|
+
Project-URL: Documentation, https://pub.dev/packages/ultsql
|
|
11
|
+
Project-URL: Repository, https://github.com/ompatel3158/ULTSQL
|
|
12
|
+
Project-URL: Issues, https://github.com/ompatel3158/ULTSQL/issues
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
+
Classifier: Operating System :: OS Independent
|
|
25
|
+
Classifier: Topic :: Database
|
|
26
|
+
Classifier: Topic :: Database :: Database Engines/Servers
|
|
27
|
+
Requires-Python: >=3.7
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Dynamic: author
|
|
31
|
+
Dynamic: home-page
|
|
32
|
+
Dynamic: license-file
|
|
33
|
+
Dynamic: requires-python
|
|
34
|
+
|
|
35
|
+
# 🐍 UltSQL Python Package (`ultsql`)
|
|
36
|
+
|
|
37
|
+
The official Python client for **UltSQL** — the converged multimodal database engine combining Relational SQL, NoSQL JSON, HNSW Vector RAG, and PL/SQL.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## ⚡ Installation
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install ultsql
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 🚀 Quickstart Usage
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
from ultsql import UltSQLClient
|
|
53
|
+
|
|
54
|
+
# Connect to running UltSQL instance (via REST or PgWire)
|
|
55
|
+
db = UltSQLClient("http://localhost:8080")
|
|
56
|
+
|
|
57
|
+
# 1. Query records
|
|
58
|
+
result = db.query("users")
|
|
59
|
+
print("Users:", result["rows"])
|
|
60
|
+
|
|
61
|
+
# 2. Insert record
|
|
62
|
+
db.insert("users", {"id": 1, "name": "Alice", "score": 95.5})
|
|
63
|
+
|
|
64
|
+
# 3. Get OpenAPI 3.0 Documentation Schema
|
|
65
|
+
spec = db.openapi_spec()
|
|
66
|
+
print("OpenAPI Version:", spec["openapi"])
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 🔌 PostgreSQL Wire Protocol Compatibility
|
|
72
|
+
|
|
73
|
+
You can also connect to UltSQL from Python using standard `psycopg2` or `asyncpg`:
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
import psycopg2
|
|
77
|
+
|
|
78
|
+
conn = psycopg2.connect("host=localhost port=5432 user=admin password=admin dbname=ultsql_db")
|
|
79
|
+
cur = conn.cursor()
|
|
80
|
+
cur.execute("SELECT * FROM users")
|
|
81
|
+
print(cur.fetchall())
|
|
82
|
+
```
|
ultsql-1.0.15/README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# 🐍 UltSQL Python Package (`ultsql`)
|
|
2
|
+
|
|
3
|
+
The official Python client for **UltSQL** — the converged multimodal database engine combining Relational SQL, NoSQL JSON, HNSW Vector RAG, and PL/SQL.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## ⚡ Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install ultsql
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 🚀 Quickstart Usage
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
from ultsql import UltSQLClient
|
|
19
|
+
|
|
20
|
+
# Connect to running UltSQL instance (via REST or PgWire)
|
|
21
|
+
db = UltSQLClient("http://localhost:8080")
|
|
22
|
+
|
|
23
|
+
# 1. Query records
|
|
24
|
+
result = db.query("users")
|
|
25
|
+
print("Users:", result["rows"])
|
|
26
|
+
|
|
27
|
+
# 2. Insert record
|
|
28
|
+
db.insert("users", {"id": 1, "name": "Alice", "score": 95.5})
|
|
29
|
+
|
|
30
|
+
# 3. Get OpenAPI 3.0 Documentation Schema
|
|
31
|
+
spec = db.openapi_spec()
|
|
32
|
+
print("OpenAPI Version:", spec["openapi"])
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 🔌 PostgreSQL Wire Protocol Compatibility
|
|
38
|
+
|
|
39
|
+
You can also connect to UltSQL from Python using standard `psycopg2` or `asyncpg`:
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
import psycopg2
|
|
43
|
+
|
|
44
|
+
conn = psycopg2.connect("host=localhost port=5432 user=admin password=admin dbname=ultsql_db")
|
|
45
|
+
cur = conn.cursor()
|
|
46
|
+
cur.execute("SELECT * FROM users")
|
|
47
|
+
print(cur.fetchall())
|
|
48
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "ultsql"
|
|
7
|
+
version = "1.0.15"
|
|
8
|
+
description = "Universal Python client for the UltSQL 100% Pure-Dart multimodal database engine."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "BSD-3-Clause"
|
|
11
|
+
authors = [
|
|
12
|
+
{ name = "Om Patel", email = "ompatel3158@gmail.com" }
|
|
13
|
+
]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 5 - Production/Stable",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Programming Language :: Python :: 3.7",
|
|
19
|
+
"Programming Language :: Python :: 3.8",
|
|
20
|
+
"Programming Language :: Python :: 3.9",
|
|
21
|
+
"Programming Language :: Python :: 3.10",
|
|
22
|
+
"Programming Language :: Python :: 3.11",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Programming Language :: Python :: 3.13",
|
|
25
|
+
"Programming Language :: Python :: 3.14",
|
|
26
|
+
"Operating System :: OS Independent",
|
|
27
|
+
"Topic :: Database",
|
|
28
|
+
"Topic :: Database :: Database Engines/Servers"
|
|
29
|
+
]
|
|
30
|
+
requires-python = ">=3.7"
|
|
31
|
+
|
|
32
|
+
[project.urls]
|
|
33
|
+
Homepage = "https://github.com/ompatel3158/ULTSQL"
|
|
34
|
+
Documentation = "https://pub.dev/packages/ultsql"
|
|
35
|
+
Repository = "https://github.com/ompatel3158/ULTSQL"
|
|
36
|
+
Issues = "https://github.com/ompatel3158/ULTSQL/issues"
|
|
37
|
+
|
|
38
|
+
[tool.setuptools.packages.find]
|
|
39
|
+
where = ["src"]
|
ultsql-1.0.15/setup.cfg
ADDED
ultsql-1.0.15/setup.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name="ultsql",
|
|
5
|
+
version="1.0.15",
|
|
6
|
+
description="Universal Python client for the UltSQL 100% Pure-Dart multimodal database engine.",
|
|
7
|
+
long_description=open("README.md", encoding="utf-8").read(),
|
|
8
|
+
long_description_content_type="text/markdown",
|
|
9
|
+
author="Om Patel",
|
|
10
|
+
url="https://github.com/ompatel3158/ULTSQL",
|
|
11
|
+
packages=find_packages(),
|
|
12
|
+
classifiers=[
|
|
13
|
+
"Programming Language :: Python :: 3",
|
|
14
|
+
"License :: OSI Approved :: MIT License",
|
|
15
|
+
"Operating System :: OS Independent",
|
|
16
|
+
],
|
|
17
|
+
python_requires=">=3.7",
|
|
18
|
+
)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""
|
|
2
|
+
UltSQL Python Client Module
|
|
3
|
+
"""
|
|
4
|
+
import json
|
|
5
|
+
import urllib.request
|
|
6
|
+
import urllib.parse
|
|
7
|
+
from typing import Dict, Any, List
|
|
8
|
+
|
|
9
|
+
class UltSQLClient:
|
|
10
|
+
"""Python Client for UltSQL Database Engine via REST Daemon."""
|
|
11
|
+
|
|
12
|
+
def __init__(self, host: str = "http://localhost:8080") -> None:
|
|
13
|
+
self.host: str = host.rstrip('/')
|
|
14
|
+
|
|
15
|
+
def query(self, table_name: str) -> Dict[str, Any]:
|
|
16
|
+
"""Fetch all records from a table."""
|
|
17
|
+
url = f"{self.host}/{table_name}"
|
|
18
|
+
req = urllib.request.Request(url)
|
|
19
|
+
with urllib.request.urlopen(req) as resp:
|
|
20
|
+
data: Dict[str, Any] = json.loads(resp.read().decode('utf-8'))
|
|
21
|
+
return data
|
|
22
|
+
|
|
23
|
+
def insert(self, table_name: str, data_dict: Dict[str, Any]) -> Dict[str, Any]:
|
|
24
|
+
"""Insert a record into a table."""
|
|
25
|
+
url = f"{self.host}/{table_name}"
|
|
26
|
+
payload = json.dumps(data_dict).encode('utf-8')
|
|
27
|
+
req = urllib.request.Request(url, data=payload, headers={'Content-Type': 'application/json'}, method='POST')
|
|
28
|
+
with urllib.request.urlopen(req) as resp:
|
|
29
|
+
return json.loads(resp.read().decode('utf-8'))
|
|
30
|
+
|
|
31
|
+
def truncate(self, table_name: str) -> Dict[str, Any]:
|
|
32
|
+
"""Truncate a table."""
|
|
33
|
+
url = f"{self.host}/{table_name}"
|
|
34
|
+
req = urllib.request.Request(url, method='DELETE')
|
|
35
|
+
with urllib.request.urlopen(req) as resp:
|
|
36
|
+
return json.loads(resp.read().decode('utf-8'))
|
|
37
|
+
|
|
38
|
+
def openapi_spec(self) -> Dict[str, Any]:
|
|
39
|
+
"""Get OpenAPI 3.0 documentation spec."""
|
|
40
|
+
url = f"{self.host}/openapi.json"
|
|
41
|
+
req = urllib.request.Request(url)
|
|
42
|
+
with urllib.request.urlopen(req) as resp:
|
|
43
|
+
return json.loads(resp.read().decode('utf-8'))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Marker file for PEP 561 type checking
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ultsql
|
|
3
|
+
Version: 1.0.15
|
|
4
|
+
Summary: Universal Python client for the UltSQL 100% Pure-Dart multimodal database engine.
|
|
5
|
+
Home-page: https://github.com/ompatel3158/ULTSQL
|
|
6
|
+
Author: Om Patel
|
|
7
|
+
Author-email: Om Patel <ompatel3158@gmail.com>
|
|
8
|
+
License-Expression: BSD-3-Clause
|
|
9
|
+
Project-URL: Homepage, https://github.com/ompatel3158/ULTSQL
|
|
10
|
+
Project-URL: Documentation, https://pub.dev/packages/ultsql
|
|
11
|
+
Project-URL: Repository, https://github.com/ompatel3158/ULTSQL
|
|
12
|
+
Project-URL: Issues, https://github.com/ompatel3158/ULTSQL/issues
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
+
Classifier: Operating System :: OS Independent
|
|
25
|
+
Classifier: Topic :: Database
|
|
26
|
+
Classifier: Topic :: Database :: Database Engines/Servers
|
|
27
|
+
Requires-Python: >=3.7
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Dynamic: author
|
|
31
|
+
Dynamic: home-page
|
|
32
|
+
Dynamic: license-file
|
|
33
|
+
Dynamic: requires-python
|
|
34
|
+
|
|
35
|
+
# 🐍 UltSQL Python Package (`ultsql`)
|
|
36
|
+
|
|
37
|
+
The official Python client for **UltSQL** — the converged multimodal database engine combining Relational SQL, NoSQL JSON, HNSW Vector RAG, and PL/SQL.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## ⚡ Installation
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install ultsql
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 🚀 Quickstart Usage
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
from ultsql import UltSQLClient
|
|
53
|
+
|
|
54
|
+
# Connect to running UltSQL instance (via REST or PgWire)
|
|
55
|
+
db = UltSQLClient("http://localhost:8080")
|
|
56
|
+
|
|
57
|
+
# 1. Query records
|
|
58
|
+
result = db.query("users")
|
|
59
|
+
print("Users:", result["rows"])
|
|
60
|
+
|
|
61
|
+
# 2. Insert record
|
|
62
|
+
db.insert("users", {"id": 1, "name": "Alice", "score": 95.5})
|
|
63
|
+
|
|
64
|
+
# 3. Get OpenAPI 3.0 Documentation Schema
|
|
65
|
+
spec = db.openapi_spec()
|
|
66
|
+
print("OpenAPI Version:", spec["openapi"])
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 🔌 PostgreSQL Wire Protocol Compatibility
|
|
72
|
+
|
|
73
|
+
You can also connect to UltSQL from Python using standard `psycopg2` or `asyncpg`:
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
import psycopg2
|
|
77
|
+
|
|
78
|
+
conn = psycopg2.connect("host=localhost port=5432 user=admin password=admin dbname=ultsql_db")
|
|
79
|
+
cur = conn.cursor()
|
|
80
|
+
cur.execute("SELECT * FROM users")
|
|
81
|
+
print(cur.fetchall())
|
|
82
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
setup.py
|
|
5
|
+
src/ultsql/__init__.py
|
|
6
|
+
src/ultsql/client.py
|
|
7
|
+
src/ultsql/py.typed
|
|
8
|
+
src/ultsql.egg-info/PKG-INFO
|
|
9
|
+
src/ultsql.egg-info/SOURCES.txt
|
|
10
|
+
src/ultsql.egg-info/dependency_links.txt
|
|
11
|
+
src/ultsql.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ultsql
|