{ "info": { "author": "mrgaolei", "author_email": "gaolei@luojilab.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "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.3", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: Site Management" ], "description": "Introduction\n============\n\n.. image:: https://img.shields.io/pypi/v/django-postgres-ioc.svg\n :target: https://pypi.python.org/pypi/django-postgres-ioc\n\nDjango ORM manager for Postgresql\nCame from Rock@luojilab\n\nReplace ``update_or_create``\nWithout transaction, when using ``update_or_create`` may raise ``IntegrityError``\nBecause thread 1 execute update affect 0 row\nand at the same time, thread 2 insert it\nthen thread 1 do insert will trigger UniqueKey conflict.\n\nThis method will use ``INSERT ON CONFLICT`` feature to fix this.\n\nRequirements\n============\n\n * Python >= 2.6 (tested on 2.7 and 3.6)\n * Django >= 1.7\n * PostgreSQL >= 9.5\n\nInstallation\n============\n\nRunning following command::\n\n $ python setup.py install\n\nOr using pip::\n\n $ pip install -U django-postgres-ioc\n\nUsage\n=====\n\nPython code::\n\n from django.db import models\n from ioc import IOCManager\n\n class Test(models.Model):\n code = models.CharField(max_length=50, unique=True))\n name = models.CharField(max_length=100\n\n objects = IOCManager()\n\n Test.objects.create_or_update(\n conflict=\"code\",\n code=\"luojilab\",\n defaults={\n \"name\": \"LuojiLab\",\n },\n )\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/luojilab/django-postgres-ioc", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "django-postgres-ioc", "package_url": "https://pypi.org/project/django-postgres-ioc/", "platform": "", "project_url": "https://pypi.org/project/django-postgres-ioc/", "project_urls": { "Homepage": "http://github.com/luojilab/django-postgres-ioc" }, "release_url": "https://pypi.org/project/django-postgres-ioc/0.0.2/", "requires_dist": [ "django (>=1.7)" ], "requires_python": "", "summary": "A Django model manager providing insert on conflict for PostgreSQL database tables.", "version": "0.0.2" }, "last_serial": 4017269, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "074c9af80c9917f8440d25f3f8c1d934", "sha256": "d307867be9f81e4cbb4e291dc28a4fb86d36d908c12ad9c478cc27d027459831" }, "downloads": -1, "filename": "django_postgres_ioc-0.0.1-py3.6.egg", "has_sig": false, "md5_digest": "074c9af80c9917f8440d25f3f8c1d934", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 5193, "upload_time": "2018-06-29T05:51:53", "url": "https://files.pythonhosted.org/packages/dd/10/0cdd77c94edbd2ce2247b84b6a2a23963dda94c94d9fb23478f53f1a9ecf/django_postgres_ioc-0.0.1-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "a719461031b688f1880fe3c213d02f1a", "sha256": "b06457a04a7f42af5249a9f5ab2d0dc07ffb1c7fbe6f5619ffee69575ddd145e" }, "downloads": -1, "filename": "django_postgres_ioc-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "a719461031b688f1880fe3c213d02f1a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3288, "upload_time": "2018-06-29T05:51:52", "url": "https://files.pythonhosted.org/packages/4e/2c/9c2a30ee35186f33b78717c5e20d6708846aae3b6863ccb01f78e03dcfc5/django_postgres_ioc-0.0.1-py3-none-any.whl" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "3fd75aef496341885bdd118e7167f101", "sha256": "8e127ccbbf6d475ba0eed8f209402e54ea897d060d79a4977cc652a00f44a26b" }, "downloads": -1, "filename": "django_postgres_ioc-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "3fd75aef496341885bdd118e7167f101", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3354, "upload_time": "2018-06-30T03:43:44", "url": "https://files.pythonhosted.org/packages/27/5d/c16d9f23311d1dd53561e49356596491769ec4649f5df1a3b43bbb6e6c27/django_postgres_ioc-0.0.2-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3fd75aef496341885bdd118e7167f101", "sha256": "8e127ccbbf6d475ba0eed8f209402e54ea897d060d79a4977cc652a00f44a26b" }, "downloads": -1, "filename": "django_postgres_ioc-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "3fd75aef496341885bdd118e7167f101", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3354, "upload_time": "2018-06-30T03:43:44", "url": "https://files.pythonhosted.org/packages/27/5d/c16d9f23311d1dd53561e49356596491769ec4649f5df1a3b43bbb6e6c27/django_postgres_ioc-0.0.2-py3-none-any.whl" } ] }