fastmssql 0.3.6__cp314-cp314-macosx_11_0_arm64.whl → 0.3.8__cp314-cp314-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.
Potentially problematic release.
This version of fastmssql might be problematic. Click here for more details.
- fastmssql/fastmssql.cpython-314-darwin.so +0 -0
- {fastmssql-0.3.6.dist-info → fastmssql-0.3.8.dist-info}/METADATA +30 -2
- fastmssql-0.3.8.dist-info/RECORD +6 -0
- fastmssql-0.3.6.dist-info/RECORD +0 -6
- {fastmssql-0.3.6.dist-info → fastmssql-0.3.8.dist-info}/WHEEL +0 -0
- {fastmssql-0.3.6.dist-info → fastmssql-0.3.8.dist-info}/licenses/LICENSE +0 -0
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastmssql
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.8
|
|
4
4
|
Classifier: Development Status :: 4 - Beta
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
@@ -92,7 +92,7 @@ pip install fastmssql
|
|
|
92
92
|
|
|
93
93
|
### Prerequisites
|
|
94
94
|
|
|
95
|
-
- Python 3.
|
|
95
|
+
- Python 3.9 to 3.14
|
|
96
96
|
- Microsoft SQL Server (any recent version)
|
|
97
97
|
|
|
98
98
|
### From source (development)
|
|
@@ -127,7 +127,35 @@ async def main():
|
|
|
127
127
|
asyncio.run(main())
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
+
## Explicit Connection Management
|
|
130
131
|
|
|
132
|
+
When not utilizing Python's context manager (async with), **FastMssql** uses *lazy connection initialization*:
|
|
133
|
+
if you call `query()` or `execute()` on a new `Connection`, the underlying pool is created if not already present.
|
|
134
|
+
|
|
135
|
+
For more control, you can explicitly connect and disconnect:
|
|
136
|
+
|
|
137
|
+
```python
|
|
138
|
+
import asyncio
|
|
139
|
+
from fastmssql import Connection
|
|
140
|
+
|
|
141
|
+
async def main():
|
|
142
|
+
conn_str = "Server=localhost;Database=master;User Id=myuser;Password=mypass"
|
|
143
|
+
conn = Connection(conn_str)
|
|
144
|
+
|
|
145
|
+
# Explicitly connect
|
|
146
|
+
await conn.connect()
|
|
147
|
+
assert await conn.is_connected()
|
|
148
|
+
|
|
149
|
+
# Run queries
|
|
150
|
+
result = await conn.query("SELECT 42 as answer")
|
|
151
|
+
print(result.rows()[0]["answer"]) # -> 42
|
|
152
|
+
|
|
153
|
+
# Explicitly disconnect
|
|
154
|
+
await conn.disconnect()
|
|
155
|
+
assert not await conn.is_connected()
|
|
156
|
+
|
|
157
|
+
asyncio.run(main())
|
|
158
|
+
```
|
|
131
159
|
## Usage
|
|
132
160
|
|
|
133
161
|
### Connection options
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
fastmssql-0.3.8.dist-info/RECORD,,
|
|
2
|
+
fastmssql-0.3.8.dist-info/WHEEL,sha256=Dfn9zUatNC9j13ABUHNgyZmkyHCncipEw4RIexPnpdI,132
|
|
3
|
+
fastmssql-0.3.8.dist-info/METADATA,sha256=z2NgSJP9XoTN2zif5cEck9yMHBSUNCJpLSPjz4ZQv0w,13364
|
|
4
|
+
fastmssql-0.3.8.dist-info/licenses/LICENSE,sha256=OHj2nKice3tSk2Us200EWXDpwDKtAzeOu4NF4rwg5gk,33858
|
|
5
|
+
fastmssql/fastmssql.cpython-314-darwin.so,sha256=7STP9O1LWCTV_W6WNLAU5cDB-gXWbgIS7FxpkjxKkNs,2069296
|
|
6
|
+
fastmssql/__init__.py,sha256=H2sCgkVlgRo3oIbejLqnHUIsFCqcbJIc20TJ4CCPkQo,43543
|
fastmssql-0.3.6.dist-info/RECORD
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
fastmssql/fastmssql.cpython-314-darwin.so,sha256=x0OcG8iWfQ8qA7rpAotGp-_cz0xTWJBy5dwBEcL8MF8,2052720
|
|
2
|
-
fastmssql/__init__.py,sha256=H2sCgkVlgRo3oIbejLqnHUIsFCqcbJIc20TJ4CCPkQo,43543
|
|
3
|
-
fastmssql-0.3.6.dist-info/RECORD,,
|
|
4
|
-
fastmssql-0.3.6.dist-info/WHEEL,sha256=Dfn9zUatNC9j13ABUHNgyZmkyHCncipEw4RIexPnpdI,132
|
|
5
|
-
fastmssql-0.3.6.dist-info/METADATA,sha256=JPpjwy3GKpu2Nu4aLbJWr4-udpB7QNB7uhYrQIFjtg4,12514
|
|
6
|
-
fastmssql-0.3.6.dist-info/licenses/LICENSE,sha256=OHj2nKice3tSk2Us200EWXDpwDKtAzeOu4NF4rwg5gk,33858
|
|
File without changes
|
|
File without changes
|