simpleJDB


NamesimpleJDB JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/Milkman337/simpleJDB/tree/master/simpleJDB
SummaryjsonDB - A Python library for json-based databases with thread-safety, staging/commit and easy-to-use API.
upload_time2023-01-15 17:36:58
maintainer
docs_urlNone
authorJan
requires_python>=3.6
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            simpleJDB
=========

simpleJDB is a lightweight and easy-to-use python database that allows you to store, retrieve, and manipulate data with minimal code.

Features
--------

*   Support for multiple data types: simpleJDB supports storing integers, strings, floats, and lists as values.
*   Concurrency Support: simpleJDB is thread-safe and can handle simultaneous access and modification of data by multiple users.
*   Staging/Commit: simpleJDB has a staging/commit feature that allows you to make changes to the data before committing them to the json file.
*   Documentation: simpleJDB is well-documented and easy to understand, making it easier to get started with the library.
*   Unit testing: simpleJDB has a comprehensive test suite to ensure that the library is working as expected and to catch any bugs before they are released to the public.

Getting Started
---------------

To initialize the database, simply import the simpleJDB module and create a new database object, passing in a name for the database as an argument:

`import simpleJDB db = simpleJDB.database("my_database")`

Adding and Updating Keys
------------------------

To add a new key-value pair to the database, use the setkey() method and pass in the key name and the value to be stored:

`db.setkey("age", 22)`

You can also update the value of an existing key by calling setkey() with the same key name and a new value:

`db.setkey("age", 23)`

When you are ready to commit the changes to the json file, use the commit() method:

`db.commit()`

Retrieving and Deleting Keys
----------------------------

To retrieve the value of a key, use the getkey() method and pass in the key name:

`age = db.getkey("age")`

To delete a key, use the delkey() method and pass in the key name:

`db.delkey("age")`

Key Type
--------

To check the data type of a key, use the gettype() method and pass in the key name:

`data_type = db.gettype("age")`

Conclusion
----------

With simpleJDB, you can easily store and manipulate data in a pythonic way. With the added features, you can do more complex data manipulation and you can use it in a concurrent environment. Give it a try and see how it can simplify your project.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Milkman337/simpleJDB/tree/master/simpleJDB",
    "name": "simpleJDB",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Jan",
    "author_email": "krisellp9@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2b/d0/15112c4a0ac4734c97e3940b25026113f3a8763c7c3dfef1573e5cdfb5d0/simpleJDB-0.1.3.tar.gz",
    "platform": null,
    "description": "simpleJDB\r\n=========\r\n\r\nsimpleJDB is a lightweight and easy-to-use python database that allows you to store, retrieve, and manipulate data with minimal code.\r\n\r\nFeatures\r\n--------\r\n\r\n*   Support for multiple data types: simpleJDB supports storing integers, strings, floats, and lists as values.\r\n*   Concurrency Support: simpleJDB is thread-safe and can handle simultaneous access and modification of data by multiple users.\r\n*   Staging/Commit: simpleJDB has a staging/commit feature that allows you to make changes to the data before committing them to the json file.\r\n*   Documentation: simpleJDB is well-documented and easy to understand, making it easier to get started with the library.\r\n*   Unit testing: simpleJDB has a comprehensive test suite to ensure that the library is working as expected and to catch any bugs before they are released to the public.\r\n\r\nGetting Started\r\n---------------\r\n\r\nTo initialize the database, simply import the simpleJDB module and create a new database object, passing in a name for the database as an argument:\r\n\r\n`import simpleJDB db = simpleJDB.database(\"my_database\")`\r\n\r\nAdding and Updating Keys\r\n------------------------\r\n\r\nTo add a new key-value pair to the database, use the setkey() method and pass in the key name and the value to be stored:\r\n\r\n`db.setkey(\"age\", 22)`\r\n\r\nYou can also update the value of an existing key by calling setkey() with the same key name and a new value:\r\n\r\n`db.setkey(\"age\", 23)`\r\n\r\nWhen you are ready to commit the changes to the json file, use the commit() method:\r\n\r\n`db.commit()`\r\n\r\nRetrieving and Deleting Keys\r\n----------------------------\r\n\r\nTo retrieve the value of a key, use the getkey() method and pass in the key name:\r\n\r\n`age = db.getkey(\"age\")`\r\n\r\nTo delete a key, use the delkey() method and pass in the key name:\r\n\r\n`db.delkey(\"age\")`\r\n\r\nKey Type\r\n--------\r\n\r\nTo check the data type of a key, use the gettype() method and pass in the key name:\r\n\r\n`data_type = db.gettype(\"age\")`\r\n\r\nConclusion\r\n----------\r\n\r\nWith simpleJDB, you can easily store and manipulate data in a pythonic way. With the added features, you can do more complex data manipulation and you can use it in a concurrent environment. Give it a try and see how it can simplify your project.\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "jsonDB - A Python library for json-based databases with thread-safety, staging/commit and easy-to-use API.",
    "version": "0.1.3",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e4cacd26068afad15cb4d2c15afab9d01a36c4d570e0c6fc7d142ff300862799",
                "md5": "eb2927fe6753c09d8083f323651dd147",
                "sha256": "20f56b649d583592347d4edc7b218464bfad0d1f3728afb1a1f4de10d29c1962"
            },
            "downloads": -1,
            "filename": "simpleJDB-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eb2927fe6753c09d8083f323651dd147",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 4173,
            "upload_time": "2023-01-15T17:36:57",
            "upload_time_iso_8601": "2023-01-15T17:36:57.150321Z",
            "url": "https://files.pythonhosted.org/packages/e4/ca/cd26068afad15cb4d2c15afab9d01a36c4d570e0c6fc7d142ff300862799/simpleJDB-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2bd015112c4a0ac4734c97e3940b25026113f3a8763c7c3dfef1573e5cdfb5d0",
                "md5": "5ea22826f5e0398a23874ca7ac0e72be",
                "sha256": "5cf932fbfb2119c8fec2b1006bec189a2440d85170282ec2687d9542dda7bbf5"
            },
            "downloads": -1,
            "filename": "simpleJDB-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "5ea22826f5e0398a23874ca7ac0e72be",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 3858,
            "upload_time": "2023-01-15T17:36:58",
            "upload_time_iso_8601": "2023-01-15T17:36:58.605242Z",
            "url": "https://files.pythonhosted.org/packages/2b/d0/15112c4a0ac4734c97e3940b25026113f3a8763c7c3dfef1573e5cdfb5d0/simpleJDB-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-15 17:36:58",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "simplejdb"
}
        
Jan
Elapsed time: 0.07561s