sqlalchemy-iris 0.17.1b6__py3-none-any.whl → 0.17.1b7__py3-none-any.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: sqlalchemy-iris
3
- Version: 0.17.1b6
3
+ Version: 0.17.1b7
4
4
  Summary: InterSystems IRIS for SQLAlchemy
5
5
  Home-page: https://github.com/caretdev/sqlalchemy-iris
6
6
  Maintainer: CaretDev
@@ -103,6 +103,60 @@ docker run -d --name iris \
103
103
  intersystemsdc/iris-community:preview
104
104
  ```
105
105
 
106
+ Examples
107
+ ===
108
+
109
+ IRISVector
110
+ ---
111
+
112
+ ```python
113
+ from sqlalchemy import Column, MetaData, Table, select
114
+ from sqlalchemy.sql.sqltypes import Integer, UUID
115
+ from sqlalchemy_iris import IRISVector
116
+ from sqlalchemy import create_engine
117
+ from sqlalchemy.orm import DeclarativeBase
118
+ import uuid
119
+
120
+ DATABASE_URL = "iris://_SYSTEM:SYS@localhost:1972/USER"
121
+ engine = create_engine(DATABASE_URL, echo=False)
122
+
123
+ # Create a table metadata
124
+ metadata = MetaData()
125
+
126
+
127
+ class Base(DeclarativeBase):
128
+ pass
129
+
130
+
131
+ def main():
132
+ demo_table = Table(
133
+ "demo_table",
134
+ metadata,
135
+ Column("id", Integer, primary_key=True, autoincrement=True),
136
+ Column("uuid", UUID),
137
+ Column("embedding", IRISVector(item_type=float, max_items=3)),
138
+ )
139
+
140
+ demo_table.drop(engine, checkfirst=True)
141
+ demo_table.create(engine, checkfirst=True)
142
+ with engine.connect() as conn:
143
+ conn.execute(
144
+ demo_table.insert(),
145
+ [
146
+ {"uuid": uuid.uuid4(), "embedding": [1, 2, 3]},
147
+ {"uuid": uuid.uuid4(), "embedding": [2, 3, 4]},
148
+ ],
149
+ )
150
+ conn.commit()
151
+ result = conn.execute(
152
+ demo_table.select()
153
+ ).fetchall()
154
+ print("result", result)
155
+
156
+
157
+ main()
158
+ ```
159
+
106
160
  _Port 1972 is used for binary communication (this driver, xDBC and so on), and 52773 is for web (Management Portal, IRIS based web-applications and API's)._
107
161
 
108
162
  The System Management Portal is available by URL: `http://localhost:52773/csp/sys/UtilHome.csp`
@@ -75,9 +75,9 @@ sqlalchemy_iris/requirements.py,sha256=9Klyec0qS2MHEaXbONauP7FUF5bi__vfsBrwOEKKT
75
75
  sqlalchemy_iris/types.py,sha256=M5uyeANVN6MU40kiWBePGTCnVaAAKmfLOHq7zuJ0z6A,12024
76
76
  sqlalchemy_iris/intersystems/__init__.py,sha256=J1WcKKAfEASHTmxCav_sGQeb2GE-FXgrgWnUDY8zMag,5463
77
77
  sqlalchemy_iris/intersystems/dbapi.py,sha256=JOPjpXrD_cwCzAwnO9cRwBtv2SM8YbczOk8PFX3oM_4,899
78
- sqlalchemy_iris-0.17.1b6.dist-info/LICENSE,sha256=RQmigqltsLq8lfOBc_KwtL0gkODyUCNpU-0ZiZwGlho,1075
79
- sqlalchemy_iris-0.17.1b6.dist-info/METADATA,sha256=-sIyXAd0GiVcyVqe0k-oOKp9wlxo6OcdLpp9XRP3eSc,2946
80
- sqlalchemy_iris-0.17.1b6.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
81
- sqlalchemy_iris-0.17.1b6.dist-info/entry_points.txt,sha256=sYU1YvyyeGqOVVMpHySThfEhrVQL1lUVz5rDwmwCj7E,258
82
- sqlalchemy_iris-0.17.1b6.dist-info/top_level.txt,sha256=QRY18YUXUJrRde4aayj_brj0lr2LBRVZS1ZoVoDFVS0,45
83
- sqlalchemy_iris-0.17.1b6.dist-info/RECORD,,
78
+ sqlalchemy_iris-0.17.1b7.dist-info/LICENSE,sha256=RQmigqltsLq8lfOBc_KwtL0gkODyUCNpU-0ZiZwGlho,1075
79
+ sqlalchemy_iris-0.17.1b7.dist-info/METADATA,sha256=X50-JetIa4F3l2cNzOQ39RVr7bbpEXtc-8CYLQ-ok_w,4173
80
+ sqlalchemy_iris-0.17.1b7.dist-info/WHEEL,sha256=EaM1zKIUYa7rQnxGiOCGhzJABRwy4WO57rWMR3_tj4I,91
81
+ sqlalchemy_iris-0.17.1b7.dist-info/entry_points.txt,sha256=sYU1YvyyeGqOVVMpHySThfEhrVQL1lUVz5rDwmwCj7E,258
82
+ sqlalchemy_iris-0.17.1b7.dist-info/top_level.txt,sha256=QRY18YUXUJrRde4aayj_brj0lr2LBRVZS1ZoVoDFVS0,45
83
+ sqlalchemy_iris-0.17.1b7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.2)
2
+ Generator: setuptools (75.9.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5