{"id":21612679,"url":"https://github.com/alexopryshko/django-serializer","last_synced_at":"2025-04-11T05:50:52.069Z","repository":{"id":39522345,"uuid":"85388829","full_name":"alexopryshko/django-serializer","owner":"alexopryshko","description":"Flexible toolkit for building APIs base on Marshmallow","archived":false,"fork":false,"pushed_at":"2023-07-27T13:24:47.000Z","size":128,"stargazers_count":11,"open_issues_count":4,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T05:47:56.011Z","etag":null,"topics":["api","django","marshmallow","python3","rpc-framework"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexopryshko.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-18T09:09:08.000Z","updated_at":"2023-08-30T14:24:11.000Z","dependencies_parsed_at":"2024-11-24T21:28:03.992Z","dependency_job_id":"54197554-8c44-4b9e-a0a5-f37515ca2b66","html_url":"https://github.com/alexopryshko/django-serializer","commit_stats":{"total_commits":47,"total_committers":7,"mean_commits":6.714285714285714,"dds":"0.36170212765957444","last_synced_commit":"f0347de073603bf71a65beb60206b6b6070bac9f"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexopryshko%2Fdjango-serializer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexopryshko%2Fdjango-serializer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexopryshko%2Fdjango-serializer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexopryshko%2Fdjango-serializer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexopryshko","download_url":"https://codeload.github.com/alexopryshko/django-serializer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248351425,"owners_count":21089271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","django","marshmallow","python3","rpc-framework"],"created_at":"2024-11-24T21:25:20.308Z","updated_at":"2025-04-11T05:50:52.046Z","avatar_url":"https://github.com/alexopryshko.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django-serializer\n\n## Installation\n\ndjango-serializer packaged and delivered via [pypi](https://pypi.org/project/django-serializer/)\n\n`pip install django-serializer`\n\n## Features\nSerialization provided by [marshmallow](https://github.com/marshmallow-code/marshmallow).\nThe library provide generic and custom CRUD views and paginators.\nAutomatic swagger generation provided by [apispec](https://github.com/marshmallow-code/apispec)\n\n# Changelog\nSee [HISTORY.md](https://github.com/alexopryshko/django-serializer/blob/master/HISTORY.md)\n\n## Quickstart\n\n### basic flow\n```python\nfrom django_serializer.v2.serializer import ModelSerializer\nfrom django_serializer.v2.views import ApiView \nfrom myapp.models import MyModel\n\nclass MyModelSerializer(ModelSerializer):\n    class SMeta:\n        model = MyModel\n        fields = ('id', 'foo', 'bar')\n\nclass MyView(ApiView):\n    class Meta:\n        serializer = MyModelSerializer\n\n    def execute(self, request, *args, **kwargs):\n        return MyModel.objects.first()\n```\n\n### multiple objects\n```python\nfrom django_serializer.v2.serializer import ModelSerializer\nfrom django_serializer.v2.views import ApiView \nfrom myapp.models import MyModel\n\nclass MyModelSerializer(ModelSerializer):\n    class SMeta:\n        model = MyModel\n        fields = ('id', 'foo', 'bar')\n\nclass MyListView(ApiView):\n    class Meta:\n        serializer = MyModelSerializer\n        serializer_many = True\n\n    def execute(self, request, *args, **kwargs):\n        return MyModel.objects.first()\n```\n\n### using query params\n```python\nfrom django import forms\nfrom django_serializer.v2.views import ApiView \n\nclass MyQueryForm(forms.Form):\n    id = forms.IntegerField() \n\nclass MyListView(ApiView):\n    class Meta:\n        query_form = MyQueryForm\n        serializer = MyModelSerializer\n        serializer_many = True\n        \n    def execute(self, request, *args, **kwargs):\n        object_id = self.request_query['id']\n        return MyModel.objects.filter(id=object_id).first()\n```\n\n### add swagger\n```python\n# urls.py\nfrom django_serializer.v2.swagger.views import index\nfrom django.urls import path\n\nurlpatterns = [\n    path('swagger.json', index),\n]\n```\n\n\n## Contribution\nFeel free to open pull request to the latest `rc-\u003cversion\u003e` branch.\n\n## Licence \nSee [LICENSE](https://github.com/alexopryshko/django-serializer/blob/master/LICENSE.txt)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexopryshko%2Fdjango-serializer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexopryshko%2Fdjango-serializer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexopryshko%2Fdjango-serializer/lists"}