{"id":16668634,"url":"https://github.com/csurfer/ezread","last_synced_at":"2026-04-15T17:32:28.670Z","repository":{"id":57427940,"uuid":"249605395","full_name":"csurfer/ezread","owner":"csurfer","description":"Ridiculously simple way to index/fetch items from within the JSON list.","archived":false,"fork":false,"pushed_at":"2020-03-24T08:25:33.000Z","size":10,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-26T06:48:21.790Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csurfer.png","metadata":{"files":{"readme":"README.rst","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-03-24T03:38:52.000Z","updated_at":"2020-03-31T18:22:03.000Z","dependencies_parsed_at":"2022-09-09T05:00:55.411Z","dependency_job_id":null,"html_url":"https://github.com/csurfer/ezread","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/csurfer/ezread","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csurfer%2Fezread","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csurfer%2Fezread/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csurfer%2Fezread/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csurfer%2Fezread/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csurfer","download_url":"https://codeload.github.com/csurfer/ezread/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csurfer%2Fezread/sbom","scorecard":{"id":311481,"data":{"date":"2025-08-11","repo":{"name":"github.com/csurfer/ezread","commit":"c9ff356f4550bbdc8a0eb875488b25b80ee9dce4"},"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/7 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":"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":"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":"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":"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":"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":"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":"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":"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"}},{"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"}}]},"last_synced_at":"2025-08-17T23:14:45.502Z","repository_id":57427940,"created_at":"2025-08-17T23:14:45.502Z","updated_at":"2025-08-17T23:14:45.502Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31852797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"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":[],"created_at":"2024-10-12T11:26:15.375Z","updated_at":"2026-04-15T17:32:28.649Z","avatar_url":"https://github.com/csurfer.png","language":"Python","funding_links":["https://paypal.me/csurfer"],"categories":[],"sub_categories":[],"readme":"ezread\n======\n\n|pypiv| |pyv| |Build| |Coverage| |Licence|\n\n------------------------------------------\n\nezread provides a ridiculously simple way to fetch items within the JSON list.\n\nFeatures\n--------\n\n* Ridiculously simple interface.\n* Known JSON format for indexing helps understand what we are fetching and how.\n* Easily procure relevant data from the JSON list for further processing.\n* Natively supported nested indexing.\n\nSetup\n-----\n\nUsing pip\n~~~~~~~~~\n\n.. code:: bash\n\n    pip install ezread\n\nDirectly from the repository\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: bash\n\n    git clone https://github.com/csurfer/ezread.git\n    python ezread/setup.py install\n\nDocumentation\n-------------\n\nModes of operation\n~~~~~~~~~~~~~~~~~~\n\n1. **Strict**: In this mode, the reader raises an exception if the \"index\" or the \"key\" to be read is not found.\n\n2. **Non-Strict**: In this mode, the reader simply returns None if the \"index\" or the \"key\" to be read is not found.\n\nAPI Usage\n~~~~~~~~~\n\n.. code:: python3\n\n    from ezread import EzReader\n\n    # For strict mode\n    reader = EzReader(\u003ctemplate with index/key details\u003e)\n    reader.read(\u003cjson text with list of dicts or lists\u003e)\n\n    # For non strict mode\n    reader = EzReader(\u003ctemplate with index/key details\u003e, strict=False)\n    reader.read(\u003cjson text with list of dicts or lists\u003e)\n\nTemplate Guide\n~~~~~~~~~~~~~~\n\nThe template provided to EzReader is very important as it defines what \"index\" or \"key\" needs to be read. We expect the template to be in JSON format to provide it some structure. Let's take a few examples and understand how you can specify the items to read from the JSON list that you have.\n\nLet's take the following JSON list of lists.\n\n.. code:: json\n\n    [\n        [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],\n        [2, 4, 6, 8, 10, 12, 14, 16, 18, 20],\n        [3, 6, 9, 12, 15, 18, 21, 24, 27, 30]\n    ]\n\n**Say you want to fetch 0th index of every list, what would the template look like?**\n\n.. code:: json\n\n    [0]\n\nThe rows returned would be\n\n.. code:: text\n\n    [1]\n    [2]\n    [3]\n\n**Say you want to fetch 0th, 2nd and 4th index of every list, what would the template look like?**\n\n.. code:: json\n\n    [0, 2, 4]\n\nThe rows returned would be\n\n.. code:: text\n\n    [1, 3, 5]\n    [2, 6, 10]\n    [3, 9, 15]\n\nLet's delve a little deeper into index templates with the following JSON list of dicts.\n\n.. code:: json\n\n    [\n        {\n            \"name\": \"Tom\",\n            \"age\": 30,\n            \"address\": {\n                \"street\": [\"124 Lincoln St\", \"West Village\"],\n                \"city\": \"New York\",\n                \"state\": \"NYC\"\n            }\n        },\n        {\n            \"name\": \"Dick\",\n            \"age\": 20,\n            \"address\": {\n                \"street\": [\"125 Lincoln St\", \"West Village\"],\n                \"city\": \"New York\",\n                \"state\": \"NYC\"\n            }\n        },\n        {\n            \"name\": \"Harry\",\n            \"age\": 40,\n            \"address\": {\n                \"street\": [\"50 Vinci Lane\", \"\"],\n                \"city\": \"San Fransisco\",\n                \"state\": \"CA\"\n            }\n        }\n    ]\n\n**Say you want to fetch name from every dict in the list, what would the template look like?**\n\n.. code:: json\n\n    [\"name\"]\n\nThe rows returned would be\n\n.. code:: text\n\n    [\"Tom\"]\n    [\"Dick\"]\n    [\"Harry\"]\n\n**Say you want to fetch name and age from every dict in the list, what would the template look like?**\n\n.. code:: json\n\n    [\"name\", \"age\"]\n\nThe rows returned would be\n\n.. code:: text\n\n    [\"Tom\", 30]\n    [\"Dick\", 20]\n    [\"Harry\", 40]\n\n**Let's say your query is a little bit complicated. You want to fetch name and city a person lives in, what would the template look like?**\n\nYou can use lists for nested indexing. Here you want to use \"address\" and from within it you want to fetch \"city\". You can achieve it as follows\n\n.. code:: json\n\n    [\"name\", [\"address\", \"city\"]]\n\nThe rows returned would be\n\n.. code:: text\n\n    [\"Tom\", \"New York\"]\n    [\"Dick\", \"New York\"]\n    [\"Harry\", \"San Fransisco\"]\n\n**Does nested indexing always have to be dictionary keys?**\n\nNo nested indexing can be dictionary keys or (0-indexed) index within a list. Let's fetch \"name\" and \"first row of address\" for each contact.\n\n.. code:: json\n\n    [\"name\", [\"address\", \"street\", 0]]\n\nThe rows returned would be\n\n.. code:: text\n\n    [\"Tom\", \"124 Lincoln St\"]\n    [\"Dick\", \"125 Lincoln St\"]\n    [\"Harry\", \"50 Vinci Lane\"]\n\nNon-Strict mode of query\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n**So how does Non-Strict mode of query behave?**\n\nSay we asked for \"name\" and \"hometown\" from the previous JSON example. Since \"hometown\" is not a key in the JSON, it would fail with \"KeyError\" in strict mode. Similarly if we were accessing a list and tried to access an index which is not present it would end up throwing \"IndexOutOfBoundsError\" in strict mode.\n\nThe same query in non-srict mode would return the correct value for key/indexes it can fetch and None for others.\n\n.. code:: json\n\n    [\"name\", \"hometown\"]\n\nThe rows returned would be\n\n.. code:: text\n\n    [\"Tom\", None]\n    [\"Dick\", None]\n    [\"Harry\", None]\n\n\nCommandline tool\n~~~~~~~~~~~~~~~~\n\nCommandline tool provided with this library serves as an easy way to fetch the needed items as CSV file output.\n\n**Usage**\n\n.. code:: bash\n\n    # For help\n    ezread --help\n\n    # To use template string directly\n    ezread --template_str \u003cindex template string\u003e \u003cjson file to read\u003e\n\n    # To use template string from a file\n    ezread --template_file \u003cfile with index template string\u003e \u003cjson file to read\u003e\n\n    # By default it uses \",\" as the separator. If you want a different separator you can use --separator option.\n    # We use the strict mode by default. If you want to use non-strict mode use --nonstrict\n\nContributing\n------------\n\nBug Reports and Feature Requests\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nPlease use `issue tracker`_ for reporting bugs or feature requests.\n\nDevelopment\n~~~~~~~~~~~\n\nPull requests are most welcome.\n\n\nBuy the developer a cup of coffee!\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIf you found the utility helpful you can buy me a cup of coffee using\n\n|Donate|\n\n.. |Donate| image:: https://www.paypalobjects.com/webstatic/en_US/i/btn/png/silver-pill-paypal-44px.png\n   :target: https://paypal.me/csurfer\n\n.. _issue tracker: https://github.com/csurfer/ezread/issues\n\n.. |Licence| image:: https://img.shields.io/badge/license-MIT-blue.svg\n   :target: https://raw.githubusercontent.com/csurfer/ezread/master/LICENSE\n\n.. |Build| image:: https://travis-ci.org/csurfer/ezread.svg?branch=master\n   :target: https://travis-ci.org/csurfer/ezread\n\n.. |Coverage| image:: https://coveralls.io/repos/github/csurfer/ezread/badge.svg?branch=master\n   :target: https://coveralls.io/github/csurfer/ezread?branch=master\n\n.. |pypiv| image:: https://img.shields.io/pypi/v/ezread.svg\n   :target: https://pypi.python.org/pypi/ezread\n\n.. |pyv| image:: https://img.shields.io/pypi/pyversions/ezread.svg\n   :target: https://pypi.python.org/pypi/ezread\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsurfer%2Fezread","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsurfer%2Fezread","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsurfer%2Fezread/lists"}