{ "info": { "author": "Ilya Semenov", "author_email": "ilya@semenov.co", "bugtrack_url": null, "classifiers": [], "description": "django-object-utils\n===================\n\nThis small library provides helpers for updating Django model objects without race conditions.\n\n\nInstallation\n============\n\n::\n\n pip install django-object-utils\n\n\nUsage\n=====\n\n.. code:: python\n\n\tfrom django_object_utils import reload_object, update_object, lock_object\n\n\tuser = User.objects.get(pk=1)\n\n\t# Reload object in-place with the latest version from the database\n\treload_object(user)\n\n\t# Run SQL UPDATE for certain fields only and update the Python object\n\tupdate_object(user, username='john', email='john@gmail.com')\n\t\n\t# Run SQL UPDATE and then reload the object from the database\n\tupdate_object(user, balance=F('balance')+payment, reload=True)\n\n\tif request.method == 'POST':\n\t\twith transaction.atomic():\n\t\t\t# Enter a critical section and ensure that the object is the latest version.\n\t\t\t# Use the corresponding database row as the synchronization monitor.\n\t\t\tlock_object(user)\n\t\t\tform = UserForm(data=request.POST)\n\t\t\tform.save()", "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/IlyaSemenov/django-object-utils", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-object-utils", "package_url": "https://pypi.org/project/django-object-utils/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-object-utils/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/IlyaSemenov/django-object-utils" }, "release_url": "https://pypi.org/project/django-object-utils/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "UNKNOWN", "version": "0.0.1" }, "last_serial": 2302296, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "466cb1857446a1119389a2719a055fd3", "sha256": "3fdc672bbec1df7cbc03cf097887ae66886aac946c392b5a0772b21321402b9e" }, "downloads": -1, "filename": "django-object-utils-0.0.1.tar.gz", "has_sig": false, "md5_digest": "466cb1857446a1119389a2719a055fd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1823, "upload_time": "2016-07-15T13:08:52", "url": "https://files.pythonhosted.org/packages/b1/b8/f7223010a4fea7f72daee2c34d9871346b39ba087b5d9f6bd2498a3fdb6b/django-object-utils-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "466cb1857446a1119389a2719a055fd3", "sha256": "3fdc672bbec1df7cbc03cf097887ae66886aac946c392b5a0772b21321402b9e" }, "downloads": -1, "filename": "django-object-utils-0.0.1.tar.gz", "has_sig": false, "md5_digest": "466cb1857446a1119389a2719a055fd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1823, "upload_time": "2016-07-15T13:08:52", "url": "https://files.pythonhosted.org/packages/b1/b8/f7223010a4fea7f72daee2c34d9871346b39ba087b5d9f6bd2498a3fdb6b/django-object-utils-0.0.1.tar.gz" } ] }