Skip to main content

Module sqlite3py provides you very easy smart requests for sqlite database by Xpos587

Project description

sqlite3py

Module sqlite3py provides you very easy smart requests for sqlite database.

Read on GitHub
Examples folder

Methods:

  • set (Update (Set) values for selected row.)
  • insert (Insert (Push) row.)
  • all (Return all values.)
  • get (Return values from selected row.)
  • delete (Delete selected row.)

Example

'''After sqlite3py Version 2.0.0'''

from sqlite3py import Database

# Create database 
database = Database('./storage.db', check_same_thread = False)

# Create table
files = database.table('files')

# Set values
files.set('Documentation', {
    'title': 'Documentation',
    'description': 'Some description',
    'type': 'pdf',
    'uuid': 'a8098c1a-f86e-11da-bd1a-00112444be1e',
})

# Get values
files.get('Documentation')[0]['description']
# Return: 'Some description'

# Get all values
files.all()
# Return: [{'key': 'Documentation', 'value': {
#   'title': 'Documentation',
#   'description': 'Some description',
#   'type': 'pdf',
#   'uuid': 'a8098c1a-f86e-11da-bd1a-00112444be1e',
# }}]

Requirements Packages

  • sqlite3 (Already set by default)

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

sqlite3py-2.0.5.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file sqlite3py-2.0.5.tar.gz.

File metadata

  • Download URL: sqlite3py-2.0.5.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for sqlite3py-2.0.5.tar.gz
Algorithm Hash digest
SHA256 a4e4ea19907a2f35f06bdca0eb95111f829dca7732e2f8e6740918d91c1bf5b8
MD5 23334ae23f94203deec4760e26328d6a
BLAKE2b-256 1856dd3adc13b6d11f206d7eb17c53b5e289d167d24406fd87ca0165c6cfedeb

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