python-gitdb


Namepython-gitdb JSON
Version 0.0.4 PyPI version JSON
download
home_page
SummarySimple Python module to use git as key-value database.
upload_time2023-12-18 21:17:52
maintainer
docs_urlNone
authorAnsgar Kellner
requires_python>=3.9,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            gitdb
=====

``python-gitdb`` is a small Python module that allows to use a git repository
as key-value-store. The data can be serialized by different Serializers.

Attention! The integration of a remote repository is rudimental, i.e., push and pull
currently only works via soft resets.


Serializers
-----------

There are several serializers provided to store the data:

    * JsonSerializer        (included without further modules)
    * BJsonSerializer
    * YamlSerializer
    * MsgPackSerializer

Depending on the selected serializer, the corresponding module must be
installed.


Setup
-----

::

    poetry install python-gitdb


Usage
-----

::

    from gitdb import GitDb
    from gitdb.serializers.jsonserializer import JsonSerializer

    # git repository that is used as database
    REPO = "/your/path/to/the/repository"

    # prepare the git repository database
    gitdb = GitDb(REPO, serializer=JsonSerializer)

    # add two entries
    gitdb.set("key_a", "test")
    gitdb.set("key_b", {"a": 1, "b": 2})

    # load two entries
    print(gitdb.get("key_a"))
    print(gitdb.get("key_b"))

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "python-gitdb",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Ansgar Kellner",
    "author_email": "keans@gmx.de",
    "download_url": "https://files.pythonhosted.org/packages/58/43/0512eb051702c1e04b7543814499f42772efa3efc9819029106c06946974/python_gitdb-0.0.4.tar.gz",
    "platform": null,
    "description": "gitdb\n=====\n\n``python-gitdb`` is a small Python module that allows to use a git repository\nas key-value-store. The data can be serialized by different Serializers.\n\nAttention! The integration of a remote repository is rudimental, i.e., push and pull\ncurrently only works via soft resets.\n\n\nSerializers\n-----------\n\nThere are several serializers provided to store the data:\n\n    * JsonSerializer        (included without further modules)\n    * BJsonSerializer\n    * YamlSerializer\n    * MsgPackSerializer\n\nDepending on the selected serializer, the corresponding module must be\ninstalled.\n\n\nSetup\n-----\n\n::\n\n    poetry install python-gitdb\n\n\nUsage\n-----\n\n::\n\n    from gitdb import GitDb\n    from gitdb.serializers.jsonserializer import JsonSerializer\n\n    # git repository that is used as database\n    REPO = \"/your/path/to/the/repository\"\n\n    # prepare the git repository database\n    gitdb = GitDb(REPO, serializer=JsonSerializer)\n\n    # add two entries\n    gitdb.set(\"key_a\", \"test\")\n    gitdb.set(\"key_b\", {\"a\": 1, \"b\": 2})\n\n    # load two entries\n    print(gitdb.get(\"key_a\"))\n    print(gitdb.get(\"key_b\"))\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Simple Python module to use git as key-value database.",
    "version": "0.0.4",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "568cf41c18e522c780d118df2ea806f50d8c747fa4f6c17fcabbe34ac1038633",
                "md5": "5d4ebc12390659ba725ddaf4e04abd41",
                "sha256": "db2fc4b028abb325864cea1dd1971dfbfc3a0513f5d308df119d5dbd9a11f956"
            },
            "downloads": -1,
            "filename": "python_gitdb-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5d4ebc12390659ba725ddaf4e04abd41",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 7799,
            "upload_time": "2023-12-18T21:17:50",
            "upload_time_iso_8601": "2023-12-18T21:17:50.491876Z",
            "url": "https://files.pythonhosted.org/packages/56/8c/f41c18e522c780d118df2ea806f50d8c747fa4f6c17fcabbe34ac1038633/python_gitdb-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "58430512eb051702c1e04b7543814499f42772efa3efc9819029106c06946974",
                "md5": "71a3970699e20d9a21c635a959a384b9",
                "sha256": "11b346d638533018239ef94a8bc1b674e4a17865eba5a44dc716c5e450c85222"
            },
            "downloads": -1,
            "filename": "python_gitdb-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "71a3970699e20d9a21c635a959a384b9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 6186,
            "upload_time": "2023-12-18T21:17:52",
            "upload_time_iso_8601": "2023-12-18T21:17:52.086924Z",
            "url": "https://files.pythonhosted.org/packages/58/43/0512eb051702c1e04b7543814499f42772efa3efc9819029106c06946974/python_gitdb-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-18 21:17:52",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "python-gitdb"
}
        
Elapsed time: 0.16708s