Skip to content
This repository was archived by the owner on Oct 21, 2024. It is now read-only.

Latest commit

 

History

History
29 lines (24 loc) · 538 Bytes

File metadata and controls

29 lines (24 loc) · 538 Bytes

What is it?

Module with basic functionality to work with SQLite3.

Installation

pip install --upgrade sqlite3w

Example

import sqlite3worker

db = sqlite3worker.SQLite3Worker("main.sqlite3") # "FILEPATH" | ":memory:"

db.create_table(
    "users",
    {
        "id": (int, True), # "id": (int, True) -> "COLON_NAME": (PYTHON_TYPE, IS_PRIMARY_KEY)
        "nick": (str, False),
        "desc": (str, False),
        "birthday": (float, False)
    }
)

db.add_data(
    "users",
    [0, "Roman", "...", 1]
)