Skip to content

sideshowdave7/django-rest-framework-flatbuffers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Djano Rest Framework Flatbuffer Support

Use:

The mixin provided is compatible with DRF's ModelSerializer. For example:

from rest_framework import serializers
from rest_framework_flatbuffers.django import FBSerializerMixin

class MyModelSerializer(serializers.ModelSerializer, FBSerializerMixin):

    
    Normal DRF Serializer Here

Now you can use MyModelSerializer.fb_data to obtain a flatbuffer representation.

Note: This relies on generating the correct .hbs model files and having them be importable. The namespace of the hbs model must match the import path of the django model.

About

Django Rest Framework - Flatbuffer serialzation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages