{ "info": { "author": "Christo Buschek", "author_email": "crito@30loops.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP" ], "description": "============\npython-docar\n============\n\n``python-docar`` gives an declarative syntax for defining messages passed\nbetween client and server applications. By moving the focus of web applications\nto the documents exchanged it gives you the possibility to implement document\noriented architectures. In this way you can map documents (messages) to\nresources identified by an URI. This is helpful for applications that implement\na RESTful API. In the context of frameworks like Django, docar serves as a\nsupporting library.\n\nOn the server side those documents can be mapped to an underlying model store.\nAt this time ``python-docar`` supports a Django ORM backend and a HTTP backend.\nOther model mappers like Sqlalchemy or a MongoDB backend mappers are possible.\nCurrently a MongoDB backend is in the making.\n\nThe same document definitions can be reused on the client side. In the future\nit will come with a HTTP client that can craft messages and send them right\naway to the server applications. Those documents can be validated, on the\nclient side as well as on the server side.\n\nAt the moment the only messaging format supported is a very simple JSON format.\nIt is planned to provide more dialects (like XML) or the possibility to\noverride the built-in serializers.\n\nFor the full documentation, either `build it yourself`_ or visit the online\ndocumentation at readthedocs: http://readthedocs.org/docs/python-docar/\n\nReport any issues on the `issue tracker`_ of github. For any questions, send me\na mail at crito[AT]30loops.net.\n\n``python-docar`` is influenced by roar_.\n\n.. _`issue tracker`: https://github.com/30loops/python-docar/issues\n.. _roar: https://github.com/apotonick/roar\n\nExample\n=======\n\nThe following code is a simplified example of how to use ``python-docar``. We\nstart using the Django backend::\n\n # First declare your document\n from webapp.models import EntryModel, AuthorModel\n from docar import Document, Collection, fields\n\n class Author(Document):\n name = fields.StringField()\n\n class Meta:\n backend_type = 'django'\n model = AuthorModel\n identifier = 'name'\n\n class BlogEntry(Document):\n id = fields.NumberField()\n title = fields.StringField()\n body = fields.StringField()\n published = fields.BooleanField(default=False)\n author = fields.ForeignDocument(Author)\n\n class Meta:\n backend_type = 'django'\n model = EntryModel\n #identifier = 'id' # The identifier defaults to 'id'\n\n # You can also declare collections of documents\n class Blog(Collection):\n document = BlogEntry\n\nYou can use those documents in the views of your application::\n\n from webapp.documents import Author, BlogEntry, Blog\n\n entry = BlogEntry({'id': 1})\n\n # Bind the document to a model\n entry.fetch()\n\nI can also change attributes of the document and save it back to the model::\n\n entry.title = \"20000 Leagues under the sea\"\n entry.save() # --> saves to the django model backend\n\nThe ``render`` method renders the document into a normalized dictionary.\nSerializers take the normalized output, and transform it into the message\nformat that is needed.::\n\n # render the document as a json string\n entry.render()\n\n {\n \"id\": 1,\n \"title\": \"20000 Leagues under the sea\",\n \"body\": \"The whole story about captain Nemo ...\",\n \"published\": True,\n \"author\": {\n \"name\": \"Jules Vernes\",\n }\n }\n\nInstallation\n============\n\nClone yourself the latest source from github. Development happens fast, so its\ngood to always go with the latest commit::\n\n $ git clone git://github.com/30loops/python-docar.git\n $ cd python-docar\n $ sudo python setup.py install\n\nDevelopment\n===========\n\nThis module comes along with a thorough test suite. Run it the following way::\n\n $ python setup.py nosetests\n\n.. _`build it yourself`:\n\nDocumentation\n=============\n\nTo build the documentation you need sphinx installed::\n\n $ cd docs\n $ make html\n\nYou find the documentation in ``docs/_build/html/``.\n\nDisclaimer\n==========\n\nThe use of this software comes without any warranty. It is released under a BSD\nlicense. See ``LICENSE`` for details.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/30loops/python-docar", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "docar", "package_url": "https://pypi.org/project/docar/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/docar/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/30loops/python-docar" }, "release_url": "https://pypi.org/project/docar/0.9.1/", "requires_dist": null, "requires_python": null, "summary": "Create resource oriented architectures for RESTful client and server applications.", "version": "0.9.1" }, "last_serial": 791292, "releases": { "0.4.1": [ { "comment_text": "", "digests": { "md5": "fc82206c99805e3795a34a8560ba2232", "sha256": "33fd6c1d16c5f4fc42f2077283435a9ba8679f382ab00b7b93a3458201e16152" }, "downloads": -1, "filename": "docar-0.4.1.tar.gz", "has_sig": false, "md5_digest": "fc82206c99805e3795a34a8560ba2232", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 163238, "upload_time": "2012-02-24T13:57:26", "url": "https://files.pythonhosted.org/packages/07/eb/a9cd81b54c9ba00ce869aace33028c7cb4e4c7e2b13971e34b2d2e0bca77/docar-0.4.1.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "6dae21279cdab448a49ea2cba17ce686", "sha256": "9451f724470534523d665de968977dc1db1a90a0da97b2e35c351dac00a8c7cf" }, "downloads": -1, "filename": "docar-0.5.tar.gz", "has_sig": false, "md5_digest": "6dae21279cdab448a49ea2cba17ce686", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 182065, "upload_time": "2012-03-09T23:12:55", "url": "https://files.pythonhosted.org/packages/9c/45/c4084344a8220d7469e628b30765b8e671be3db1730763d0d2f8f1474194/docar-0.5.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "a308ea3ca4c24aaf2f9741a179445f11", "sha256": "83904c372a46a76270498abaf36bbe2a8b9046095b398928848932777c134bb5" }, "downloads": -1, "filename": "docar-0.5.1.tar.gz", "has_sig": false, "md5_digest": "a308ea3ca4c24aaf2f9741a179445f11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 164157, "upload_time": "2012-03-20T14:15:12", "url": "https://files.pythonhosted.org/packages/44/9f/c04bc2e332410c76f1675e49141aeb63d3bb80a4c0778648df59d8045d03/docar-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "8c541a005d39f11da51bae6f52439edd", "sha256": "4b9258d74ffc250e19caf268b8e9f48a204af681a909a2c2a834a856fd2561b3" }, "downloads": -1, "filename": "docar-0.5.2.tar.gz", "has_sig": false, "md5_digest": "8c541a005d39f11da51bae6f52439edd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 164312, "upload_time": "2012-03-22T16:32:59", "url": "https://files.pythonhosted.org/packages/f9/79/d18bf3534e1f092a6b2e2253b087f762ed5ea3c09534b657125feb2411dc/docar-0.5.2.tar.gz" } ], "0.5.3": [ { "comment_text": "", "digests": { "md5": "7e1b532cc26ebf2648c6b623fcf85c6f", "sha256": "f38d9482f2c57120b1aac9e67ce5a0125f367c6b3a6b76752d34a4515b0698b6" }, "downloads": -1, "filename": "docar-0.5.3.tar.gz", "has_sig": false, "md5_digest": "7e1b532cc26ebf2648c6b623fcf85c6f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 164341, "upload_time": "2012-03-22T17:18:12", "url": "https://files.pythonhosted.org/packages/2b/1c/a28dece6a725c326a0b3b18b7cd331fa5fd10ba0949926135393c105b47a/docar-0.5.3.tar.gz" } ], "0.5.4": [ { "comment_text": "", "digests": { "md5": "9f49b3bce1ced5fd59f397d27eb382b6", "sha256": "6ba48bfaad738685923d718190bf280d1e6b25d071fa07842164e7d6fc61e2b6" }, "downloads": -1, "filename": "docar-0.5.4.tar.gz", "has_sig": false, "md5_digest": "9f49b3bce1ced5fd59f397d27eb382b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 65470, "upload_time": "2012-06-14T14:31:51", "url": "https://files.pythonhosted.org/packages/9b/ad/b94c2eae6931eb10b24f6bde884f8b9a8ecd29d368ea63c31e6bfb184b87/docar-0.5.4.tar.gz" } ], "0.5.5": [ { "comment_text": "", "digests": { "md5": "5a619c3e64ff28624e30389debd4c5e5", "sha256": "d8b073ab97ecf607caddf7ae534eff4be6ed7ddd166fd2782903c3623792e731" }, "downloads": -1, "filename": "docar-0.5.5.tar.gz", "has_sig": false, "md5_digest": "5a619c3e64ff28624e30389debd4c5e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 65511, "upload_time": "2012-06-18T20:41:46", "url": "https://files.pythonhosted.org/packages/ef/67/59c15737c61fb1e36fdf9442b34d3273341a6f81477f6ddb5246049a2c5f/docar-0.5.5.tar.gz" } ], "0.5.6": [ { "comment_text": "", "digests": { "md5": "fbced4b36dac08805075c9a44d5f7834", "sha256": "20c7af01a175dc55d2132d8f5c253a3174b32d07d9884d0358bb6fc66ed09954" }, "downloads": -1, "filename": "docar-0.5.6.tar.gz", "has_sig": false, "md5_digest": "fbced4b36dac08805075c9a44d5f7834", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 191379, "upload_time": "2012-09-24T09:03:49", "url": "https://files.pythonhosted.org/packages/7e/49/5f4db6b3d883ae450095728682b05870f23c00419be70191f36c6d6cbf61/docar-0.5.6.tar.gz" } ], "0.9": [ { "comment_text": "", "digests": { "md5": "17adf9bb2f350ba7573d3c316b81c031", "sha256": "c9df09a07c173bed8cefbb39b3849233acdc435ca3c4f4470028dc4be926668b" }, "downloads": -1, "filename": "docar-0.9.tar.gz", "has_sig": false, "md5_digest": "17adf9bb2f350ba7573d3c316b81c031", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 210348, "upload_time": "2012-09-26T12:58:52", "url": "https://files.pythonhosted.org/packages/f9/c2/bab491995c5d8f6374608cda4b30fabf29f44b291d050a2b5240e1d45922/docar-0.9.tar.gz" } ], "0.9.1": [ { "comment_text": "", "digests": { "md5": "ecf5716a174d29d29291411b34e17897", "sha256": "a3bcb09ab316a07e2079126c50f925503e6cd4f40ced93c12a4d2967b0960407" }, "downloads": -1, "filename": "docar-0.9.1.tar.gz", "has_sig": false, "md5_digest": "ecf5716a174d29d29291411b34e17897", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 230597, "upload_time": "2012-10-01T11:31:58", "url": "https://files.pythonhosted.org/packages/f9/34/b5f0042facbbaef6a01571a52523c752c4d34ebadd095ac9c7dd2e65eea7/docar-0.9.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ecf5716a174d29d29291411b34e17897", "sha256": "a3bcb09ab316a07e2079126c50f925503e6cd4f40ced93c12a4d2967b0960407" }, "downloads": -1, "filename": "docar-0.9.1.tar.gz", "has_sig": false, "md5_digest": "ecf5716a174d29d29291411b34e17897", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 230597, "upload_time": "2012-10-01T11:31:58", "url": "https://files.pythonhosted.org/packages/f9/34/b5f0042facbbaef6a01571a52523c752c4d34ebadd095ac9c7dd2e65eea7/docar-0.9.1.tar.gz" } ] }