{ "info": { "author": "Sector Labs", "author_email": "open-source@sectorlabs.ro", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "==================== ===================\n**Quality** |QualityBadge|_\n**Test coverage** |CoverageBadge|_\n**License** |LicenseBadge|_\n**PyPi** |PyPiBadge|_\n**Django versions** >=1.11 (including 2.0)\n**Python versions** >=3.5\n==================== ===================\n\n.. |QualityBadge| image:: https://scrutinizer-ci.com/g/SectorLabs/django-postgres-extra/badges/quality-score.png\n.. _QualityBadge: https://scrutinizer-ci.com/g/SectorLabs/django-postgres-extra/\n\n\n.. |CoverageBadge| image:: https://scrutinizer-ci.com/g/SectorLabs/django-postgres-extra/badges/coverage.png\n.. _CoverageBadge: https://scrutinizer-ci.com/g/SectorLabs/django-postgres-extra/\n\n\n.. |LicenseBadge| image:: https://img.shields.io/:license-mit-blue.svg\n.. _LicenseBadge: http://doge.mit-license.org\n\n\n.. |PyPiBadge| image:: https://badge.fury.io/py/django-postgres-extra.svg\n.. _PyPiBadge: https://pypi.python.org/pypi/django-postgres-extra\n\n``django-postgres-extra`` aims to make all of PostgreSQL's awesome features available through the Django ORM. We do this by taking care of all the hassle. As opposed to the many small packages that are available to try to bring a single feature to Django with minimal effort. ``django-postgres-extra`` goes the extra mile, with well tested implementations, seamless migrations and much more.\n\nWith seamless we mean that any features we add will work truly seamlessly. You should not have to manually modify your migrations to work with fields and objects provided by this package.\n\nDocumentation\n-------------\n\n* **ReadTheDocs HTML**\n\n http://django-postgres-extra.readthedocs.io\n\n* **Plain MarkDown**\n\n https://github.com/SectorLabs/django-postgres-extra/tree/master/docs\n\nMajor features\n--------------\n\n1. **Native upserts**\n\n * Single query\n * Concurrency safe\n * With bulk support (single query)\n\n2. **Extended support for HStoreField**\n\n * Unique constraints\n * Null constraints\n * Select individual keys using ``.values()`` or ``.values_list()``\n\n3. **Extra signals**\n\n * Updates\n\n4. **Extra expressions**\n\n * ``MIN`` and ``MAX`` for multiple value fields such as hstore and array.\n\n5. **Indexes**\n\n * Custom indexes with conditions.\n\nDesired/future features\n-----------------------\n\n* `Desired enhancements `_\n\n\nInstallation\n------------\n\n1. Install the package from PyPi:\n\n .. code-block:: bash\n\n \u03bb pip install django-postgres-extra\n\n2. Add ``postgres_extra`` and ``django.contrib.postgres`` to your ``INSTALLED_APPS``:\n\n .. code-block:: python\n\n INSTALLED_APPS = [\n ....\n\n 'django.contrib.postgres',\n 'psqlextra'\n ]\n\n3. Set the database engine to ``psqlextra.backend``:\n\n .. code-block:: python\n\n DATABASES = {\n 'default': {\n ...\n 'ENGINE': 'psqlextra.backend'\n }\n }\n\n4. Make sure all models that inherit from ``psqlextra.models.PostgresModel`` or use the ``psqlextra.manager.PostgresManager``. Without this, most features **do not work**.\n\n\nFAQ - Frequently asked questions\n--------------------------------\n\n1. **Why do I need to change the database back-end/engine?**\n\n We utilize PostgreSQL's `hstore` data type, which allows you to store key-value pairs in a column. In order to create `UNIQUE` constraints on specific key, we need to create a special type of index. We could do this without a custom database back-end, but it would require everyone to manually write their migrations. By using a custom database back-end, we added support for this. When changing the `uniqueness` constraint on a `HStoreField`, our custom database back-end takes care of creating, updating and deleting these constraints/indexes in the database.\n\n2. **I am already using a custom database back-end, can I still use yours?**\n\n Yes. You can set the ``POSTGRES_EXTRA_DB_BACKEND_BASE`` setting to your current back-end. This will instruct our custom database back-end to inherit from the database back-end you specified. **Warning**: this will only work if the base you specified indirectly inherits from the standard PostgreSQL database back-end.\n\n3. **Does this package work with Python 2?**\n\n No. Only Python 3.5 or newer is supported. We're using type hints. These do not work well under older versions of Python.\n\n4. **Which Django versions does this package work with?**\n\n Django 1.11 or newer (that includes Django 2.0).\n\n\nWorking with the code\n---------------------\n\n**Prerequisites**\n\n* PostgreSQL 9.6 or newer.\n* Django 1.11 or newer.\n* Python 3.5 or newer.\n\n**Getting started**\n\n1. Clone the repository:\n\n .. code-block:: bash\n\n \u03bb git clone https://github.com/SectorLabs/django-postgres-extra.git\n\n2. Create a virtual environment:\n\n .. code-block:: bash\n\n \u03bb cd django-postgres-extra\n \u03bb virtualenv env\n \u03bb source env/bin/activate\n\n3. Create a postgres user for use in tests (skip if your default user is a postgres superuser):\n\n .. code-block:: bash\n\n \u03bb createuser --superuser psqlextra --pwprompt\n \u03bb export DATABASE_URL=postgres://psqlextra:@localhost/psqlextra\n\n Hint: if you're using virtualenvwrapper, you might find it beneficial to put\n the ``export`` line in ``$VIRTUAL_ENV/bin/postactivate`` so that it's always\n available when using this virtualenv.\n\n4. Install the development/test dependencies:\n\n .. code-block:: bash\n\n \u03bb pip install -r requirements/test.txt\n\n5. Run the tests:\n\n .. code-block:: bash\n\n \u03bb tox\n\n6. Run the benchmarks:\n\n .. code-block:: bash\n\n \u03bb py.test -c pytest-benchmark.ini", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/zak10/django-postgres-extra", "keywords": "django,postgres,extra,hstore,ltree", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "django-postgres-extra-kauffman", "package_url": "https://pypi.org/project/django-postgres-extra-kauffman/", "platform": "", "project_url": "https://pypi.org/project/django-postgres-extra-kauffman/", "project_urls": { "Homepage": "https://github.com/zak10/django-postgres-extra" }, "release_url": "https://pypi.org/project/django-postgres-extra-kauffman/1.21a12/", "requires_dist": null, "requires_python": "", "summary": "Bringing all of PostgreSQL's awesomeness to Django.", "version": "1.21a12" }, "last_serial": 3977618, "releases": { "1.21a12": [ { "comment_text": "", "digests": { "md5": "e37c0deefb344209758339c8f6594253", "sha256": "7c2f942e8bb09004f5209902267c054a65fd04df513efd02c593d442aef399e2" }, "downloads": -1, "filename": "django-postgres-extra-kauffman-1.21a12.tar.gz", "has_sig": false, "md5_digest": "e37c0deefb344209758339c8f6594253", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34081, "upload_time": "2018-06-19T14:08:52", "url": "https://files.pythonhosted.org/packages/e6/98/129cf88e6687462482ec419836a87f48832488f7c30543f1119deff46075/django-postgres-extra-kauffman-1.21a12.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e37c0deefb344209758339c8f6594253", "sha256": "7c2f942e8bb09004f5209902267c054a65fd04df513efd02c593d442aef399e2" }, "downloads": -1, "filename": "django-postgres-extra-kauffman-1.21a12.tar.gz", "has_sig": false, "md5_digest": "e37c0deefb344209758339c8f6594253", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34081, "upload_time": "2018-06-19T14:08:52", "url": "https://files.pythonhosted.org/packages/e6/98/129cf88e6687462482ec419836a87f48832488f7c30543f1119deff46075/django-postgres-extra-kauffman-1.21a12.tar.gz" } ] }