Name | hyperdb-py JSON |
Version |
0.1.2
JSON |
| download |
home_page | |
Summary | HyperDB Python Client |
upload_time | 2023-01-14 10:52:43 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.7 |
license | |
keywords |
client
hyperdb
in-memory
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
HyperDB Python Client
=====================
Author: **[Afaan Bilal](https://afaan.dev)**
## Introduction
**HyperDB Python** is a Python client package for the [HyperDB server](https://github.com/AfaanBilal/hyperdb).
## Installation
````
pip install hyperdb-py
````
## Example usage
````py
from hyperdb_py.HyperDB import HyperDB
# Setup with address (default: http:#localhost:8765)
hyperdb = HyperDB("http://localhost:8765")
# OR
# Setup with address and authentication
# hyperdb = new HyperDB("http://localhost:8765", "username", "password")
# Ping the server
r = hyperdb.ping()
print(str(r)) # True
# Get the version number
r = hyperdb.version()
print(str(r)) # "[HyperDB v0.1.0 (https:#afaan.dev)]"
# Set a value
r = hyperdb.set("test", "value")
print(str(r)) # value
# Check if a key is present
r = hyperdb.has("test")
print(str(r)) # True
# Get a value
r = hyperdb.get("test")
print(str(r)) # value
# Get all stored data
r = hyperdb.all()
print(str(r)) # {test: "value"}
# Remove a key
r = hyperdb.delete("test")
print(str(r)) # True
# Delete all stored data
r = hyperdb.clear()
print(str(r)) # True
# Check if the store is empty
r = hyperdb.empty()
print(str(r)) # True
# Persist the store to disk
r = hyperdb.save()
print(str(r)) # True
# Reload the store from disk
r = hyperdb.reload()
print(str(r)) # True
# Delete all store data from memory and disk
r = hyperdb.reset()
print(str(r)) # True
````
## Contributing
All contributions are welcome. Please create an issue first for any feature request
or bug. Then fork the repository, create a branch and make any changes to fix the bug
or add the feature and create a pull request. That's it!
Thanks!
## License
**HyperDB Python** is released under the MIT License.
Check out the full license [here](LICENSE).
Raw data
{
"_id": null,
"home_page": "",
"name": "hyperdb-py",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "client,hyperdb,in-memory",
"author": "",
"author_email": "Afaan Bilal <afaanbilal@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/cf/b1/2fa83330d251a67a80bc1711888e466bfe108c1110a827809f21bab29c94/hyperdb_py-0.1.2.tar.gz",
"platform": null,
"description": "HyperDB Python Client\n=====================\n\nAuthor: **[Afaan Bilal](https://afaan.dev)**\n\n## Introduction\n**HyperDB Python** is a Python client package for the [HyperDB server](https://github.com/AfaanBilal/hyperdb).\n\n## Installation\n````\npip install hyperdb-py\n````\n\n## Example usage\n````py\nfrom hyperdb_py.HyperDB import HyperDB\n\n# Setup with address (default: http:#localhost:8765)\nhyperdb = HyperDB(\"http://localhost:8765\")\n\n# OR\n# Setup with address and authentication\n# hyperdb = new HyperDB(\"http://localhost:8765\", \"username\", \"password\")\n\n# Ping the server\nr = hyperdb.ping()\nprint(str(r)) # True\n\n# Get the version number\nr = hyperdb.version()\nprint(str(r)) # \"[HyperDB v0.1.0 (https:#afaan.dev)]\"\n\n# Set a value\nr = hyperdb.set(\"test\", \"value\")\nprint(str(r)) # value\n\n# Check if a key is present\nr = hyperdb.has(\"test\")\nprint(str(r)) # True\n\n# Get a value\nr = hyperdb.get(\"test\")\nprint(str(r)) # value\n\n# Get all stored data\nr = hyperdb.all()\nprint(str(r)) # {test: \"value\"}\n\n# Remove a key\nr = hyperdb.delete(\"test\")\nprint(str(r)) # True\n\n# Delete all stored data\nr = hyperdb.clear()\nprint(str(r)) # True\n\n# Check if the store is empty\nr = hyperdb.empty()\nprint(str(r)) # True\n\n# Persist the store to disk\nr = hyperdb.save()\nprint(str(r)) # True\n\n# Reload the store from disk\nr = hyperdb.reload()\nprint(str(r)) # True\n\n# Delete all store data from memory and disk\nr = hyperdb.reset()\nprint(str(r)) # True\n````\n\n## Contributing\nAll contributions are welcome. Please create an issue first for any feature request\nor bug. Then fork the repository, create a branch and make any changes to fix the bug\nor add the feature and create a pull request. That's it!\nThanks!\n\n## License\n**HyperDB Python** is released under the MIT License.\nCheck out the full license [here](LICENSE).\n",
"bugtrack_url": null,
"license": "",
"summary": "HyperDB Python Client",
"version": "0.1.2",
"split_keywords": [
"client",
"hyperdb",
"in-memory"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e56ef2396f5ac74c7846aa259cb800251ce6e0357c0e1d7968be4e54d5fc63ca",
"md5": "a497055dc4ba64a5bffcf0114a451d4b",
"sha256": "59be24d10fbb5e2ef557effd50262c0fd6e01c762a6d3dd80682530aea098f40"
},
"downloads": -1,
"filename": "hyperdb_py-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a497055dc4ba64a5bffcf0114a451d4b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 3777,
"upload_time": "2023-01-14T10:52:41",
"upload_time_iso_8601": "2023-01-14T10:52:41.959676Z",
"url": "https://files.pythonhosted.org/packages/e5/6e/f2396f5ac74c7846aa259cb800251ce6e0357c0e1d7968be4e54d5fc63ca/hyperdb_py-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cfb12fa83330d251a67a80bc1711888e466bfe108c1110a827809f21bab29c94",
"md5": "824f5ddd279defad467adbb5e2980234",
"sha256": "d1c913fd15131fc66dbc82d7c5c474cef990845ae3efb19d4f9a1584015e08ac"
},
"downloads": -1,
"filename": "hyperdb_py-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "824f5ddd279defad467adbb5e2980234",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 3292,
"upload_time": "2023-01-14T10:52:43",
"upload_time_iso_8601": "2023-01-14T10:52:43.293239Z",
"url": "https://files.pythonhosted.org/packages/cf/b1/2fa83330d251a67a80bc1711888e466bfe108c1110a827809f21bab29c94/hyperdb_py-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-14 10:52:43",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "hyperdb-py"
}