Skip to main content

Sqlite3 Wrapper Class

Project description

Wrapper Class around Sqlite3

In Sqlite3 after connecting to the database, for every read execute statement the data needs to be fetched and for evey write execute statement the data needs to be committed. But this class eliminates these requirements and make it simple to read and write to the database.

Files:

palsql/__init__.py

Usage Examples:

import sqlite3

db = palsql.db(“db-filename”) ##-connect to the database

db.read(“sql statement”) ##-returns the read data from database with flat=True

db.read(“select item from table”, flat=False) ##-returns the raw read data

db.read(f”select item from table where item = {Variable}”) ##-read with string substitution

db.read1(“sql statement”) ##-returns the first read data similar to fetchone

db.write(“sql statement”) ##-writes the data and commits to the database

For other psycopg connection commands use the connection class

db.conn….

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

palsql-1.6.tar.gz (1.6 kB view details)

Uploaded Source

File details

Details for the file palsql-1.6.tar.gz.

File metadata

  • Download URL: palsql-1.6.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for palsql-1.6.tar.gz
Algorithm Hash digest
SHA256 3f07f5183562ca1489633ffa9d353dd9543df3eedda8f803f664d2ab04ba1ad0
MD5 89a5574baeab37727b6487849ae7f54f
BLAKE2b-256 8fbd7e34d69b063e3bd2c1faaf24fc1745ed14e94444247f7ef5402d461b443a

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