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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file amdata-0.1.2.tar.gz.
File metadata
- Download URL: amdata-0.1.2.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
932abc6cf568c3e437ed29385eb289ed4307dcbacb0fa8b6c25cf895cc443c6d
|
|
| MD5 |
f68d75f4c0a44eab04ec86eb3b08aa02
|
|
| BLAKE2b-256 |
2598f795575d386a032dd6533a9711eac02f5c4f00eae022545b732ca20dd16c
|
File details
Details for the file amdata-0.1.2-py3-none-any.whl.
File metadata
- Download URL: amdata-0.1.2-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17c4d9372075f16d55cba4776568bf4f9255555c65066298d19093db0bf14800
|
|
| MD5 |
36d6133622a6bccc76928e2eb3b4272e
|
|
| BLAKE2b-256 |
9b5393edb4ec95ca2b9925a4dbd796625aad27e7ed89e7179fbcb105e76b621f
|