Skip to main content

A DB-API 2.0 style interface for SQLite databases.

Project description

SQLite7

SQLite7 is a DB-API 2.0 style interface for SQLite databases backed directly by the SQLite C library, with both synchronous and asynchronous APIs.

Installation

pip install sqlite7

Requires: Python 3.11+

Quick Example

from sqlite7 import connect

with open_db(":memory:") as db:
    db.script(
        '''
        CREATE TABLE users (
            id INTEGER PRIMARY KEY,
            email TEXT UNIQUE NOT NULL,
            name TEXT NOT NULL,
            age INTEGER NOT NULL
        );
        '''
    )

    users = db.table("users")
    users.insert({"email": "ada@example.com", "name": "Ada", "age": 36})
    users.insert({"email": "grace@example.com", "name": "Grace", "age": 37})

    rows = users.select(
        columns=["id", "name"],
        where="age >= ?",
        params=[36],
        order_by="id ASC",
        limit=10,
        offset=0,
    )
    print(rows)

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sqlite7-1.0.0.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sqlite7-1.0.0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file sqlite7-1.0.0.tar.gz.

File metadata

  • Download URL: sqlite7-1.0.0.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sqlite7-1.0.0.tar.gz
Algorithm Hash digest
SHA256 70c1990d57cb753b310e564fc4092f3efa80a5b026ac9b17b7b5535582618932
MD5 eb4e7d5a9f24b6c5762ff439b489393e
BLAKE2b-256 d527a6bfe1d6a58279f91d53a440e332e2545e4ff3eca8f94452c2abc87dfa8f

See more details on using hashes here.

Provenance

The following attestation bundles were made for sqlite7-1.0.0.tar.gz:

Publisher: python-publish.yml on joumaico/sqlite7

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sqlite7-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sqlite7-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sqlite7-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26b184b4668a3c929073c6408b479a3561a0d12367320102718197cdd4a475bf
MD5 3537b7f5970ddc3a07e0b60d0e3bc6d1
BLAKE2b-256 1fe10d474d43363ab9121ec36e4f6a829cfa08ad8c2422059534607c3ef48dc3

See more details on using hashes here.

Provenance

The following attestation bundles were made for sqlite7-1.0.0-py3-none-any.whl:

Publisher: python-publish.yml on joumaico/sqlite7

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page