{"id":22295934,"url":"https://github.com/mkalioby/django-query-parser","last_synced_at":"2026-05-04T04:31:07.893Z","repository":{"id":57421509,"uuid":"307380305","full_name":"mkalioby/django-query-parser","owner":"mkalioby","description":"A django app to store and load partial queries from external  sources","archived":false,"fork":false,"pushed_at":"2020-10-28T08:11:53.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-30T16:56:55.979Z","etag":null,"topics":["django","django-models"],"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/mkalioby.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-10-26T13:23:49.000Z","updated_at":"2020-10-28T08:11:56.000Z","dependencies_parsed_at":"2022-09-07T08:21:33.638Z","dependency_job_id":null,"html_url":"https://github.com/mkalioby/django-query-parser","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mkalioby/django-query-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkalioby%2Fdjango-query-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkalioby%2Fdjango-query-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkalioby%2Fdjango-query-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkalioby%2Fdjango-query-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkalioby","download_url":"https://codeload.github.com/mkalioby/django-query-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkalioby%2Fdjango-query-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32595026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"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":["django","django-models"],"created_at":"2024-12-03T17:43:37.192Z","updated_at":"2026-05-04T04:31:07.880Z","avatar_url":"https://github.com/mkalioby.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# django-query-parser\nA django app to parse queries written outside the django app.\n\n## Idea\nSome queries are controls the business case, so it will be benefical if they are can saved outside the application like in a config file or a database so the logic can be changed without changing the code.\n\n## Samples\n1. to write an 'or'\n   ```python\n    {\"or\":{\"status_id\" : 3, \"name__icontains\":\"Ahmed\"}}\n   ```\n2. to write negation\n    ```python\n    {\"or\":{\"status_id\" : 3, \"~name__icontains\":\"Ahmed\"}}\n   ```\n3. to write an 'and'\n   ```python\n    {\"and\":{\"status_id\" : 3, \"name__icontains\":\"Ahmed\"}}\n   ```\n   or\n   ```python\n   {\"status_id\" : 3, \"name__icontains\":\"Ahmed\"}\n   ```\n## Installation\n  `pip install django-query-parser`\n\n## Example\n\nfrom test_app\n ```python\nfrom query_parser.Parser import  Parse\nd = {\"or\": {\n    \"status\": \"Completed\",\n    \"ordered_by_id\": 2\n    }}\nres = Parse(d)\nprint(Order.objects.filter(res).count())\n```\n\n## Operation Supported\n1. AND\n2. OR\n3. NOT: with a '~' in field name\n   example\n   ```python\n   d = {\"status\": \"Completed\", \"~ordered_by_id\": 1}\n   ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkalioby%2Fdjango-query-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkalioby%2Fdjango-query-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkalioby%2Fdjango-query-parser/lists"}