Name | nosqueel JSON |
Version |
0.1.2
JSON |
| download |
home_page | None |
Summary | None |
upload_time | 2024-07-26 15:27:15 |
maintainer | None |
docs_url | None |
author | renanmoretto |
requires_python | >=3.8 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# nosqueel
Lightweight NoSQL key-value database for simple and practical uses.
Uses SQLite as its engine, thereby benefiting from its power, integrity, and practicality.
```bash
pip install nosqueel
```
# Usage
```python
from nosqueel import NoSqueel
# initialize the database
db = NoSqueel('db.nosqueel') # or .db, or .anything, you choose
```
###
```python
# 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.
Raw data
{
"_id": null,
"home_page": null,
"name": "nosqueel",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": "renanmoretto",
"author_email": "himynameisrenan@outlook.com",
"download_url": "https://files.pythonhosted.org/packages/c7/7e/cfe6c9d6b12ffad5af7438492d9639eb7d0ac4235456e4d0242e3b26ed19/nosqueel-0.1.2.tar.gz",
"platform": null,
"description": "# nosqueel\n\nLightweight NoSQL key-value database for simple and practical uses. \nUses SQLite as its engine, thereby benefiting from its power, integrity, and practicality.\n\n```bash\npip install nosqueel\n```\n\n# Usage\n\n```python\nfrom nosqueel import NoSqueel\n\n# initialize the database\ndb = NoSqueel('db.nosqueel') # or .db, or .anything, you choose\n```\n###\n```python\n# insert a key-value pair\ndb.put('key1', 'value1')\n\n# by default the .put method is unique safe, i.e. it raises an error\n# if the key already exists. if you don't want that behavior you can\n# use replace_if_exists=True.\ndb.put('key1', 'value1', replace_if_exists=True)\n\n# retrieve a value by key\nvalue = db.get('key1')\nprint(value) # output: 'value1'\n# note: the get method returns None for non-existing keys\n\n# update a value\ndb.update('key1', 123)\nupdated_value = db.get('key1')\nprint(updated_value) # output: 123\n\n# delete a key-value pair\ndb.delete('key1')\n\n# search for keys by value\ndb.put('key2', 'common_value')\ndb.put('key3', 'common_value')\nkeys = db.search('common_value')\nprint(keys) # output: ['key2', 'key3']\n\n# retrieve all keys\nall_keys = db.keys()\nprint(all_keys) # output: ['key2', 'key3']\n```\n###\nNosqueel 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.",
"bugtrack_url": null,
"license": null,
"summary": null,
"version": "0.1.2",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "796f26ae0b99957faca53e93fbf35e62e2d4a2d18fa578e28b7f11356d47bede",
"md5": "d45d5d881adb1022f1009bdaeb6d3007",
"sha256": "9e032602631cc14c12d5614322bec70ed5eae3b1424c9d72626babbefe5bedfe"
},
"downloads": -1,
"filename": "nosqueel-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d45d5d881adb1022f1009bdaeb6d3007",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 3539,
"upload_time": "2024-07-26T15:27:14",
"upload_time_iso_8601": "2024-07-26T15:27:14.220528Z",
"url": "https://files.pythonhosted.org/packages/79/6f/26ae0b99957faca53e93fbf35e62e2d4a2d18fa578e28b7f11356d47bede/nosqueel-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c77ecfe6c9d6b12ffad5af7438492d9639eb7d0ac4235456e4d0242e3b26ed19",
"md5": "c191475ef25b3a1959acbecfba854b11",
"sha256": "c4cde0c8623213e659279a5e41cdbe8febc8ffea7852e2899e130e9867085c72"
},
"downloads": -1,
"filename": "nosqueel-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "c191475ef25b3a1959acbecfba854b11",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 3179,
"upload_time": "2024-07-26T15:27:15",
"upload_time_iso_8601": "2024-07-26T15:27:15.319261Z",
"url": "https://files.pythonhosted.org/packages/c7/7e/cfe6c9d6b12ffad5af7438492d9639eb7d0ac4235456e4d0242e3b26ed19/nosqueel-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-26 15:27:15",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "nosqueel"
}