README
######
**NAME**
|
| ``op`` - object programming
|
**SYNOPSIS**
The ``op`` package provides an Object class, that allows for save/load to/from
json files on disk. Objects can be searched with database functions and uses
read-only files to improve persistence and a type in filename for
reconstruction. Methods are factored out into functions to have a clean
namespace to read JSON data into.
``op`` stores it's data on disk where objects are time versioned and the
last version saved on disk is served to the user layer. Files are JSON dumps
that are read-only so thus should provide (disk) persistence. Paths carry the
type in the path name what makes reconstruction from filename easier then
reading type from the object.
|
**INSTALL**
|
| ``python3 -m pip install objectprogramming``
|
**PROGRAMMING**
basic usage is this::
>>> import op
>>> o = op.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.
load/save from/to disk::
>>> from op import Object, load, save
>>> o = Object()
>>> o.key = "value"
>>> p = save(o)
>>> obj = Object()
>>> load(obj, p)
>>> obj.key
>>> 'value'
great for giving objects peristence by having their state stored in files::
>>> from op import Object, save
>>> o = Object()
>>> save(o)
'op.objects.Object/2021-08-31/15:31:05.717063'
|
**AUTHOR**
|
| Bart Thate - operbot100@gmail.com
|
**COPYRIGHT**
|
| ``op`` is placed in the Public Domain. No Copyright, No License.
|
Raw data
{
"_id": null,
"home_page": "http://github.com/operbot/objectprogramming",
"name": "objectprogramming",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Bart Thate",
"author_email": "operbot100@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/bc/74/5eb59d963065db7940b5aaf25d09bdea682e8172fb9e8d0da662793fc1af/objectprogramming-105.tar.gz",
"platform": null,
"description": "README\n######\n\n**NAME**\n\n|\n| ``op`` - object programming\n|\n\n**SYNOPSIS**\n\n\nThe ``op`` package provides an Object class, that allows for save/load to/from\njson files on disk. Objects can be searched with database functions and uses\nread-only files to improve persistence and a type in filename for\nreconstruction. Methods are factored out into functions to have a clean\nnamespace to read JSON data into.\n\n``op`` stores it's data on disk where objects are time versioned and the\nlast version saved on disk is served to the user layer. Files are JSON dumps\nthat are read-only so thus should provide (disk) persistence. Paths carry the\ntype in the path name what makes reconstruction from filename easier then\nreading type from the object.\n\n|\n\n**INSTALL**\n\n|\n| ``python3 -m pip install objectprogramming``\n|\n\n**PROGRAMMING**\n\nbasic usage is this::\n\n >>> import op\n >>> o = op.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\nload/save from/to disk::\n\n >>> from op import Object, load, save\n >>> o = Object()\n >>> o.key = \"value\"\n >>> p = save(o)\n >>> obj = Object()\n >>> load(obj, p)\n >>> obj.key\n >>> 'value'\n\ngreat for giving objects peristence by having their state stored in files::\n\n >>> from op import Object, save\n >>> o = Object()\n >>> save(o)\n 'op.objects.Object/2021-08-31/15:31:05.717063'\n\n|\n\n**AUTHOR**\n\n|\n| Bart Thate - operbot100@gmail.com\n|\n\n**COPYRIGHT**\n\n|\n| ``op`` is placed in the Public Domain. No Copyright, No License.\n|\n\n\n",
"bugtrack_url": null,
"license": "Public Domain",
"summary": "functional programming with objects",
"version": "105",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "6e15802b757be6ff44eec4019aeb2cfc",
"sha256": "4b9ccd7a4fe924dbec3ccb99c746e908b362cc1aa3061f1c079fa936e5725aaf"
},
"downloads": -1,
"filename": "objectprogramming-105-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6e15802b757be6ff44eec4019aeb2cfc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 25268,
"upload_time": "2022-12-29T13:52:33",
"upload_time_iso_8601": "2022-12-29T13:52:33.448707Z",
"url": "https://files.pythonhosted.org/packages/1b/fc/eca2a697b9cc4c1cef35335ffb6e0161c310b428a00fe2f39c1002b8986c/objectprogramming-105-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "b529a140dfd40f2b36190973a3d8ca81",
"sha256": "f9b7d352009af7b16d7e66ec30d3f72f44d96748d2462e606fe35c9d390ca9c6"
},
"downloads": -1,
"filename": "objectprogramming-105.tar.gz",
"has_sig": false,
"md5_digest": "b529a140dfd40f2b36190973a3d8ca81",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 23131,
"upload_time": "2022-12-29T13:52:35",
"upload_time_iso_8601": "2022-12-29T13:52:35.422295Z",
"url": "https://files.pythonhosted.org/packages/bc/74/5eb59d963065db7940b5aaf25d09bdea682e8172fb9e8d0da662793fc1af/objectprogramming-105.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-29 13:52:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "operbot",
"github_project": "objectprogramming",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "objectprogramming"
}