Skip to main content

A SQLite wrapper that allows for object oriented database access.

Project description

Build Checks Upload Python Package

ConcurrentDatabase

A simple sql wrapper for making a database be object oriented

Installation

pip install ConcurrentDatabase

Database Initialization

from ConcurrentDatabase.Database import Database

db = Database("test.db")

table = db.create_table("example_table", {
    "id": "INTEGER PRIMARY KEY",
    "name": "TEXT",
    "location": "TEXT"
}, primary_keys=["id"])

Inserting Data

table = db.get_table("example_table") 

table.add(name="Jay", location="USA")
table.add(name="John", location="USA")

Updating Data

table = db.get_table("example_table")

row = table.get_row(name="Jay")
row["name"] = "JayFromProgramming"  # Changes are saved in memory until you call row.flush()
row.flush()
# or
row.set(name="JayFromProgramming")  # Flushes immediately

Deleting Data

table = db.get_table("example_table")

row = table.get_row(name="Jay")
row.delete()
# or
table.delete(name="Jay")

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

ConcurrentDatabase-0.0.11.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

ConcurrentDatabase-0.0.11-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file ConcurrentDatabase-0.0.11.tar.gz.

File metadata

  • Download URL: ConcurrentDatabase-0.0.11.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for ConcurrentDatabase-0.0.11.tar.gz
Algorithm Hash digest
SHA256 1e8f0b6682414adb35289c670352bc1593f78e1afd9378cd939b32d0f19b4d44
MD5 1d68a0c1305e7ed8bde5219f433cdc46
BLAKE2b-256 b6a55f82e5c31d4b89640db926e71134084b0d2383004cc43680c7a0a3e8b872

See more details on using hashes here.

File details

Details for the file ConcurrentDatabase-0.0.11-py3-none-any.whl.

File metadata

File hashes

Hashes for ConcurrentDatabase-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 2ca4a8f0317ec1b4c8f87589bb85741a2a01fc674b82b88ba8998908a7cea10a
MD5 20e515afba6efff03bb5c1f54f4e8e34
BLAKE2b-256 2322cbb076a6f6aea25cf9941386652148da29542c688c67cccdbcec3e708dfb

See more details on using hashes here.

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