{"id":34719800,"url":"https://github.com/explodes/djsonapi","last_synced_at":"2026-05-28T14:31:01.818Z","repository":{"id":16598315,"uuid":"19352827","full_name":"explodes/djsonapi","owner":"explodes","description":"Non-prohibitive, JSON API library for Django.","archived":false,"fork":false,"pushed_at":"2016-03-04T04:43:58.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-22T13:28:14.423Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/explodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-01T18:01:00.000Z","updated_at":"2016-03-04T04:43:58.000Z","dependencies_parsed_at":"2022-09-26T20:52:40.100Z","dependency_job_id":null,"html_url":"https://github.com/explodes/djsonapi","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/explodes/djsonapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explodes%2Fdjsonapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explodes%2Fdjsonapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explodes%2Fdjsonapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explodes%2Fdjsonapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/explodes","download_url":"https://codeload.github.com/explodes/djsonapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explodes%2Fdjsonapi/sbom","scorecard":{"id":388258,"data":{"date":"2025-08-11","repo":{"name":"github.com/explodes/djsonapi","commit":"64da0df609ec6271ed34a66ae3330c245ee6ae17"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T17:11:38.019Z","repository_id":16598315,"created_at":"2025-08-18T17:11:38.020Z","updated_at":"2025-08-18T17:11:38.020Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33613431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-12-25T01:43:03.241Z","updated_at":"2026-05-28T14:31:01.813Z","avatar_url":"https://github.com/explodes.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"##### v1.0.0\n\nDjango JSON API Made Simple\n===========================\n\nNo more forcing your JSON to be bound to models.\n\nThis is a JSON api framework, the way it should be.\n\n- Simple\n- Flexible / Dynamic\n- Useful\n\nThe API framework uses Django Forms, so no more bull trying to validate input a certain way.\n\n# !!! Get to the code !!!\n\nHow about this?\n\nFirst: `pip install django-jsonapi`, ok now:\n\n\n```language=python\nfrom djsonapi import api, serial\n\n@serial.serializer(User, mode=\"current_user\")\ndef current_user_serializer(obj):\n    return serial.serialize_model(obj, fields=(\"name\", \"email\", \"last_login\", \"date_joined\"))\n    \n@serial.serializer(User, mode=\"public\")\ndef public_user_serializer(obj):\n    return serial.serialize_model(obj, fields=(\"name\", \"date_joined\"))\n\n@csrf_exempt\n@api.login_required\n@api.require_method(\"GET\", \"POST\") # passes post/put down, 405's if method is incorrect\n@api.post_form(forms.UserUpdateForm) # validates post/put data with form\ndef profile(request, form):\n    if form:\n        # form is guaranteed to be valid here\n        user = form.save()\n    else:\n        user = request.user\n    data = serial.serialize(user, mode=\"current_user\")\n    return api.ok(message=\"Hello World!\", user=user)\n```\nThe response could look like:\n```\n{\n  \"message\": \"Hello World!\",\n  \"body\": {\n    \"name\": \"Evan Leis\",\n    \"last_login\": \"2014-04-09T22:48:21.957Z\",\n    \"date_joined\": \"2014-04-09T22:47:08.153Z\",\n    \"email\": \"foo@example.com\",\n  },\n  \"ok\": true\n}\n```\n\nFor more code, see the example app.\n\n**Important: make sure your serializers get loaded.**\n\nEasiest way to do this is put them in a file called serial.py and in your app's `__init__.py`, load via\n```\n## myproj.myapp.__init__.py\nfrom myproj.myapp.serial import *\n```\n\n\n## `djsonapi.serial`\n\nMethods for serializing objects into dicts, and dicts into JSON.\n\n## `djsonapi.api`\n\nMethods for returning HttpResponses with JSON data.\n\nLicense\n----\nThe MIT License (MIT)\n\nCopyright (c) 2014 Evan Leis\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexplodes%2Fdjsonapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexplodes%2Fdjsonapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexplodes%2Fdjsonapi/lists"}