opq


Nameopq JSON
Version 15 PyPI version JSON
download
home_pagehttp://github.com/operbot/opq
Summaryfunctional programming with objects
upload_time2023-04-07 11:37:25
maintainer
docs_urlNone
authorBart Thate
requires_python
licensePublic Domain
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            README
######

**NAME**

|
| ``opq`` - object programming quest
|

**SYNOPSIS**


The ``opq`` package provides an Object class, that allows for save/load to/from
json files on disk. Objects can be searched with database functions and have a 
type in filename for reconstruction. Methods are factored out into functions to
have a clean namespace to read JSON data into.

This is the quest for object programming (OP), the OOP without the oriented.

|

**INSTALL**

|
| ``python3 -m pip install opq --upgrade --force-reinstall``
|

**PROGRAMMING**

basic usage is this::

 >>> import opq
 >>> o = opq.Object()
 >>> o.key = "value"
 >>> o.key
 'value'

Objects try to mimic a dictionary while trying to be an object with normal
attribute access as well. hidden methods are provided, the methods are
factored out into functions like get, items, keys, register, set, update
and values.

read/write from/to disk::

 >>> from opq import Object, read, write
 >>> o = Object()
 >>> o.key = "value"
 >>> p = write(o)
 >>> obj = Object()
 >>> read(obj, p)
 >>> obj.key
 'value'

great for giving objects peristence by having their state stored in files::

 >>> from opq import Object, write
 >>> o = Object()
 >>> write(o)  # doctest: +ELLIPSIS
 'opq.objects.Object/...'

|

**AUTHOR**

|
| B.H.J. Thate <operbot100@gmail.com>
|

**COPYRIGHT**

|
| ``opq`` is placed in the Public Domain.
|



            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/operbot/opq",
    "name": "opq",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Bart Thate",
    "author_email": "operbot100@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/09/72/711dc4dfd41d172fe4559c1239aab1fb806df0416c06940a65c95c87c48f/opq-15.tar.gz",
    "platform": null,
    "description": "README\n######\n\n**NAME**\n\n|\n| ``opq`` - object programming quest\n|\n\n**SYNOPSIS**\n\n\nThe ``opq`` package provides an Object class, that allows for save/load to/from\njson files on disk. Objects can be searched with database functions and have a \ntype in filename for reconstruction. Methods are factored out into functions to\nhave a clean namespace to read JSON data into.\n\nThis is the quest for object programming (OP), the OOP without the oriented.\n\n|\n\n**INSTALL**\n\n|\n| ``python3 -m pip install opq --upgrade --force-reinstall``\n|\n\n**PROGRAMMING**\n\nbasic usage is this::\n\n >>> import opq\n >>> o = opq.Object()\n >>> o.key = \"value\"\n >>> o.key\n 'value'\n\nObjects try to mimic a dictionary while trying to be an object with normal\nattribute access as well. hidden methods are provided, the methods are\nfactored out into functions like get, items, keys, register, set, update\nand values.\n\nread/write from/to disk::\n\n >>> from opq import Object, read, write\n >>> o = Object()\n >>> o.key = \"value\"\n >>> p = write(o)\n >>> obj = Object()\n >>> read(obj, p)\n >>> obj.key\n 'value'\n\ngreat for giving objects peristence by having their state stored in files::\n\n >>> from opq import Object, write\n >>> o = Object()\n >>> write(o)  # doctest: +ELLIPSIS\n 'opq.objects.Object/...'\n\n|\n\n**AUTHOR**\n\n|\n| B.H.J. Thate <operbot100@gmail.com>\n|\n\n**COPYRIGHT**\n\n|\n| ``opq`` is placed in the Public Domain.\n|\n\n\n",
    "bugtrack_url": null,
    "license": "Public Domain",
    "summary": "functional programming with objects",
    "version": "15",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ca4b5275cdef614ef6c298564c65249c1468ff07557595f4d763796831923246",
                "md5": "3b17a7fa1d64276a87e0cea3d009a58d",
                "sha256": "158cd0530ff8f1db8a174c4183fa63473e99d05e27013b959427747830dd6659"
            },
            "downloads": -1,
            "filename": "opq-15-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3b17a7fa1d64276a87e0cea3d009a58d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 22955,
            "upload_time": "2023-04-07T11:37:23",
            "upload_time_iso_8601": "2023-04-07T11:37:23.051530Z",
            "url": "https://files.pythonhosted.org/packages/ca/4b/5275cdef614ef6c298564c65249c1468ff07557595f4d763796831923246/opq-15-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0972711dc4dfd41d172fe4559c1239aab1fb806df0416c06940a65c95c87c48f",
                "md5": "cdf250a9f797764b90127f226007214a",
                "sha256": "a11bac746e68b52755cf471b2ed009d98c7559cf58e0881aa2db6e39e44201fc"
            },
            "downloads": -1,
            "filename": "opq-15.tar.gz",
            "has_sig": false,
            "md5_digest": "cdf250a9f797764b90127f226007214a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 29537,
            "upload_time": "2023-04-07T11:37:25",
            "upload_time_iso_8601": "2023-04-07T11:37:25.282072Z",
            "url": "https://files.pythonhosted.org/packages/09/72/711dc4dfd41d172fe4559c1239aab1fb806df0416c06940a65c95c87c48f/opq-15.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-07 11:37:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "operbot",
    "github_project": "opq",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "opq"
}
        
Elapsed time: 0.16724s