Skip to content

Commit eef6c01

Browse files
committed
chore: windows.md code alignment
1 parent 2ad6dec commit eef6c01

File tree

1 file changed

+30
-29
lines changed
  • sqlite-cloud/sqlite-ai/sqlite-sync/quick-starts

1 file changed

+30
-29
lines changed

sqlite-cloud/sqlite-ai/sqlite-sync/quick-starts/windows.md

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ This guide explains how to install SQLite on Windows with support for loading ex
1111
## Using SQLite with Python
1212

1313
1. **Download Python**
14+
1415
Get the latest Python for Windows from <a href="https://www.python.org/downloads/windows/" target="_blank">python.org</a>.
1516

1617
2. **Install Python**
@@ -22,40 +23,40 @@ This guide explains how to install SQLite on Windows with support for loading ex
2223
3. **Check your installation**
2324
Open Command Prompt and run:
2425

25-
```bash
26-
python --version
27-
python -c "import sqlite3; print('SQLite version:', sqlite3.sqlite_version)"
28-
```
26+
```bash
27+
python --version
28+
python -c "import sqlite3; print('SQLite version:', sqlite3.sqlite_version)"
29+
```
2930

3031
4. **Download the Extension**
32+
3133
Go to <a href="https://github.com/sqliteai/sqlite-sync/releases" target="_blank">sqlite-sync releases</a> and download the extension.
3234

3335
5. **Load Extension**
34-
35-
```python
36-
import sqlite3
37-
import os
38-
39-
# Path to your compiled extension (.dll for Windows)
40-
EXTENSION_PATH = os.path.abspath("cloudsync")
41-
42-
# Connect to SQLite and enable extension loading
43-
conn = sqlite3.connect(":memory:")
44-
conn.enable_load_extension(True)
45-
46-
# Load the extension
47-
try:
48-
conn.load_extension(EXTENSION_PATH)
49-
print("Extension loaded successfully.")
50-
except sqlite3.OperationalError as e:
51-
print(f"Failed to load extension: {e}")
52-
53-
conn.enable_load_extension(False)
54-
55-
# Optionally test it (e.g., call a custom SQL function)
56-
cursor = conn.execute("SELECT cloudsync_version();")
57-
print(cursor.fetchone())
58-
```
36+
```python
37+
import sqlite3
38+
import os
39+
40+
# Path to your compiled extension (.dll for Windows)
41+
EXTENSION_PATH = os.path.abspath("cloudsync")
42+
43+
# Connect to SQLite and enable extension loading
44+
conn = sqlite3.connect(":memory:")
45+
conn.enable_load_extension(True)
46+
47+
# Load the extension
48+
try:
49+
conn.load_extension(EXTENSION_PATH)
50+
print("Extension loaded successfully.")
51+
except sqlite3.OperationalError as e:
52+
print(f"Failed to load extension: {e}")
53+
54+
conn.enable_load_extension(False)
55+
56+
# Optionally test it (e.g., call a custom SQL function)
57+
cursor = conn.execute("SELECT cloudsync_version();")
58+
print(cursor.fetchone())
59+
```
5960

6061
## Using SQLite with C#
6162

0 commit comments

Comments
 (0)