rapid database build using csv
Project description
""" project is provides a fast way to make simple insecure database for any startups
only uses csv inbuilt module , so no external dependacies
code usage ->
''' from mydb import *
Create a CSVDatabase object for a file named 'inventory.csv'
inventory_db = mydb('inventory.csv')
Sample data (assuming the CSV file has headers like 'name', 'price', 'quantity')
new_item = ['Laptop', 599.99, 3]
Insert the new item
inventory_db.insert(new_item) print("Item inserted successfully!")
Update the price of the first item (assuming the data is loaded)
inventory_db.update(0, ['Headphones', 79.95, 10]) # Assuming the first row is headphones print("Item price updated!")
Delete the third item (assuming the data is loaded)
inventory_db.delete(2) print("Item deleted!")
Find items with 'price' greater than 100
expensive_items = inventory_db.find(search_term=None, column_index=1) # Search price column print("Expensive items:") for item in expensive_items: print(item)
Get the second row (assuming the data is loaded)
second_item = inventory_db.get_row(1) if second_item: print("Second item:", second_item) else: print("Invalid row index.")
'''
"""
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 coolcsv-0.0.1.tar.gz.
File metadata
- Download URL: coolcsv-0.0.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b352d2fc798bbf4d5720b982b4bc82ce335f441c4f75bf525f908622e7b36d7
|
|
| MD5 |
321cbb4b2719a3dc9b3283f0eb273e54
|
|
| BLAKE2b-256 |
a5d8fe58d46c62c8c51d948abe65d192eb6a38ad3e225c9ddddb27bde6088811
|
File details
Details for the file coolcsv-0.0.1-py3-none-any.whl.
File metadata
- Download URL: coolcsv-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c4e590605e817b18d40d2abdee4eea577a594938c27f5c87b08e6fc995986df
|
|
| MD5 |
1e3af39913fa6dc4b1c9448a2fa80ff5
|
|
| BLAKE2b-256 |
26200d4a0ca0afbd4329e67f79bc6fd5aad729030d761a9035c6fc605d7a862b
|