Metadata-Version: 2.1
Name: drf-polymorphic
Version: 0.1.0
Summary: Polymorphic serializers without models
Home-page: https://github.com/maykinmedia/drf-polymorphic
Author: Maykin Media
Author-email: support@maykinmedia.nl
License: MIT
Project-URL: Documentation, http://drf-polymorphic.readthedocs.io/en/latest/
Project-URL: Changelog, https://github.com/maykinmedia/drf-polymorphic/blob/main/docs/changelog.rst
Project-URL: Bug Tracker, https://github.com/maykinmedia/drf-polymorphic/issues
Project-URL: Source Code, https://github.com/maykinmedia/drf-polymorphic
Keywords: django,rest,polymorphic
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Django
Classifier: Framework :: Django :: 3.2
Classifier: Framework :: Django :: 4.0
Classifier: Framework :: Django :: 4.1
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Provides-Extra: spectacular
Provides-Extra: tests
Provides-Extra: coverage
Provides-Extra: docs
Provides-Extra: release
License-File: LICENSE

DRF-polymorphic
===============

:Version: 0.1.0
:Source: https://github.com/maykinmedia/drf-polymorphic
:Keywords: django, rest, polymorphic

|build-status| |coverage| |linting| |black| |docs|

|python-versions| |django-versions| |pypi-version|

Polymorphic support for DRF without Django models

Overview
========

Polymorphism happens when a resource takes a certain shape depending on the type
of the resource. Usually they have a common base type. The exact type/shape is not
statically known, but depends on the run-time values.

Unlike `django-rest-polymorphic <https://github.com/apirobot/django-rest-polymorphic>`_
this implementation doesn't require the usage of ``django-polymorphic`` model classes
and can be used even without django models.

The implementations also includes the extension for `DRF spectacular`_ schema generation.

See the documentation_ for getting started and usage examples.


.. |build-status| image:: https://github.com/maykinmedia/drf-polymorphic/workflows/ci/badge.svg
    :target: https://github.com/maykinmedia/drf-polymorphic/actions/workflows/ci.yml
    :alt: Run CI

.. |linting| image:: https://github.com/maykinmedia/drf-polymorphic/workflows/code-quality/badge.svg
    :target: https://github.com/maykinmedia/drf-polymorphic/actions/workflows/code-quality.yml
    :alt: Code linting

.. |coverage| image:: https://codecov.io/gh/maykinmedia/drf-polymorphic/branch/main/graph/badge.svg
    :target: https://codecov.io/gh/maykinmedia/drf-polymorphic
    :alt: Coverage status

.. |python-versions| image:: https://img.shields.io/pypi/pyversions/drf-polymorphic.svg

.. |django-versions| image:: https://img.shields.io/pypi/djversions/drf-polymorphic.svg

.. |pypi-version| image:: https://img.shields.io/pypi/v/drf-polymorphic.svg
    :target: https://pypi.org/project/drf-polymorphic/

.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/psf/black

.. |docs| image:: https://readthedocs.org/projects/drf-polymorphic/badge/?version=latest
    :target: https://drf-polymorphic.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

.. _DRF spectacular: https://drf-spectacular.readthedocs.io/en/latest/

.. _documentation: https://drf-polymorphic.readthedocs.io/
