Skip to main content

Wrapper for Django's JSONField that allows for lazy loading of the JSON object.

Project description

Django Lazy JSON Field

Wrapper for Django's JSONField that allows for lazy loading of the JSON object.

Why?

Django's JSONField is great, but it's not lazy. This means that if you have a large JSON object, it will be loaded into memory every time you access the field. This can be a problem if you have a large number of records with large JSON objects.

This package provides a LazyJSONField that only loads the JSON object when it's accessed.

Installation

pip install django-lazy-json

Usage

from django.db import models
from lazy_json_field.fields import LazyJSONField

class MyModel(models.Model):
    data = LazyJSONField()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_lazy_json-0.1.1.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

django_lazy_json-0.1.1-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page