{ "info": { "author": "David Townshend", "author_email": "aquavitae69@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.0", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Topic :: Database", "Topic :: Database :: Database Engines/Servers", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Norman\n======\n\nNorman provides a framework for creating complex data structures using\nan database-like approach. The range of potential application is wide,\nfor example in-memory databases, multi-keyed dictionaries or node graphs.\nThese applications are illustrated in the following examples.\n\nDatabase\n--------\n\nThis is a small database for a personal library::\n\n db = Database()\n\n @db.add\n class Book(Table):\n name = Field(unique=True)\n author = Field(index=True)\n\n def validate(self):\n assert isinstance(self.name, str)\n assert isinstance(self.author, Author)\n\n @db.add\n class Author(Table):\n surname = Field(unique=True)\n initials = Field(unique=True, default='')\n nationality = Field()\n books = Join(Book.author)\n\n\nMulti-keyed Dictionary\n----------------------\n\nThis table can be used as a dictionary with three keys::\n\n class MultiDict(Table):\n key1 = Field(unique=True)\n key2 = Field(unique=True)\n key3 = Field(unique=True)\n value = Field()\n\nValues can be added by::\n\n MultiDict(key1=4, key2='abc', key3=0, value='efg')\n\nAnd queried by::\n\n for m in (MultiDict.key1 == 4 & Multidict.key2 == 'abc'):\n print(m.value)\n\n\nNode Graph\n----------\n\nThis is a graph, where each node can have many parent nodes and many\nchildren nodes::\n\n class Link(Table):\n \"\"\"\n Directional connections between nodes.\n \"\"\"\n parent = Field(unique=True)\n child = Field(unique=True)\n\n def validate(self):\n assert isinstance(self.parent, Node)\n assert isinstance(self.child, Node)\n\n\n class Node(Table):\n \"\"\"\n Nodes in the graph.\n \"\"\"\n parents = Join(query=lambda n: (Link.child == n).field('parent'))\n children = Join(query=lambda n: (Link.parent == n).field('child'))\n\n def validate_delete(self):\n # Delete all connecting links if a node is deleted\n (Link.parent == self).delete()\n (Link.child == self).delete()\n", "description_content_type": null, "docs_url": null, "download_url": "http://bitbucket.org/aquavitae/norman/downloads", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://bitbucket.org/aquavitae/norman", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "norman", "package_url": "https://pypi.org/project/norman/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/norman/", "project_urls": { "Download": "http://bitbucket.org/aquavitae/norman/downloads", "Homepage": "http://bitbucket.org/aquavitae/norman" }, "release_url": "https://pypi.org/project/norman/0.7.2/", "requires_dist": null, "requires_python": null, "summary": "Norman is a framework for advanced data structures in python using\nan database-like approach. The range of potential applications is wide,\nfor example in-memory databases, multi-keyed dictionaries or node graphs.", "version": "0.7.2" }, "last_serial": 1005893, "releases": { "0.5.0": [], "0.5.1": [], "0.5.2": [], "0.6.0": [], "0.6.1": [], "0.6.2": [], "0.7.0": [], "0.7.1": [], "0.7.2": [ { "comment_text": "", "digests": { "md5": "3eadfe7a410ed65e14fe6366b2876641", "sha256": "0a8d27acf63dca2269ce0db48c64248674fba23abaeff14a798cff1ef6f775ec" }, "downloads": -1, "filename": "norman-0.7.2.zip", "has_sig": false, "md5_digest": "3eadfe7a410ed65e14fe6366b2876641", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33838, "upload_time": "2014-02-20T09:54:34", "url": "https://files.pythonhosted.org/packages/4f/33/2929127bb421a463191f489fd1921cea94f60eff27bd8ad6695839c18d01/norman-0.7.2.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3eadfe7a410ed65e14fe6366b2876641", "sha256": "0a8d27acf63dca2269ce0db48c64248674fba23abaeff14a798cff1ef6f775ec" }, "downloads": -1, "filename": "norman-0.7.2.zip", "has_sig": false, "md5_digest": "3eadfe7a410ed65e14fe6366b2876641", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33838, "upload_time": "2014-02-20T09:54:34", "url": "https://files.pythonhosted.org/packages/4f/33/2929127bb421a463191f489fd1921cea94f60eff27bd8ad6695839c18d01/norman-0.7.2.zip" } ] }