{"id":34109028,"url":"https://github.com/knroy/django-pds","last_synced_at":"2026-04-05T11:32:55.977Z","repository":{"id":57421215,"uuid":"259966535","full_name":"knroy/django-pds","owner":"knroy","description":"django-pds (Platform Data Service) :: Faster REST API development using Django and mongodb with row level security and out of the box built in frontend query support. Main focus of this library is to reduce backend work for your software.","archived":false,"fork":false,"pushed_at":"2020-08-20T15:30:17.000Z","size":928,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-03T06:18:04.807Z","etag":null,"topics":["django","django-rest-api","django-rest-framework","jwt-authentication","mongodb","mongoengine"],"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/knroy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-29T15:34:36.000Z","updated_at":"2025-10-01T13:58:54.000Z","dependencies_parsed_at":"2022-09-10T23:20:29.245Z","dependency_job_id":null,"html_url":"https://github.com/knroy/django-pds","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/knroy/django-pds","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knroy%2Fdjango-pds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knroy%2Fdjango-pds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knroy%2Fdjango-pds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knroy%2Fdjango-pds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knroy","download_url":"https://codeload.github.com/knroy/django-pds/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knroy%2Fdjango-pds/sbom","scorecard":{"id":564914,"data":{"date":"2025-08-11","repo":{"name":"github.com/knroy/django-pds","commit":"75f192eb38acf1ae98cba7034e8768750848e639"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":0.6,"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"Binary-Artifacts","score":1,"reason":"binaries present in source code","details":["Warn: binary detected: sample/mongo_django/__pycache__/manage.cpython-38.pyc:1","Warn: binary detected: sample/mongo_django/api/__pycache__/__init__.cpython-38.pyc:1","Warn: binary detected: sample/mongo_django/api/__pycache__/models.cpython-38.pyc:1","Warn: binary detected: sample/mongo_django/api/__pycache__/urls.cpython-38.pyc:1","Warn: binary detected: sample/mongo_django/api/__pycache__/views.cpython-38.pyc:1","Warn: binary detected: sample/mongo_django/mongo_django/__pycache__/__init__.cpython-38.pyc:1","Warn: binary detected: sample/mongo_django/mongo_django/__pycache__/settings.cpython-38.pyc:1","Warn: binary detected: sample/mongo_django/mongo_django/__pycache__/urls.cpython-38.pyc:1","Warn: binary detected: sample/mongo_django/mongo_django/__pycache__/wsgi.cpython-38.pyc:1"],"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE: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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.0.4 not signed: https://api.github.com/repos/knroy/django-pds/releases/26786386","Warn: release artifact v0.0.3 not signed: https://api.github.com/repos/knroy/django-pds/releases/26483658","Warn: release artifact v0.0.4 does not have provenance: https://api.github.com/repos/knroy/django-pds/releases/26786386","Warn: release artifact v0.0.3 does not have provenance: https://api.github.com/repos/knroy/django-pds/releases/26483658"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":0,"reason":"17 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2020-32 / GHSA-2m34-jcjv-45xf","Warn: Project is vulnerable to: PYSEC-2021-98 / GHSA-68w8-qjq3-2gfm","Warn: Project is vulnerable to: GHSA-7xr5-9hcq-chf9","Warn: Project is vulnerable to: GHSA-8x94-hmjh-97hq","Warn: Project is vulnerable to: PYSEC-2020-34 / GHSA-fr28-569j-53c4","Warn: Project is vulnerable to: PYSEC-2021-9 / GHSA-fvgf-6h6h-3322","Warn: Project is vulnerable to: PYSEC-2020-33 / GHSA-m6gj-h9gm-gw44","Warn: Project is vulnerable to: PYSEC-2021-99 / GHSA-p99v-5w3c-jqq9","Warn: Project is vulnerable to: GHSA-rrqc-c2jx-6jgv","Warn: Project is vulnerable to: GHSA-rxjp-mfm9-w4wr","Warn: Project is vulnerable to: GHSA-v6rh-hp5x-86rv","Warn: Project is vulnerable to: PYSEC-2020-31 / GHSA-wpjr-j57x-wxfw","Warn: Project is vulnerable to: PYSEC-2021-6 / GHSA-xgxc-v2qg-chmh","Warn: Project is vulnerable to: GHSA-xpfp-f569-q3p2","Warn: Project is vulnerable to: PYSEC-2020-263 / GHSA-fx83-3ph3-9j2q","Warn: Project is vulnerable to: GHSA-gw84-84pc-xp82","Warn: Project is vulnerable to: PYSEC-2022-202 / GHSA-ffqj-6fqr-9h24"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T14:42:55.313Z","repository_id":57421215,"created_at":"2025-08-20T14:42:55.313Z","updated_at":"2025-08-20T14:42:55.313Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31434624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T08:13:15.228Z","status":"ssl_error","status_checked_at":"2026-04-05T08:13:11.839Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["django","django-rest-api","django-rest-framework","jwt-authentication","mongodb","mongoengine"],"created_at":"2025-12-14T18:25:20.488Z","updated_at":"2026-04-05T11:32:55.939Z","avatar_url":"https://github.com/knroy.png","language":"Python","readme":"|Info:|Faster REST API development using Django and mongodb|\n|---|---|\n|Repository:|[https://github.com/knroy/django-pds](https://github.com/knroy/django-pds)|\n\npds stands for platform data service. you need to create rest api faster? just a few configuration and let's go? django-pds is here to help.\n\n`django-pds` :: Faster REST API development using Django and mongodb with row level security and out of the box built in frontend query support.\n\n`django-pds` provides few sophisticated methods, configurable to create REST API with Django and MongoDB faster.\n\n## quick start\n\nInstall:\n\n```python\npip install django-pds\n```\n\nCreate new app:\n\n```python\npython manage.py startapp api\n```\n\nAdd `django-pds` and `api` app in `INSTALLED_APPS` in `settings`. As we are going to use rest api, `rest_framework` and `corsheaders` apps are needed too. `django_pds` built on top of [`MongoEngine`](https://github.com/MongoEngine/mongoengine) and [`Django`](https://www.djangoproject.com/). When you use `MongoEngine`, admin is not supported directly. So, the basic structure of `INSTALLED_APPS` list is like below,\n\n```python\nINSTALLED_APPS = [\n    'rest_framework',\n    'django.contrib.staticfiles',\n    'corsheaders',\n    'django_pds',\n    'api'\n]\n```\n\n\ndjango `settings` file will be looking like the following code:\n\n```python\n.....\n\nimport mongoengine\n\n...\n...\n\nALLOWED_HOSTS = ['*']\n\nREST_FRAMEWORK = {\n    'UNAUTHENTICATED_USER': None\n}\n\nINSTALLED_APPS = [\n    'rest_framework',\n    'django.contrib.staticfiles',\n    'corsheaders',\n    'django_pds',\n    'api'\n]\n\nMIDDLEWARE = [\n    'corsheaders.middleware.CorsMiddleware',\n    'django.middleware.common.CommonMiddleware'\n]\n\nCORS_ORIGIN_ALLOW_ALL = True\n\nCORS_ALLOW_METHODS = (\n    'DELETE',\n    'GET',\n    'OPTIONS',\n    'PATCH',\n    'POST',\n    'PUT',\n)\n\n.....\n.....\n.....\n\nDATABASES = {}\n# mongodb connection\nMONGODB_DATABASE_NAME = 'django_pds_db'\nmongoengine.connect(MONGODB_DATABASE_NAME)\n\n.....\n.....\n```\n\ndefining document schema:\n\n```python\nfrom mongoengine import *\n\nfrom django_pds.core.base import SimpleBaseDocument\n\nclass Page(SimpleBaseDocument):\n    title = StringField(max_length=200, required=True)\n    tags = ListField(StringField(required=True), required=True)\n```\n\nCreate Insert Rest API:\n\ncreate a class named `RestInsert` in `api` app `views.py` file\n\n```python\nimport json\nfrom uuid import uuid4\n\nfrom rest_framework import status\nfrom rest_framework.response import Response\n\nfrom django_pds.core.pds.generic import data_insert\nfrom django_pds.core.rest.response import error_response, success_response\nfrom django_pds.core.rest.views import BaseAPIView\n\n\nclass RestInsert(BaseAPIView):\n\n    def post(self):\n        try:\n            \n            document_name = 'Page'\n            data = {\n                \"ItemId\": str(uuid4()),\n                \"title\": \"Using django-pds\",\n                \"tags\": [\"django\", \"django-pds\", \"mongoengine\"]\n            }\n            \n            # as we are not checking row level security,\n            # ignoring offered row level security\n            \n            error, result = data_insert(document_name, data, ignore_security=True)\n            \n            if error:\n                response = error_response(result)\n                return Response(response, status=status.HTTP_400_BAD_REQUEST)\n            response = success_response(result)\n            return Response(response, status=status.HTTP_400_BAD_REQUEST)\n            \n        except BaseException as e:\n            response = error_response(str(e))\n            return Response(response, status=status.HTTP_400_BAD_REQUEST)\n```\n\nadd the view in `api.urls.py`:\n\n```python\nfrom django.urls import re_path\n\nfrom .views import RestInsert\n\nurlpatterns = [\n    re_path(r'^insert$', RestInsert.as_view(), name='rest api insert'),\n]\n```\n\nand add rest api app in the app `app_name.urls`:\n\n```python\nfrom django.urls import include, re_path\n\nurlpatterns = [\n    re_path(r'^rest_api/', include('api.urls'))\n]\n```\n\nhow to make it dynamic? How to send data with request or from frontend and collect them in the API from the request and insert into the database?\n\nwe need to change the `RestInsert` API View a little bit, here it goes:\n\n```python\nfrom django_pds.core.rest.decorators import required\n....\n\nclass RestInsert(BaseAPIView):\n\n    # required decorator check request.data \n    # before calling the post method for these required params\n    @required(\"document_name\", \"data\")\n    def post(self, request):\n        try:\n            \n            # we are expecting payload with the request\n            \n            document_name = request.data['document_name']\n            data = request.data['data']\n            \n            # as we are not checking row level security,\n            # ignoring offered row level security\n    .....\n```\n\nand to request to this REST API endpoint, use `postman` or `curl`.\n\ncurl request:\n\n```\ncurl --header \"Content-Type: application/json\" \\\n  --request POST \\\n  --data '{\n\t\"document_name\": \"Page\",\n\t\"data\": {\n\t\t\"ItemId\": \"30447042-e0a3-4f15-8fd0-b3742d9538a9\", \n\t\t\"title\": \"django pds test page\", \n\t\t\"tags\": [\"mongoengine\", \"django-pds\"]\n\t}\n}' \\\n  http://localhost:8000/rest_api/insert\n```\n\nor using postman:\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/knroy/django-pds/blob/master/docs/img/insert-request-postman.png?raw=true\"\u003e\n\u003c/p\u003e\n\nContinue reading the [django-pds wiki](https://github.com/knroy/django-pds/wiki) to know about CRUD operation made easy with Django PDS.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknroy%2Fdjango-pds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknroy%2Fdjango-pds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknroy%2Fdjango-pds/lists"}