Skip to main content

An improved Python interface to SQLite

Project description

isqlite

isqlite is an improved Python interface to SQLite. It has a more convenient API, support for database migrations, and a command-line interface.

from isqlite import Database

with Database(":memory:") as db:
    pk = db.create("employees", {"name": "John Doe", "age": 30})

    person = db.get_by_pk("employees", pk)
    print(person["name"], person["age"])

    db.update_by_pk("employees", pk, {"age": 35})

    employees = db.list(
        "employees",
        where="name LIKE :name_pattern AND age > 40",
        values={"name_pattern": "John%"},
    )

    pairs = db.sql(
        """
        SELECT
          teams.name, employees.name
        FROM
          employees
        INNER JOIN
          teams
        ON
          employees.team = teams.id
        """
    )

Features

  • A convenient Python API
  • Database migrations
  • A command-line interface

Installation

Install isqlite with Pip:

$ pip install isqlite

Documentation

Comprehensive documentation, including the API reference, is available at https://isqlite.readthedocs.io/en/latest/.

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

isqlite-0.10.1.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

isqlite-0.10.1-py3-none-any.whl (45.1 kB view details)

Uploaded Python 3

File details

Details for the file isqlite-0.10.1.tar.gz.

File metadata

  • Download URL: isqlite-0.10.1.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for isqlite-0.10.1.tar.gz
Algorithm Hash digest
SHA256 1788cbca83231359fb6a05065f5501fa5c961d5cdcb8fdb7d25377526a8f6d7b
MD5 0a9dd9cc10d441ad908eb12fa54e43e7
BLAKE2b-256 5eded896d8cd662ebebe1adc6634f4e378cc48b0f5de9b890e0dc86b04136383

See more details on using hashes here.

File details

Details for the file isqlite-0.10.1-py3-none-any.whl.

File metadata

  • Download URL: isqlite-0.10.1-py3-none-any.whl
  • Upload date:
  • Size: 45.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for isqlite-0.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d47d5ae7f566ea64be784e9a5339edd75b005fb81dfe645084bd27bd45d94f92
MD5 900bf2f16243d260f474370d1cb7ebc7
BLAKE2b-256 20d1ecfbf78d23ecb7af0e2eb25f02ab028a5645ee26a681c08806acce5721e0

See more details on using hashes here.

Supported by

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