Skip to main content

A simple and easy-to-use library to manage SQLite databases.

Project description

AMdata

A Simple Tool for SQLite Databases

This library was created by Amjad to simplify common database operations such as creating, inserting, and selecting data. It is designed to be intuitive and easy to use for all programmers.

Note on Contributions: All changes and modifications to this library must be clearly documented in the source code files and a change log. The original creator, Amjad, and the tool's name, AMdata, must be explicitly and clearly mentioned in any derivative work.


Installation

You can install the library easily using pip:

pip install amdata


Usage
1. Connecting to the database and creating a table

from amdata.db import DB

# Connect to a database file named 'my_app.db'
# If the file does not exist, it will be created automatically.
db = DB('my_app.db')

# Create a table named 'users' with two columns: 'username' and 'password'
db.create_table('users', username='TEXT', password='TEXT')

2. Inserting data

# Insert a new user record
db.insert('users', username='amjad', password='1234')

# Note: The check_duplicate method is integrated.
# This will prevent adding a duplicate username.
# db.insert('users', username='amjad', password='5678')


3. Updating and Deleting data

# Update the password for user 'amjad'
db.update('users', "username = 'amjad'", password='5678')

# Delete a user record
db.delete('users', "username = 'amjad'")


4. Retrieving data


# Select all data from the 'users' table
all_users = db.select('users')
print(all_users)

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

amdata-0.1.1.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

amdata-0.1.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file amdata-0.1.1.tar.gz.

File metadata

  • Download URL: amdata-0.1.1.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for amdata-0.1.1.tar.gz
Algorithm Hash digest
SHA256 42069044a98d65b47a565e434b024639333689d3fddf06c982d17688d2fa32f9
MD5 347dba06c76889f078f7b0fbad3de287
BLAKE2b-256 480d9fb3be040024666e77a70ebe09c65fcdaff37a862464cb90e6b3f8a1ac87

See more details on using hashes here.

File details

Details for the file amdata-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: amdata-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for amdata-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cd10a89c4078551622065fe83479c957f8d0dad8786a91ca9c9cafd524e55d20
MD5 a507f26009b9cdf8b82f35c53f68ade0
BLAKE2b-256 18de4b5d05ef35bb6c73032e2938ac0334534483b3c64d806c826ad193a84c40

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