{ "info": { "author": "Domino Marama", "author_email": "domino@dominodesigns.info", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.3", "Topic :: Database :: Database Engines/Servers", "Topic :: Text Processing", "Topic :: Text Processing :: Indexing" ], "description": "DeepDesk is a framework designed for a common database across multiple applications.\n\nIt features the following submodules:\n\ndata: json file based database system with indexing, full text search, record templates, validation, navigation aliases and more!\n\n>>> from deepdesk import *\n>>> root=data.Root('./root')\n>>> template=root.Record(\n... \"template/user\",\n... {\n... 'email':data.Index(data.Validate(\"\", 'email'), \"user/email\"),\n... 'profile':data.Key('profile/')\n... })\n>>> template.hash = True\n>>> template.version = 1\n>>> template.save()\n\nBy setting template.hash to True, we are telling deepdesk to\ninclude the hash and salt fields in records created from this\ntemplate. These are automatically included if a password is\nset, but by doing this now we can use it later to display a\npassword field for records that have a hash attribute.\n\nAs we might alter templates and need a history of changes for\nmanaging data updates, set version to 1 to enable versioning\non the record.\n\nWe can now use this template to create a user. A trailing back slash\n(\"/\") on the key tells deepdesk that there is a template for this record\nand it will generate a uuid for the rest of the location.\n\n>>> user=root.Record(\"user/\", {'email':\"domino@@example.com\"})\n>>> user['email'].isvalid\nFalse\n>>> user['email'] = \"domino.marama@example.com\"\n>>> user['email'].isvalid\nTrue\n>>> user.password = \"example.password\"\n>>> user.save()\n\nNow we haved saved the user, we can find it from the \"user/email\" index.\n\n>>> indexfile = root.IndexFile(\"user/email\")\n>>> indexfile.lookup(\"domino.marama@example.com\")\n'user/ae4df406/f166/4a75/be34/c0742a029f24'\n>>> test = root.Record('user/ae4df406/f166/4a75/be34/c0742a029f24')\n>>> test.password == \"another.password\"\nFalse\n>>> test.password == \"example.password\"\nTrue\n>>> test.password\n\n>>> test.base\n'template/user.0001'\n>>> str(test)\n\"{'email': Index(Validate('domino.marama@example.com', 'email'), 'user/email'), 'profile': Key('profile/')}\"\n\nAs well as Index, there are Alias, Collect, Group, Search and Include\nfield wrappers which you can use to help navigate the database.\n\n>>> root.init()\n\nThis imports schema.org to the database, check the code for the\nfield wrappers used :-)\n\n>>> root.search(\"about\")\n{'schema.org/AboutPage', 'schema.org/about'}\n>>> root.browse(\"menu/schema.org\")\n['Data Type', 'Thing', 'Data Type.json', 'Thing.json']\n>>> root.browse(\"menu/schema.org/Data Type\")\n['Time.json', 'Text.json', 'Date.json', 'Number.json', 'Number', 'Date Time.json', 'Boolean.json', 'Text']\n>>> t = root.Record(\"menu/schema.org/Data Type/Time.json\")\n>>> t.key\nKey('schema.org/Time')\n>>> t.fields.keys()\ndict_keys(['supertypes', 'ancestors', 'specific_properties', 'id', 'url', 'subtypes', 'properties', 'comment', 'comment_plain', 'label'])\n>>> t['url']\n'http://schema.org/Time'", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/Domino_Marama/deepdesk", "keywords": "deepdesk json index validate storage database", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "DeepDesk", "package_url": "https://pypi.org/project/DeepDesk/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/DeepDesk/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/Domino_Marama/deepdesk" }, "release_url": "https://pypi.org/project/DeepDesk/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "Flexible data storage, with indexing, templates and validation", "version": "0.1.2" }, "last_serial": 1088156, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d3af331cdc5af3bcc8da50551dd9cb18", "sha256": "e6a8544f5cd0827e3053abc56b7687dd6775b80384cb16a5d128457eb06f815d" }, "downloads": -1, "filename": "DeepDesk-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d3af331cdc5af3bcc8da50551dd9cb18", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10692, "upload_time": "2014-04-25T19:46:43", "url": "https://files.pythonhosted.org/packages/7d/7e/434f3ca2112d281ed5bdff8ce95f87534827431db78ae41991df21dfb63d/DeepDesk-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d6ae8c9c071367976e593665376f3731", "sha256": "8e53c57c73da848ed5c8dbbe628686888b0616e5eae220f12298bdddaa1f06d4" }, "downloads": -1, "filename": "DeepDesk-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d6ae8c9c071367976e593665376f3731", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13211, "upload_time": "2014-05-05T13:07:27", "url": "https://files.pythonhosted.org/packages/35/74/32c99fd6ad598bdebe1b1720e190fe2a9cc7874234f4a6c29e69e687ccf2/DeepDesk-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "5bed14928b2fde29f61ae15d1262a14b", "sha256": "1242288bf26b0e49cca3e9a86e73d03b90cfe7bbeb7943b99ba61a84eb4d8b5e" }, "downloads": -1, "filename": "DeepDesk-0.1.2.tar.gz", "has_sig": false, "md5_digest": "5bed14928b2fde29f61ae15d1262a14b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13583, "upload_time": "2014-05-10T21:09:17", "url": "https://files.pythonhosted.org/packages/9c/45/7b96a9fb015cce1c47d3a0155e88ba0cc6716a0edc850c883139687d29c1/DeepDesk-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5bed14928b2fde29f61ae15d1262a14b", "sha256": "1242288bf26b0e49cca3e9a86e73d03b90cfe7bbeb7943b99ba61a84eb4d8b5e" }, "downloads": -1, "filename": "DeepDesk-0.1.2.tar.gz", "has_sig": false, "md5_digest": "5bed14928b2fde29f61ae15d1262a14b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13583, "upload_time": "2014-05-10T21:09:17", "url": "https://files.pythonhosted.org/packages/9c/45/7b96a9fb015cce1c47d3a0155e88ba0cc6716a0edc850c883139687d29c1/DeepDesk-0.1.2.tar.gz" } ] }