Skip to main content

Allows for automatic serialization of Djongo fields w/ Django REST

Project description

rest-meets-djongo

A package which enables serialization of Djongo fields with django-rest-framework's (DRF) serializers and viewsets

Features

NOTE: This repo is currently under development, and most (if not all) of its features are likely to throw errors or behave in unexpected ways; use at your own risk

Similar to DRF ModelSerializers, creating serializers using DjongoModelSerializer allows for the following fields to be detected and automatically managed through DRF's serializer setup. These fields include:

  • ObjectIDField
  • EmbeddedModelField
  • ArrayModelField (WIP)
  • ArrayReferenceField (WIP)

Usage

  1. Install rest-meets-djongo:
    pip install rest_meets_djongo
    
  2. Replace REST's 'ModelSerializer' with 'DjongoModelSerializer' and enjoy Djongo model serializeation

Requirements:

(Earlier version testing is currently being testing; these are just the confirmed functional versions)

  1. Python 3.6 or higher
  2. MongoDB 4.0 or higher
  3. djangorestframework 3.9 or higher
  4. djongo 1.2 or higher

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

rest_meets_djongo-0.0.5.tar.gz (11.1 kB view hashes)

Uploaded Source

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