Metadata-Version: 2.4
Name: alt-python-pydbc-sqlite
Version: 1.0.0
Summary: pydbc driver for SQLite — wraps stdlib sqlite3 (qmark paramstyle)
Project-URL: Homepage, https://github.com/alt-python/pydbc
Project-URL: Repository, https://github.com/alt-python/pydbc
Project-URL: Documentation, https://github.com/alt-python/pydbc/blob/main/docs/getting-started.md
Project-URL: Bug Tracker, https://github.com/alt-python/pydbc/issues
Author: Craig Parravicini, Claude (Anthropic)
License-Expression: MIT
License-File: LICENSE
Keywords: database,db-api,jdbc,mssql,mysql,postgresql,sql,sqlite
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Database
Classifier: Topic :: Database :: Front-Ends
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Requires-Dist: alt-python-pydbc-core
Description-Content-Type: text/markdown

# alt-python-pydbc-sqlite

pydbc driver for SQLite via the Python standard-library `sqlite3` module. Zero external dependencies.

---

## Installation

```bash
uv add alt-python-pydbc-sqlite
```

---

## URL formats

| Format | Description |
|---|---|
| `pydbc:sqlite::memory:` | In-memory database (isolated per connection) |
| `pydbc:sqlite:./path/to/db` | File-backed database |
| `pydbc:sqlite:/absolute/path/to/db` | File-backed database (absolute path) |

---

## Usage

```python
import pydbc_sqlite  # registers SQLiteDriver with DriverManager
from pydbc_core import DriverManager

conn = DriverManager.get_connection("pydbc:sqlite::memory:")
stmt = conn.create_statement()
rs = stmt.execute_query("SELECT 1 AS n")
print(rs.rows)   # [(1,)]
conn.close()
```

### Parameterised queries

```python
# Positional parameters
stmt = conn.create_statement()
rs = stmt.execute_query("SELECT * FROM users WHERE id = ?", (42,))

# Named parameters
rs = stmt.execute_query("SELECT * FROM users WHERE id = :id", {"id": 42})
```

### Prepared statements

```python
ps = conn.prepare_statement("INSERT INTO users (name, email) VALUES (?, ?)")
ps.execute_update(("Alice", "alice@example.com"))
ps.execute_update(("Bob", "bob@example.com"))
conn.commit()
```

---

## Paramstyle note

`sqlite3` uses `qmark` (`?`) placeholders internally. pydbc accepts both `?`
(positional) and `:name` (named) syntax and translates automatically — you never
need to know which style the underlying driver uses.

---

## Documentation

- [Getting started tutorial](https://github.com/alt-python/pydbc/blob/main/docs/getting-started.md)
- [Core API reference](https://github.com/alt-python/pydbc/blob/main/docs/api-reference.md)

---

## License

MIT
