
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
libdb
Advanced tools
Easy Management and Creation of Database Based on JSON Format with High Speed and Optimized
Easy Management and Creation of Database Based on JSON Format with High Speed and Optimized.
pip in Windows:pip install libdb
pip3 in Linux:# if not installed pip3
sudo apt-get update&&sudo apt-get install python3-pip
# Install With pip3 command
pip3 install libdb
git clone https://github.com/libdb/libdb
cd libdb
Windows (python)
# Install Libdb in windows
python install.py
# Just upgrade libdb in windows
python install.py upgrade
Linux (python3)
# Install Libdb in Linux
python3 install.py
# Just upgrade libdb in Linux
python3 install.py upgrade
Here are some examples to demonstrate how to use the LibDB package.
from libdb import JSONDatabase
# Initialize the database
db = JSONDatabase('mydb.json')
db.create('name', 'Alice')
print(db.read('name')) # Output: Alice
items = {
'name': 'Alice',
'age': 30,
'city': 'Wonderland'
}
db.bulk_create(items)
print(db.read('age')) # Output: 30
print(db.read('city')) # Output: Wonderland
db.update('name', 'Bob')
print(db.read('name')) # Output: Bob
db.delete('name')
print(db.read('name')) # Output: None
list_keys = db.list_keys()
print(list_keys) # Output: ['age', 'city']
db.clear()
print(db.list_keys()) # Output: []
users = {
'user1': {'name': 'Alice', 'age': 30},
'user2': {'name': 'Bob', 'age': 25},
'user3': {'name': 'Charlie', 'age': 30}
}
db.bulk_create(users)
result = db.search('age', 30)
print(result) # Output: {'user1': {'name': 'Alice', 'age': 30}, 'user3': {'name': 'Charlie', 'age': 30}}
You can run the tests to ensure everything is working correctly:
python -m unittest discover tests
FAQs
Easy Management and Creation of Database Based on JSON Format with High Speed and Optimized
We found that libdb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.