{"id":18403737,"url":"https://github.com/russellluo/onefilter","last_synced_at":"2025-04-12T19:11:44.041Z","repository":{"id":57448666,"uuid":"77806196","full_name":"RussellLuo/onefilter","owner":"RussellLuo","description":"One filter for all structured data.","archived":false,"fork":false,"pushed_at":"2017-05-10T14:08:55.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-16T04:17:05.703Z","etag":null,"topics":[],"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/RussellLuo.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}},"created_at":"2017-01-02T02:16:55.000Z","updated_at":"2017-01-07T02:41:32.000Z","dependencies_parsed_at":"2022-09-26T17:31:04.179Z","dependency_job_id":null,"html_url":"https://github.com/RussellLuo/onefilter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RussellLuo%2Fonefilter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RussellLuo%2Fonefilter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RussellLuo%2Fonefilter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RussellLuo%2Fonefilter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RussellLuo","download_url":"https://codeload.github.com/RussellLuo/onefilter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618279,"owners_count":21134201,"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":[],"created_at":"2024-11-06T02:48:02.520Z","updated_at":"2025-04-12T19:11:44.020Z","avatar_url":"https://github.com/RussellLuo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OneFilter\n\nOne filter for all structured data.\n\n\n## Getting started\n\n```pycon\n\u003e\u003e\u003e from onefilter import F, And, Or, Eq, In, Gte, Lte, Exists\n\u003e\u003e\u003e from onefilter.es import ES\n\u003e\u003e\u003e f = F(a=1, b=In(2, 3, 4), c=And(Gte(5), Lte(9)), d=Or(Exists(False), Eq(0)))\n\u003e\u003e\u003e c = ES(f)\n\u003e\u003e\u003e import pprint; pprint.pprint(c)\n{'bool': {'must': [{'term': {'a': 1}},\n                   {'range': {'c': {'gte': 5, 'lte': 9}}},\n                   {'terms': {'b': [2, 3, 4]}},\n                   {'bool': {'should': [{'must_not': {'exists': {'field': 'd'}}},\n                                        {'term': {'d': 0}}]}}]}}\n```\n\n\n## License\n\n[MIT][3]\n\n\n[3]: http://opensource.org/licenses/MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frussellluo%2Fonefilter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frussellluo%2Fonefilter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frussellluo%2Fonefilter/lists"}