Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ jobs:
extras: "uv"
env:
CIBW_ARCHS: ${{ matrix.cibw_arch }}
CIBW_SKIP: "cp313t-*"

- uses: actions/upload-artifact@v4
with:
Expand All @@ -80,7 +81,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install uv and set the Python version
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@v8.3.2
with:
python-version: 3.12
enable-cache: true
Expand Down Expand Up @@ -113,7 +114,7 @@ jobs:
run: ls -l dist

- name: Install uv and set the Python version
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@v8.3.2
with:
python-version: 3.12
# No caching needed for publish step
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,25 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Cargo registry cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-

- name: Set up Cargo build cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-

- name: Install uv and set the Python version
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@v8.3.2
with:
version: "latest"
python-version: ${{ matrix.python-version }}
enable-cache: true

Expand Down Expand Up @@ -106,4 +107,4 @@ jobs:
FAST_MSSQL_TEST_DB_PASSWORD: "YourStrong@Password"
FAST_MSSQL_TEST_SERVER: "localhost"
FAST_MSSQL_TEST_PORT: "1433"
FAST_MSSQL_TEST_DATABASE: "master"
FAST_MSSQL_TEST_DATABASE: "master"
51 changes: 25 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fastmssql_core"
version = "0.7.3"
version = "0.7.4"
edition = "2024"

[lib]
Expand All @@ -27,24 +27,24 @@ debug = true # Keep debug info for development
opt-level = 2

[dependencies]
pyo3 = { version = "0.28.3", features = ["extension-module", "abi3-py311", "chrono"] }
pyo3-async-runtimes = { version = "0.28.0", features = ["tokio", "tokio-runtime"] }
pyo3 = { version = "0.29.0", features = ["extension-module", "abi3-py311", "chrono"] }
pyo3-async-runtimes = { version = "0.29.0", features = ["tokio", "tokio-runtime"] }
tokio = { version = "1.52.3", features = ["rt-multi-thread", "net", "sync", "time", "io-util", "process"] }
tokio-util = { version = "0.7.18", features = ["compat"] }
tiberius = { version = "0.12.3", features = ["chrono", "tds73", "rustls"], default-features = false }
bb8 = "0.9.1"

chrono = { version = "0.4.44" }
uuid = { version = "1.23.1" }
chrono = { version = "0.4.45" }
uuid = { version = "1.23.4" }
ahash = "0.8.12" # Faster hashing algorithm (used in optimized_types.rs)
smallvec = "1.15.1" # Stack-allocated vectors for small collections
smallvec = "1.15.2" # Stack-allocated vectors for small collections
mimalloc = { version = "0.1.52", default-features = false } # Microsoft's fast memory allocator
slab = "0.4.12" # Pinned sub-dependency due to CVE-2025-55159
bytes = "1.11.1" # Pinned sub-dependency due to CVE-2026-25541
quinn-proto = "0.11.14" # Pinned sub-dependency due to CVE-2026-31812
bytes = "1.12.0" # Pinned sub-dependency due to CVE-2026-25541
quinn-proto = "0.11.15" # Pinned sub-dependency due to CVE-2026-31812

# Azure authentication dependencies
reqwest = { version = "0.13.3", features = ["json", "form", "rustls"], default-features = false }
reqwest = { version = "0.13.4", features = ["json", "form", "rustls"], default-features = false }
serde_json = "1.0.150"


Expand Down
45 changes: 0 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Great for data ingestion, bulk inserts, and large-scale query workloads.
- Thread‑safe: safe to use in concurrent apps
- Cross‑platform: Windows, macOS, Linux
- Batch operations: high-performance bulk inserts and batch query execution
- Apache Arrow support

## Installation

Expand All @@ -38,14 +37,6 @@ Great for data ingestion, bulk inserts, and large-scale query workloads.
pip install fastmssql
```

### Optional dependencies

**Apache Arrow support** (for `to_arrow()` method):

```bash
pip install fastmssql[arrow]
```

### Prerequisites

- Python 3.11 to 3.14
Expand Down Expand Up @@ -352,42 +343,6 @@ async def main_fetching():
asyncio.run(main_fetching())
```

### Apache Arrow

Convert query results to Apache Arrow tables for efficient bulk data processing and interoperability with data science tools:

```python
import asyncio
from fastmssql import Connection

async def main():
conn_str = "Server=localhost;Database=master;User Id=myuser;Password=mypass"
async with Connection(conn_str) as conn:
# Execute query and convert to Arrow
result = await conn.query("SELECT id, name, salary FROM employees")
arrow_table = result.to_arrow()

# Arrow Table enables:
# - Efficient columnar storage and compute
# - Integration with Pandas, DuckDB, Polars
# - Parquet/ORC serialization
df = arrow_table.to_pandas() # Convert to pandas DataFrame
print(df)

# Write to Parquet for long-term storage
import pyarrow.parquet as pq
pq.write_table(arrow_table, "employees.parquet")

# Or use with DuckDB for analytical queries
import duckdb
result = duckdb.from_arrow(arrow_table).filter("salary > 50000").execute()
print(result.fetchall())
```

**Requirements**: Install PyArrow with `pip install pyarrow`

Note: Results are converted eagerly into Arrow arrays. For very large datasets, consider chunking queries or using iteration-based processing instead.

### Connection pooling

Tune the pool to fit your workload. Constructor signature:
Expand Down
27 changes: 11 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "maturin"

[project]
name = "fastmssql"
version = "0.7.3"
version = "0.7.4"

description = "A high-performance async Python library for Microsoft SQL Server built on Rust for heavy workloads and low latency."
readme = "README.md"
Expand Down Expand Up @@ -69,14 +69,14 @@ Repository = "https://github.com/Rivendael/FastMssql"
"Bug Tracker" = "https://github.com/Rivendael/FastMssql/issues"
Documentation = "https://github.com/Rivendael/FastMssql#readme"

[project.optional-dependencies]
arrow = ["pyarrow>=13.0.0"]

[tool.maturin]
features = ["pyo3/abi3-py311"]
module-name = "fastmssql"
python-source = "python"
include = ["fastmssql.pyi"]
include = [
"python/fastmssql/*.pyi",
"python/fastmssql/py.typed",
]

[tool.pytest.ini_options]
minversion = "6.0"
Expand Down Expand Up @@ -109,9 +109,6 @@ filterwarnings = [
"ignore::PendingDeprecationWarning",
]

[tool.uv]
required-version = ">=0.9.7"

[tool.cibuildwheel]
build-frontend = "build[uv]"
build = "cp311-* cp312-* cp313-* cp313t-* cp314-* cp314t-*"
Expand Down Expand Up @@ -142,18 +139,16 @@ MACOSX_DEPLOYMENT_TARGET = "10.15"

[dependency-groups]
dev = [
"ruff>=0.15.11",
"pytest==9.0.3",
"pytest-asyncio==1.3.0",
"ruff>=0.15.20",
"pytest==9.1.1",
"pytest-asyncio==1.4.0",
"pytest-timeout==2.4.0",
"psutil==7.2.2", # For memory and process monitoring in stress tests
"pytest-xdist==3.8.0",
"maturin==1.13.1",
"maturin==1.14.1",
"python-dotenv==1.2.2",
"cibuildwheel[uv]>=3.4.1",
"cibuildwheel[uv]>=4.1.0",
"wheel==0.47.0",
"filelock==3.29.0",
"pyarrow==23.0.1",
"filelock==3.29.5",
"uvloop==0.22.1"

]
Loading
Loading