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.0.tar.gz (7.2 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.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: amdata-0.1.0.tar.gz
  • Upload date:
  • Size: 7.2 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.0.tar.gz
Algorithm Hash digest
SHA256 b2a751aaf0dad8ec37e05b33d18cc8b06d9e5542005bc8e0d29d1b25fa81b689
MD5 4d9b37b8d6470749a9cfe99805449e7d
BLAKE2b-256 bc5132ce6ef5d2bac6ac6517e544b9c3603667f0a1b1c753a63bae9af6acc4b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: amdata-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 64ab39cd2c57214e20167a871ca8d64b3fef1385f7147bbfa09f0e3fff424d87
MD5 342b86601987ffde774742a07c752b4c
BLAKE2b-256 58e1c578261152ffe01dd823ae453728250439078ae877e64478289133d24c71

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