Skip to main content

SonaDB

Sona ("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

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

# PIP
pip install SonaDB

Use

import sonadb

db = sonadb.Database('database.db', type=dict)
# You can specify the type of the object that Pickle will save, by default is a dict.

# 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.append('value', 'key')  # Append a value to a key or the database, None.

# Database
db.population()  # Get the length of Database or Key, Int.
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.

Metadata

Release files for SonaDB 2.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for SonaDB 2.2.2
File Size Uploaded Provenance Actions
SonaDB-2.2.2.tar.gz 3.1 kB Without provenance Details for SonaDB-2.2.2.tar.gz

Release files / SonaDB-2.2.2.tar.gz

Download URL SonaDB-2.2.2.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
af2df11b9e407b54cc230725bf0f744a2f6f980631e15451f300cc2d08129b63
BLAKE2b-256 checksum
How to use checksums
68965e6583ed0346dcb5afc3ca8a61e4c48b70717755ab5f05e2731cf7576f9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Security for SonaDB 2.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page