{
"info": {
"author": "peter1000",
"author_email": "https://github.com/peter1000",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 3 - Alpha",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries :: Python Modules"
],
"description": ".. _LongDescription:\n\n******************\nReOBJ: Description\n******************\n\n.. rubric:: ReOBJ:\n.. rubric:: R(estricted) E(xtended) Objects. Simple, reasonable fast, restricted/extended python objects.\n\n.. contents::\n :depth: 3\n\n\nHTML Documentation\n==================\n\nHTML documentation of the project is hosted at: `ReOBJ-HTML documentation `_\n\nOr `Package Documentation `_\n\n\nMain Info\n=========\n\n**ReOBJ** contains different restricted/extended python objects.\n\n- **ReDICTs**: Simple, reasonable fast, restricted/extended python dictionary objects.\n\n- **ReLISTs**: Simple, reasonable fast, restricted/extended list objects.\n\n- **ReTUPLEs**: Simple, reasonable fast, restricted/extended tuple objects.\n\n- **ReMATRIXs**: Simple, reasonable fast, restricted/extended list-of-tuples objects.\n\n\n**All `ReBASE classes - subclasses`**:\n\n .. warning:: for all `ReBASE classes` disabled methods\n\n - any class.copy()\n\n - e.g.: xy = myrlist.copy()\n\n - any class.clear()\n\n - e.g.: myrlist.clear()\n\n - any __setattr__()\n - any __delattr__()\n - any __add__()\n\n - can be dumped with json: but will lose any extra data like: `key_order (list)` or/and any `extra_data dict`\n - can be pickled\n\n - additional methods:\n\n - set_extra_data(), update_extra_data(), replace_extra_data(): Sets/updates key/value to the additional dictionary: `extra_data`\n\n - copy_recursively(): recursively copy: Supports recursively intermediate ReDICT, ReLIST, ReTUPLE, dicts, lists and tuples (and their subclasses: depending on there implementation though)\n\n - this will also copy any ReDICT / ReLIST / ReTUPLE / ReMATRIX `extra_data dict` and any `key_order (list)` and any `extra_key_order (list)`\n\n - copy_recursively_to_python_native_types(): recursively copy: changing all `ReOBJ` to native python types.\n\n - `RdictIO, RdictFO, RdictFO2: to python `OrderedDict obj` keeping their order (see also argument: use_extra_key_order)\n\n - all other ReDICT: objects will be replaced by normal python `dict objs`\n - all `ReLIST obj` will be replaced by normal python `list objs`\n - all `ReTUPLE obj` will be replaced by normal python `tuple objs`\n - all `ReMATRIX obj` will be replaced by normal python `list of tuple objs`\n\n .. warning:: ReMATRIX tuple items (rows) are not recursively copied so there should be no dict, list ect.. just basic types\n\n Supports recursively intermediate ReDICT, ReLIST, ReTUPLE, dicts, lists and tuples (and their subclasses: depending on there implementation though)\n\n .. note:: any ReOBJ set: `extra_data` will be lost\n\n - topickle(): returns a new pickled dumps byte string from the obj\n\n - tojson(): returns a new json dumps string from the obj\n\n - tojson_keeporder(): returns a new json dumps string from the obj keeping the order of any `RdictIO, RdictFO, RdictFO2`\n\n - this uses first the: copy_recursively_to_python_native_types()\n\n.. warning:: comparisons do not take into consideration any `key_order (list)` or `extra_data dict`\n\n\nReDICT\n------\n\nOverview Differences\n++++++++++++++++++++\n\n- `Edict` is similar to a normal python dict but has some additional (extended) features\n- `Rdict` and `RdictIO`: **can add** new items after creation/initialization\n- `RdictF` and `RdictFO`, `RdictFO2`: F(ix) **can not add** new items after creation/initialization\n\n- `Rdict` and `RdictF`: **do not have** any `key_order (list)` nor any `extra_key_order (list)`\n- `RdictIO` and `RdictFO`, `RdictFO2`: O(rder) **do have** a `key_order (list)` plus an `extra_key_order (list)`\n\n - `RdictIO`: I(nsertion) O(rder): keeps track of the order new keys where added\n - `RdictFO`, `RdictFO2`: F(ix) O(rder): keeps track of the order of the keys when it was created/initialized\n\n - all three have the `extra_key_order (list)`:\n - this is a list which can be optionally set with a user defined key order (can also include just a subset of keys)\n\n - all three can be converted to OrderedDict: keeping their `key_order` or optionally the `extra_key_order`\n\n - example usage to print an ordered json using the method: tojson_keeporder()\n\n .. code-block:: python\n\n example_rdictordered = RdictFO([\n ('key1', 'value1'),\n ('key2', 'value2'),\n ('key3', RdictIO([\n ('inner_key1', 'innervalue1'),\n ('inner_key2', 'innervalue2'),\n ], False)),\n ], False)\n\n json_dumps = example_rdictordered.tojson_keeporder(indent=3)\n print(json_dumps)\n\n Output will be:\n\n .. code-block:: json\n\n {\n \"key1\": \"value1\",\n \"key2\": \"value2\",\n \"key3\": {\n \"inner_key1\": \"innervalue1\",\n \"inner_key2\": \"innervalue2\"\n }\n }\n\n\n - `RdictFO` vs. `RdictFO2`: RdictFO can change the values. RdictFO2 can after creation not change the values\n\n\nReLIST\n------\n\n- `Elist` is similar to a normal python list but has some additional (extended) features\n- `Rlist`: **can add** new items after creation/initialization\n- `RlistF`: F(ix) **can not add** new items after creation/initialization\n\n\nReTUPLE\n-------\n\n- `Etuple` is similar to a normal python tuple but has some additional (extended) features\n\n\nReMATRIX\n--------\n\n- `Lmatrix` is a List-Of-Tuples with some additional (extended) features\n- `LmatrixF`: F(ix) **can not add** new items (tuple-rows) after creation/initialization\n\n\nCode Examples\n=============\n\nfor code examples see the files in 'development source` folders: Examples, Tests, SpeedCheck\n\n\nProjects using ReOBJ\n====================\n\n`projects` which make use of: **ReOBJ**\n\n\n|\n|\n\n`ReOBJ` is distributed under the terms of the BSD 3-clause license.\nConsult LICENSE.rst or http://opensource.org/licenses/BSD-3-Clause.\n\n(c) 2014, `peter1000` https://github.com/peter1000\nAll rights reserved.\n\n|\n|",
"description_content_type": null,
"docs_url": "https://pythonhosted.org/ReOBJ/",
"download_url": "UNKNOWN",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/peter1000/",
"keywords": "python dictionary mapping hash table list matrix",
"license": "BSD-3-Clause",
"maintainer": null,
"maintainer_email": null,
"name": "ReOBJ",
"package_url": "https://pypi.org/project/ReOBJ/",
"platform": "Linux",
"project_url": "https://pypi.org/project/ReOBJ/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "https://github.com/peter1000/"
},
"release_url": "https://pypi.org/project/ReOBJ/1.1.0/",
"requires_dist": null,
"requires_python": null,
"summary": "R(estricted) E(xtended) Objects. Simple, reasonable fast, restricted/extended python objects.",
"version": "1.1.0"
},
"last_serial": 1174336,
"releases": {
"1.1.0": [
{
"comment_text": "",
"digests": {
"md5": "adb0845254512b553aafb5945138d42d",
"sha256": "352cb66179d116e69fe67bd3f386098cd5b2554cae7650011ae8798297dbca35"
},
"downloads": -1,
"filename": "ReOBJ-1.1.0.tar.bz2",
"has_sig": false,
"md5_digest": "adb0845254512b553aafb5945138d42d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12367,
"upload_time": "2014-07-21T15:13:03",
"url": "https://files.pythonhosted.org/packages/ef/d0/469748ead9dfb5dfc9f3f440ed7d6997b278acd633ae1fa6700fe04411d4/ReOBJ-1.1.0.tar.bz2"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "adb0845254512b553aafb5945138d42d",
"sha256": "352cb66179d116e69fe67bd3f386098cd5b2554cae7650011ae8798297dbca35"
},
"downloads": -1,
"filename": "ReOBJ-1.1.0.tar.bz2",
"has_sig": false,
"md5_digest": "adb0845254512b553aafb5945138d42d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12367,
"upload_time": "2014-07-21T15:13:03",
"url": "https://files.pythonhosted.org/packages/ef/d0/469748ead9dfb5dfc9f3f440ed7d6997b278acd633ae1fa6700fe04411d4/ReOBJ-1.1.0.tar.bz2"
}
]
}