Skip to main content
2025 Python Packaging Survey is now live!  Take the survey now

Django queryset and serialization together

Project description

django-qserializer

Django QSerializer started as an internal Buser project to improve our serialization process.

Database queries and serialization are two separated step, but really ORM coupled. Relationships must be fetched from database before serialization, but Django don't have an easy way to define that.

from django.db import models
from django_qserializer import SerializableManager


class Company(models.Model):
    name = models.CharField(max_length=64)


class Bus(models.Model):
    company = models.ForeignKey(Company, on_delete=models.SET_NULL)
    objects = SerializableManager()

Supported by

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