{"id":19756288,"url":"https://github.com/mrbuslov/list-search","last_synced_at":"2026-02-23T09:44:34.793Z","repository":{"id":258151218,"uuid":"869668299","full_name":"mrbuslov/list-search","owner":"mrbuslov","description":"Search in list of dictionaries with lookups! Like in ORM!","archived":false,"fork":false,"pushed_at":"2024-10-26T18:38:13.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-18T08:37:18.256Z","etag":null,"topics":["lookup","memory-searching","orm","python","python-search","search","simple-search","sql"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrbuslov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-10-08T17:22:57.000Z","updated_at":"2024-10-26T18:38:16.000Z","dependencies_parsed_at":"2024-10-17T21:13:28.988Z","dependency_job_id":"3774fa9a-3b80-4e0d-adf3-fe9658d2a08e","html_url":"https://github.com/mrbuslov/list-search","commit_stats":null,"previous_names":["mrbuslov/list-search"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mrbuslov/list-search","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrbuslov%2Flist-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrbuslov%2Flist-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrbuslov%2Flist-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrbuslov%2Flist-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrbuslov","download_url":"https://codeload.github.com/mrbuslov/list-search/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrbuslov%2Flist-search/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271812801,"owners_count":24826396,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"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":["lookup","memory-searching","orm","python","python-search","search","simple-search","sql"],"created_at":"2024-11-12T03:15:30.945Z","updated_at":"2025-11-01T07:03:53.874Z","avatar_url":"https://github.com/mrbuslov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\nSearch in list of dictionaries with lookups! Like in ORM!  \nSay goodbye to complicated loops and conditions when searching through lists of dictionaries!  \nWith this simple Python tool, you can easily filter and find what you need using ORM-style lookups, making data searches\nfeel smooth and intuitive.\n\n# How to install\n```\npip install list_search\n```\n\n# How to use\n\nYou can search non-complex types like `int`, `string`, `bool`, etc. in list\n\n```python\nfrom list_search import search\n\nlst = [1, 2, 3, 'apple', 'banana', True, False]\nresult = search(lst, 'apple')\n```\n\nOutput\n\n```\n['apple']\n```\n\n---\nOr you can search complex objects - `list` or `dict`. If `list` - finds full match. If `dict` - finds by fields  \nThe advantage of this approach is that you can put ONLY the fields **you need**, NOT the whole dict!  \nLookups: \n```\n__in\n__contains\n__contains_elements_from_list\n__gt\n__gte\n__lt\n__lte\n__isnull\n```\nUp to date lookups you can find in `SUPPORTED_FILTERING_LOOKUPS`\n\n```python\nfrom list_search import search\n\nlst = [\n    {\n        \"author\": {\n            \"name\": \"John\",\n            \"last_name\": \"Wick\",\n        },\n        \"books\": [\n            \"Book 1\",\n            \"Book 2\"\n        ],\n        \"birth_year\": 1950\n    },\n    {\n        \"author\": {\n            \"name\": \"Jack\",\n            \"last_name\": \"Thompson\",\n        },\n        \"books\": [\n            \"Another Book 1\",\n            \"Another Book 2\"\n        ],\n        \"birth_year\": 1930\n    }\n]\n\n# search by the fields you need WITH LOOKUPS! \n# You can put only one field, and the elements will be filtered out.\nquery = {\n    \"author.name\": \"John\",\n    \"books__contains_elements_from_list\": [\"Book 2\"],\n    \"birth_year__gte\": 1945\n}\nresult = search(lst, query)\n```\n\nOutput\n\n```\n{\n    \"author\": {\n        \"name\": \"John\",\n        \"last_name\": \"Wick\",\n    },\n    \"books\": [\n        \"Book 1\",\n        \"Book 2\"\n    ],\n    \"birth_year\": 1950\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrbuslov%2Flist-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrbuslov%2Flist-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrbuslov%2Flist-search/lists"}