SonaDB is a small library to make Key-Value databases.

Overview

SonaDB

SonaDB ("Information" in Toki Pona) is a small library for Key-Value databases.
It can load binary files as Dictionaries, consumes little space on disk.

Install

pip install git+https://github.com/ZSendokame/SonaDB.git

Use

import sona

db = sona.Database(open('database.db', 'rb'))

# Keys:
db.set('key', 'value', algo='md5')  # Create a new key and hash if algorithm defined, None.
db.get('key')  # Get a key, Any.
db.remove('key')  # Remove a key, None.
db.exists('key')  # Check if a key exists, Bool.
db.rename('key', 'new_name')  # Rename a key, None.
db.population()  # Get the length of Database or Key, Int.

# Database
db.clear()  # Delete all the Database on memory.
db.dump()  # Saves all the memory to a file.
db.query(lambda key, value: expression)
# Iterate over the Database, giving key-value to the lambda and checking for True.
You might also like...

These are some fun and small projects one can make while using the Python Language.

Beginners-Projects These are some fun and small projects one can make while using the Python Language. A Random Number Guesser game Rock Paper Scissor

Jul 17, 2022

SAM project to combine small daily log files into larger daily log files, to make it possible to store them in Glacier without extra overhead and avoiding prohibitive costs. AWS Control Tower is required.

SAM project to combine small daily log files into larger daily log files,  to make it possible to store them in Glacier without extra overhead and avoiding prohibitive costs. AWS Control Tower is required.

control-tower-log-aggregator SAM project to combine small daily log files into larger daily log files, to make it possible to store them in Glacier wi

Oct 6, 2022

Generates combinations of 3D Models, batch scripts, and collection databases for use in 3DS Max

JB's 3DS Max Item Generator Summary This application is meant to be used as logistical support tool when creating a large collection of varied 3D obje

Aug 24, 2022

A CLI tool for extracting event logs out of MIMIC Databases.

mimic-log-extraction A CLI tool for extracting event logs out of MIMIC Databases. requires python 3.8.10 (newer versions might be fine, though) using

Jun 1, 2022

ScammerSlayer is a python project that populates the databases of credit scammers and phishing attacks with bogus data with the intention of crashing it.

ScammerSlayer Have you ever received texts from unknown numbers or emails where there is a link that asks for your credit numbers? Some have a story t

Jun 11, 2022

This script can pick up a password from user's databases to WiFi networks.

This script can pick up a password from user's databases to WiFi networks.

This tool is only for educational purpose FOR TUTORIAL CLICK HERE WiFiBruteforce This script can pick up a password from user's databases to WiFi netw

Nov 20, 2022

Take lightning fast snapshots of your local Postgres databases.

Take lightning fast snapshots of your local Postgres databases.

Database Snapshot, List, and Restore Take lightning fast snapshots of your local Postgres databases. What is this? DSLR is a tool that allows you to q

Nov 17, 2022

This project utilizes AWS databases, SQL and Python to store user passwords encrypted with SHA-256 hashing

AWS-Encrypted-Password-Manager This project utilizes Amazon Web Services databases, SQL and Python to store user passwords encrypted with SHA-256 hash

Aug 2, 2022

This application provides the ability to export data from Quickbooks Desktop into various formats and databases.

QBSync by Azorian Solutions This application provides the ability to export data from Quickbooks Desktop into various formats and databases. At this t

Aug 28, 2022
Owner
ZSendokame
Hey I'm Sendokame, from Chile!
ZSendokame
A script to cover value with same key from source.json to target.json

JSON键值覆盖器 (自动抄值脚本) 用于把 source.json 的值覆盖到 target.json 的同名键上,非同名键所对应的值不进行操作。 人话翻译:这脚本帮你把source.json里面的键值对,拿去target.json里面搜一下看看能不能找到同名的键名,找到了就把source.jso

null 6 Sep 3, 2022
Simple and fast implementation of a static on disk key value store, in python

static_ondisk_kv Simple and fast implementation of a static on disk kv, in python Why this lib? leveldb, rocksdb and lmdb all have issues for a static

Romain Beaumont 6 Jun 22, 2022
Ethereum Address Wallet Generated With Private Key From Mnemonic and check Value (Balance , transaction) Without API

Ethereum Mnemonic Crack Ethereum Address Wallet Generated With Private Key From Mnemonic and check Value (Balance , transaction) Without API MneEthOn_

MMDRZA 26 Nov 1, 2022
Lightweight In Memory Key Value Database For Python 3+

Rabbit 401 Lightweight In Memory Key Value Database For Python 3+ How to use? Install package from PyPi using pip command in terminal: pip install rab

AmyyazdaN 1 Jun 14, 2022
Implementation of Discrete Key / Value Bottleneck, in Pytorch

Discrete Key / Value Bottleneck - Pytorch Implementation of Discrete Key / Value Bottleneck, in Pytorch. Install $ pip install discrete-key-value-bott

Phil Wang 62 Nov 21, 2022
A simple, persistent key/value cache with no dependencies.

pepper-cache A simple, persistent key/value cache with no dependencies. Installation $ pip install pepper-cache API create_cache - Creates a Cache ins

depthbomb 1 Aug 26, 2022
Simple persistent key-value store for python backed by a sqlite database

Sqlite Key Value Store This is a simple key value store backed by sqlite. It is intended for cases where you need to persistently store small amounts

Rhet Turnbull 3 Sep 26, 2022
A simple key/value store built on Prefect

prefect-kv Welcome! A simple key-value store for use with Prefect. Getting Started Python setup Requires an installation of Python 3.7+. We recommend

Michael Adkins 16 Nov 8, 2022
Sprite animation of a frog attacking with its tongue. Press a key to make it happen. (Assets are not mine)

It's an attack frog! Press any key on your keyboard to make it attack with its tongue. ---- ---- Tutorial on making this program provided by "Clear

Zachary Hoppock 1 Aug 5, 2022
Hoppr Cop is a cli and python library that generates high quality vulnerability information from a cyclone-dx Software Bill of Materials (SBOM) by aggregating data from multiple vulnerability databases

Hoppr Cop is a cli and python library that generates high quality vulnerability information from a cyclone-dx Software Bill of Materials (SBOM) by aggregating data from multiple vulnerability databases. This project is offered as part of the hoppr ecosystem, however it is fully functional as a standalone cli or python library.

Lockheed Martin 3 Nov 8, 2022