fastmssql 0.3.6__cp312-cp312-win_amd64.whl → 0.3.8__cp312-cp312-win_amd64.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.

Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastmssql
3
- Version: 0.3.6
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.8 to 3.14
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/METADATA,sha256=Jp2-W6PGv8gpXMZBIZ6uHbkuUBKfN1XqECDOGJZIM5Y,13744
2
+ fastmssql-0.3.8.dist-info/WHEEL,sha256=4hYCffp0RsSVQAuv2PMtXQ9QS7YSHeZi4PrSg-wi2q0,96
3
+ fastmssql-0.3.8.dist-info/licenses/LICENSE,sha256=oCvGJWOz1z4-4sMRHL32UnC0BnRFXmJZYQ0QAsv0Cok,34533
4
+ fastmssql/__init__.py,sha256=xTvVL92qRiQd3BSe3k7sZ7ud9J9pmNxonpixx48G2Q0,44500
5
+ fastmssql/fastmssql.cp312-win_amd64.pyd,sha256=6idV0OehTzfZTNTgmPwpEiyiYk0FEvG9OW3xCppWpNA,2237952
6
+ fastmssql-0.3.8.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- fastmssql-0.3.6.dist-info/METADATA,sha256=5XyNxAUnsqTojQjM_B77pKBrZD55Y9RhbC2F2EHKwm8,12866
2
- fastmssql-0.3.6.dist-info/WHEEL,sha256=4hYCffp0RsSVQAuv2PMtXQ9QS7YSHeZi4PrSg-wi2q0,96
3
- fastmssql-0.3.6.dist-info/licenses/LICENSE,sha256=oCvGJWOz1z4-4sMRHL32UnC0BnRFXmJZYQ0QAsv0Cok,34533
4
- fastmssql/__init__.py,sha256=xTvVL92qRiQd3BSe3k7sZ7ud9J9pmNxonpixx48G2Q0,44500
5
- fastmssql/fastmssql.cp312-win_amd64.pyd,sha256=jAW4aQOJqtZcs1I4Ci8PJ_2bmn66Y_amVAVc8YDX2wM,2219008
6
- fastmssql-0.3.6.dist-info/RECORD,,