Skip to main content

SQLITE3 CM


SQLITE 3 CM is a context manager, 😃 A way TO USE with statement on sqlite databases !! (WITHOUT CLOSING OR OPENING ANYTING 🤩)

Install 📦

pip install sqlite3cm

Docs 📄


from sqlite3cm import OpenSqlite3db

with OpenSqlite3db("database.db", throw_error=True) as (conn, cursor):
    conn.execute('CREATE TABLE IF NOT EXISTS users')

Note:

You shouldn't forget about the parentisis after the as

Arguments


db_path Path to the database (can be Pathlib path) (default to "database.db")

throw_error Weather you want to throw an error or not (default to True)

Note:

None of these arguments are required.

Lightness 🕊


THE SCRIPT IS ONLY 20 LINES LONG 😄 (50 with docstrings and comments)

Features 🧪


At the beggining, the script will connect to the database and create a cursor

At the end, the script will commit, close the connection and cursor

Release files for sqlite3cm 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqlite3cm 0.0.3
File Size Uploaded
sqlite3cm-0.0.3.tar.gz 2.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sqlite3cm 0.0.3
File Interpreter ABI Platform
sqlite3cm-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 5.1 kB

Release files / sqlite3cm-0.0.3.tar.gz

Download URL sqlite3cm-0.0.3.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
fb1f3659e20b2edc810c914f2690cf1d74778511608c590ea2926f49e3486082
BLAKE2b-256 checksum
How to use checksums
509a517098ba1dbd14c7e7fa4f54315e69364eb5aea6ee3893c6805bc0ed3fbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.1

Release files / sqlite3cm-0.0.3-py3-none-any.whl

Download URL sqlite3cm-0.0.3-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f2b0735f5d270aa24172ddaf52a1f7cf037362315d958968d390884e09d28ce
BLAKE2b-256 checksum
How to use checksums
08910a2fb7debc2e350bbbbbcac661a2aec8409f6f6ed78449425fe28785a581
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.1

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page