{ "info": { "author": "Mike Hansen", "author_email": "mike@rover.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Utilities" ], "description": "========\nOverview\n========\n\n\n\nThis library currently provides a replacement implementation of\n``prefetch_related_objects`` which uses an `identity map\n`_ to\nautomatically reduce the number of queries performed when prefetching.\n\nFor example, considered the following data model::\n\n class Toy(models.Model):\n dog = models.ForeignKey('dogs.Dog')\n\n class Dog(models.Model):\n name = models.CharField()\n favorite_toy = models.ForeignKey('toys.Toy', null=True)\n\n\nWith this library, we get don't need to do a database query to\nperform the prefetch for ``favorite_toy`` since that object\nhad already been fetched as part of the prefetching for ``toy_set``::\n\n >>> dog = Dog.objects.prefetch_related('toys', 'favorite_toy')[0]\n SELECT * from dogs_dog limit 1;\n SELECT * FROM toys_toy where toys_toy.dog_id IN (1);\n >>> dog.favorite_toy is dog.toy_set.all()[0] # no queries done\n True\n\n\nThe plan is to increase the scope of the library in future versions to\nprovide additional tools for working with ``prefetch_related``.\n\n\n* Free software: BSD 3-Clause License\n\nInstallation\n============\n\n::\n\n pip install django-prefetch-utils\n\nDocumentation\n=============\n\n\nhttps://django-prefetch-utils.readthedocs.io/\n\nChangelog\n=========\n\n0.1.0 (2019-07-16)\n------------------\n\n* First release on PyPI.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/roverdotcom/django-prefetch-utils", "keywords": "", "license": "BSD 3-Clause License", "maintainer": "", "maintainer_email": "", "name": "django-prefetch-utils", "package_url": "https://pypi.org/project/django-prefetch-utils/", "platform": "", "project_url": "https://pypi.org/project/django-prefetch-utils/", "project_urls": { "Homepage": "https://github.com/roverdotcom/django-prefetch-utils" }, "release_url": "https://pypi.org/project/django-prefetch-utils/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "An library of utilities and enhancements for Django's prefetch_related system.", "version": "0.1.0" }, "last_serial": 5584019, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "2e696f58966904f5f470dc891d87dc41", "sha256": "062be731dc47ef7350f41db85288905f472990135f2dee355d597f759f9a6e32" }, "downloads": -1, "filename": "django-prefetch-utils-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2e696f58966904f5f470dc891d87dc41", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51573, "upload_time": "2019-07-25T16:04:04", "url": "https://files.pythonhosted.org/packages/50/4c/094a378fbef0a85b5f497869d01151f0e8c2e42fc6109a44484a0fdb676a/django-prefetch-utils-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2e696f58966904f5f470dc891d87dc41", "sha256": "062be731dc47ef7350f41db85288905f472990135f2dee355d597f759f9a6e32" }, "downloads": -1, "filename": "django-prefetch-utils-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2e696f58966904f5f470dc891d87dc41", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51573, "upload_time": "2019-07-25T16:04:04", "url": "https://files.pythonhosted.org/packages/50/4c/094a378fbef0a85b5f497869d01151f0e8c2e42fc6109a44484a0fdb676a/django-prefetch-utils-0.1.0.tar.gz" } ] }