django-jsonstore


Namedjango-jsonstore JSON
Version 0.5.1 PyPI version JSON
download
home_pagehttp://github.com/viewflow/jsonstore
SummaryExpose JSONField data as a virtual django model fields.
upload_time2023-01-16 12:07:37
maintainer
docs_urlNone
authorMikhail Podgurskiy
requires_python
license
keywords django json orm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            =======================
Django JSONStore
=======================

IN ORDER TO REDUCE MAINTENANCE COST, THE PACKAGE FUNCTIONALITY WAS MOVED INTO THE django-viewflow

PLEASE, CONSIDE TO UPGRADE AND UPDATE IMPORTS:


...code::bash

    $ pip install django-viewflow>=2.0.0b1


..code::python

    from viewflow import jsonstore


Expose Django JSONField data as virtual model fields

Use ModelForm and ModelAdmin as usual. Perform simple queries. Migrate to real
table columns when needed without code change.

Suitable to store dumb business data, quick prototypes without DB migrations,
and replace multi-table inheritance joins.

.. image:: https://img.shields.io/pypi/v/django-jsonstore.svg
    :target: https://pypi.python.org/pypi/django-jsonstore

.. image:: https://img.shields.io/pypi/pyversions/django-jsonstore.svg
    :target: https://pypi.python.org/pypi/django-jsonstore

.. image:: https://img.shields.io/pypi/djversions/django-jsonstore.svg
    :target: https://pypi.python.org/pypi/django-jsonstore

*Use with caution! Replacing relational structures with JSON data should be
mindfull architecture decision.*

Works with any JSONField `django.contrib.postgres <https://docs.djangoproject.com/en/2.2/ref/contrib/postgres/fields/#jsonfield>`_,
`django-annoying <https://github.com/skorokithakis/django-annoying#jsonfield>`_,
`django-mysql <https://django-mysql.readthedocs.io/en/latest/model_fields/json_field.html>`_,
upcoming django `Cross-db JSONField <https://github.com/django/django/pull/11452>`_

*Work in progress* part of https://json-schema.org definitions are only supported.

Quick start
===========

.. code:: python

    import jsonstore
    from django import forms
    from django.contrib import admin
    from django.db import models
    from .??. import JSONField

    class Employee(models.Model):
        data = JSONField(default={})
        full_name = jsonstore.CharField(max_length=250)
        hire_date = jsonstore.DateField()
        salary = jsonstore.DecimalField(max_digits=10, decimal_places=2)

    class EmployeeForm(forms.ModelForm):
        class Meta:
            model = Employee
            fields = ['full_name', 'hire_date', 'salary']

    @admin.register(Employee)
    class EmployeeAdmin(admin.ModelAdmin):
        list_display = ['full_name', 'hire_date']
        fields = ['full_name', ('hire_date', 'salary')]


Demo
====

The demo shows how to handle multiple User types within single table with
JSONField and `Django-Polymodels <https://github.com/charettes/django-polymodels/>`_ proxies.

.. code:: bash

   $ export DATABASE_URL=postgresql://viewflow:viewflow@localhost/viewflow
   $ export DJANGO_SETTINGS_MODULE=demo.settings
   $ tox python manage.py migrate
   $ tox python manage.py runserver


License
=======

Django JSONStore is an Open Source project licensed under the terms of
the AGPL license - `The GNU Affero General Public License v3.0
<http://www.gnu.org/licenses/agpl-3.0.html>`_ with the Additional Permissions
described in `LICENSE_EXCEPTION <./LICENSE_EXCEPTION>`_

You can more read about AGPL at `AGPL FAQ <http://www.affero.org/oagf.html>`_
This package license scheme follows to GCC Runtime library licensing. If you use
Linux already, probably this package license, should not bring anything new to
your stack.

Latest changelog
================

0.5.1 2023-01-16
----------------

Package deprication on favor of django-viewflow



            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/viewflow/jsonstore",
    "name": "django-jsonstore",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "django,json,orm",
    "author": "Mikhail Podgurskiy",
    "author_email": "kmmbvnr@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/7b/33/ac3234c30bfb77daf87b128611fa9b3a834b370efb4270e97aa171864842/django-jsonstore-0.5.1.tar.gz",
    "platform": "Any",
    "description": "=======================\nDjango JSONStore\n=======================\n\nIN ORDER TO REDUCE MAINTENANCE COST, THE PACKAGE FUNCTIONALITY WAS MOVED INTO THE django-viewflow\n\nPLEASE, CONSIDE TO UPGRADE AND UPDATE IMPORTS:\n\n\n...code::bash\n\n    $ pip install django-viewflow>=2.0.0b1\n\n\n..code::python\n\n    from viewflow import jsonstore\n\n\nExpose Django JSONField data as virtual model fields\n\nUse ModelForm and ModelAdmin as usual. Perform simple queries. Migrate to real\ntable columns when needed without code change.\n\nSuitable to store dumb business data, quick prototypes without DB migrations,\nand replace multi-table inheritance joins.\n\n.. image:: https://img.shields.io/pypi/v/django-jsonstore.svg\n    :target: https://pypi.python.org/pypi/django-jsonstore\n\n.. image:: https://img.shields.io/pypi/pyversions/django-jsonstore.svg\n    :target: https://pypi.python.org/pypi/django-jsonstore\n\n.. image:: https://img.shields.io/pypi/djversions/django-jsonstore.svg\n    :target: https://pypi.python.org/pypi/django-jsonstore\n\n*Use with caution! Replacing relational structures with JSON data should be\nmindfull architecture decision.*\n\nWorks with any JSONField `django.contrib.postgres <https://docs.djangoproject.com/en/2.2/ref/contrib/postgres/fields/#jsonfield>`_,\n`django-annoying <https://github.com/skorokithakis/django-annoying#jsonfield>`_,\n`django-mysql <https://django-mysql.readthedocs.io/en/latest/model_fields/json_field.html>`_,\nupcoming django `Cross-db JSONField <https://github.com/django/django/pull/11452>`_\n\n*Work in progress* part of https://json-schema.org definitions are only supported.\n\nQuick start\n===========\n\n.. code:: python\n\n    import jsonstore\n    from django import forms\n    from django.contrib import admin\n    from django.db import models\n    from .??. import JSONField\n\n    class Employee(models.Model):\n        data = JSONField(default={})\n        full_name = jsonstore.CharField(max_length=250)\n        hire_date = jsonstore.DateField()\n        salary = jsonstore.DecimalField(max_digits=10, decimal_places=2)\n\n    class EmployeeForm(forms.ModelForm):\n        class Meta:\n            model = Employee\n            fields = ['full_name', 'hire_date', 'salary']\n\n    @admin.register(Employee)\n    class EmployeeAdmin(admin.ModelAdmin):\n        list_display = ['full_name', 'hire_date']\n        fields = ['full_name', ('hire_date', 'salary')]\n\n\nDemo\n====\n\nThe demo shows how to handle multiple User types within single table with\nJSONField and `Django-Polymodels <https://github.com/charettes/django-polymodels/>`_ proxies.\n\n.. code:: bash\n\n   $ export DATABASE_URL=postgresql://viewflow:viewflow@localhost/viewflow\n   $ export DJANGO_SETTINGS_MODULE=demo.settings\n   $ tox python manage.py migrate\n   $ tox python manage.py runserver\n\n\nLicense\n=======\n\nDjango JSONStore is an Open Source project licensed under the terms of\nthe AGPL license - `The GNU Affero General Public License v3.0\n<http://www.gnu.org/licenses/agpl-3.0.html>`_ with the Additional Permissions\ndescribed in `LICENSE_EXCEPTION <./LICENSE_EXCEPTION>`_\n\nYou can more read about AGPL at `AGPL FAQ <http://www.affero.org/oagf.html>`_\nThis package license scheme follows to GCC Runtime library licensing. If you use\nLinux already, probably this package license, should not bring anything new to\nyour stack.\n\nLatest changelog\n================\n\n0.5.1 2023-01-16\n----------------\n\nPackage deprication on favor of django-viewflow\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Expose JSONField data as a virtual django model fields.",
    "version": "0.5.1",
    "split_keywords": [
        "django",
        "json",
        "orm"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2a5fe2f36b96da4baab8c96b535d564de8a5bb9d16f53447e6ce659d932b838f",
                "md5": "f303ce47fd65e67303b5391954655ed7",
                "sha256": "5aeeac300ee1b93ca26708fbf3fc48cf7b92aaff638ef05b80a59f70d23cfb79"
            },
            "downloads": -1,
            "filename": "django_jsonstore-0.5.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f303ce47fd65e67303b5391954655ed7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 18670,
            "upload_time": "2023-01-16T12:07:35",
            "upload_time_iso_8601": "2023-01-16T12:07:35.204258Z",
            "url": "https://files.pythonhosted.org/packages/2a/5f/e2f36b96da4baab8c96b535d564de8a5bb9d16f53447e6ce659d932b838f/django_jsonstore-0.5.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7b33ac3234c30bfb77daf87b128611fa9b3a834b370efb4270e97aa171864842",
                "md5": "4217ad23bf3d17e0f3d7c6c2d535d13c",
                "sha256": "fe49dd134b2c86ac434f77244be28102616783521c22de6d361879824b6d1a27"
            },
            "downloads": -1,
            "filename": "django-jsonstore-0.5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4217ad23bf3d17e0f3d7c6c2d535d13c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 17839,
            "upload_time": "2023-01-16T12:07:37",
            "upload_time_iso_8601": "2023-01-16T12:07:37.969689Z",
            "url": "https://files.pythonhosted.org/packages/7b/33/ac3234c30bfb77daf87b128611fa9b3a834b370efb4270e97aa171864842/django-jsonstore-0.5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-16 12:07:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "viewflow",
    "github_project": "jsonstore",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "django-jsonstore"
}
        
Elapsed time: 0.02993s