Skip to main content

No project description provided

Project description

nosqueel

Lightweight NoSQL key-value database for simple and practical uses. Uses SQLite as its engine, thereby benefiting from its power, integrity, and practicality.

pip install nosqueel

Usage

from nosqueel import NoSqueel

# initialize the database
db = NoSqueel('db.nosqueel') # or .db, or .anything, you choose

# insert a key-value pair
db.put('key1', 'value1')

# by default the .put method is unique safe, i.e. it raises an error
# if the key already exists. if you don't want that behavior you can
# use replace_if_exists=True.
db.put('key1', 'value1', replace_if_exists=True)

# retrieve a value by key
value = db.get('key1')
print(value)  # output: 'value1'
# note: the get method returns None for non-existing keys

# update a value
db.update('key1', 123)
updated_value = db.get('key1')
print(updated_value)  # output: 123

# delete a key-value pair
db.delete('key1')

# search for keys by value
db.put('key2', 'common_value')
db.put('key3', 'common_value')
keys = db.search('common_value')
print(keys)  # output: ['key2', 'key3']

# retrieve all keys
all_keys = db.keys()
print(all_keys)  # output: ['key2', 'key3']

Nosqueel uses pickle to serialize data (keys and values). This means you are free to use any python type that can be serialized using pickle for both keys and values.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nosqueel-0.1.2.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

nosqueel-0.1.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file nosqueel-0.1.2.tar.gz.

File metadata

  • Download URL: nosqueel-0.1.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.1 Windows/10

File hashes

Hashes for nosqueel-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c4cde0c8623213e659279a5e41cdbe8febc8ffea7852e2899e130e9867085c72
MD5 c191475ef25b3a1959acbecfba854b11
BLAKE2b-256 c77ecfe6c9d6b12ffad5af7438492d9639eb7d0ac4235456e4d0242e3b26ed19

See more details on using hashes here.

File details

Details for the file nosqueel-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: nosqueel-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.1 Windows/10

File hashes

Hashes for nosqueel-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9e032602631cc14c12d5614322bec70ed5eae3b1424c9d72626babbefe5bedfe
MD5 d45d5d881adb1022f1009bdaeb6d3007
BLAKE2b-256 796f26ae0b99957faca53e93fbf35e62e2d4a2d18fa578e28b7f11356d47bede

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page