{ "info": { "author": "Mark Longair", "author_email": "mark@mysociety.org", "bugtrack_url": null, "classifiers": [], "description": "Manage data from multiple sources using django-popolo\n=====================================================\n\nThis package provides a PopoloSource Django model to represent a\nURL from which you can fetch Popolo JSON data. It allows you to\nimport data from multiple such sources into django-popolo models\nwhile maintaining an association with the source they came from,\nand making sure that a change in one source doesn't affect the\nmodels from any other.\n\nIn addition, this package allows you to track objects that have\nbeen deleted from a source; they are marked as having\ndisappeared, but the django-popolo models are not deleted. If\nthey reappear with the same ID in the Popolo JSON source, the\ndisappeared flag (:code:`deleted_from_source`) will be set back to\n:code:`False`.\n\nIt is only the objects that are listed at the top level of a\nPopolo JSON file that are tracked by the code in this package.\nThat includes:\n\n* :code:`Area`\n* :code:`Membership`\n* :code:`Organization`\n* :code:`Person`\n* :code:`Post`\n\nBut does not include, for example, :code:`ContactDetail`.\n\nUsage\n-----\n\nTo create a new :code:`PopoloSource` you can do:\n\n.. code:: python\n\n from popolo_sources.models import PopoloSource\n\n ps = PopoloSource(url='http://example.com/parliament.json')\n\nTo then create django-popolo models (:code:`Person`,\n:code:`Organization`, etc.) based on the Popolo JSON at that\nURL, you can now do:\n\n.. code:: python\n\n ps.update_from_source()\n\nYou can run :code:`.update_from_source()` again to update the models\nbased on any changes in the Popolo JSON source.\n\nThe model that represents the join table linking :code:`PopoloSource`\nmodels with django-popolo models is\n:code:`popolo_sources.models.LinkToPopoloSource`. This model has the\n:code:`deleted_from_source` attributed, so you can find all\nnon-deleted top-level django-popolo with code like:\n\n.. code:: python\n\n for ltps in LinkToPopoloSource.filter(deleted_from_source=False):\n print ltps.popolo_object\n\nTests\n-----\n\nTo run the tests you can do:\n\n.. code:: bash\n\n pip install -e .[test]\n ./runtests.py", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": "django popolo civic-tech", "license": "AGPL", "maintainer": null, "maintainer_email": null, "name": "multiple-django-popolo-sources", "package_url": "https://pypi.org/project/multiple-django-popolo-sources/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/multiple-django-popolo-sources/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/multiple-django-popolo-sources/0.0.3/", "requires_dist": null, "requires_python": null, "summary": "Handle django-popolo data from multiple separate sources", "version": "0.0.3" }, "last_serial": 2355951, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "420911838534d1edc0132b640330f522", "sha256": "5c1915f381c75c632d960fe6b90d82711367118c58a4a589763d0755f9989a4f" }, "downloads": -1, "filename": "multiple-django-popolo-sources-0.0.1.tar.gz", "has_sig": false, "md5_digest": "420911838534d1edc0132b640330f522", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5434, "upload_time": "2016-09-20T14:46:17", "url": "https://files.pythonhosted.org/packages/89/9d/e0c0e4955640afdb0b19fb8599e1d2760a759736b9a1c36cf46f42c24de1/multiple-django-popolo-sources-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "6c817feb06d17aa07fc8a8f55db0c502", "sha256": "156d115cb4ad030342938da15fd0dd5f02d1cb282a14fef49f7c3d8b95092233" }, "downloads": -1, "filename": "multiple-django-popolo-sources-0.0.2.tar.gz", "has_sig": false, "md5_digest": "6c817feb06d17aa07fc8a8f55db0c502", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6086, "upload_time": "2016-09-20T15:53:31", "url": "https://files.pythonhosted.org/packages/23/46/f4ff4cf46208261703dfdd0cb8ce0445d9ed001dbe9032e6f0c2f70b5c3e/multiple-django-popolo-sources-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "dae5f810f2ebec88b3c40ff7010a42b5", "sha256": "c347154cf684825bc1be23613b238f9772bbb24622a324990073ea131004f7b4" }, "downloads": -1, "filename": "multiple-django-popolo-sources-0.0.3.tar.gz", "has_sig": false, "md5_digest": "dae5f810f2ebec88b3c40ff7010a42b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6375, "upload_time": "2016-09-21T20:27:36", "url": "https://files.pythonhosted.org/packages/64/7b/88b2b64799b717c75cf645e8c4807bffd011cfe0601bcde40ba954e9630e/multiple-django-popolo-sources-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dae5f810f2ebec88b3c40ff7010a42b5", "sha256": "c347154cf684825bc1be23613b238f9772bbb24622a324990073ea131004f7b4" }, "downloads": -1, "filename": "multiple-django-popolo-sources-0.0.3.tar.gz", "has_sig": false, "md5_digest": "dae5f810f2ebec88b3c40ff7010a42b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6375, "upload_time": "2016-09-21T20:27:36", "url": "https://files.pythonhosted.org/packages/64/7b/88b2b64799b717c75cf645e8c4807bffd011cfe0601bcde40ba954e9630e/multiple-django-popolo-sources-0.0.3.tar.gz" } ] }