{"id":31320694,"url":"https://github.com/ebsaral/hfexcel","last_synced_at":"2025-10-28T13:10:13.390Z","repository":{"id":57437262,"uuid":"188669454","full_name":"ebsaral/hfexcel","owner":"ebsaral","description":"JSON to Excel in Python. :snake: Human Friendly excel creation in python. :page_facing_up: easy, advanced and smart api. json to excel conversion support.. :heart:","archived":false,"fork":false,"pushed_at":"2019-05-30T16:24:17.000Z","size":90,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-28T11:21:42.824Z","etag":null,"topics":["excel","json","json-parser","python","python3","xlsx","xlsxwriter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ebsaral.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["ebsaral"]}},"created_at":"2019-05-26T10:34:08.000Z","updated_at":"2025-04-10T15:44:07.000Z","dependencies_parsed_at":"2022-09-11T03:22:03.374Z","dependency_job_id":null,"html_url":"https://github.com/ebsaral/hfexcel","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/ebsaral/hfexcel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebsaral%2Fhfexcel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebsaral%2Fhfexcel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebsaral%2Fhfexcel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebsaral%2Fhfexcel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ebsaral","download_url":"https://codeload.github.com/ebsaral/hfexcel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebsaral%2Fhfexcel/sbom","scorecard":{"id":364837,"data":{"date":"2025-08-11","repo":{"name":"github.com/ebsaral/hfexcel","commit":"389eb71102ec8bee65ebc422bb42629fcfb5a784"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"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":"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":"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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" 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":"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":"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":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2022-238 / GHSA-h3qr-fjhm-jphw"],"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-18T11:37:44.170Z","repository_id":57437262,"created_at":"2025-08-18T11:37:44.170Z","updated_at":"2025-08-18T11:37:44.170Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276914161,"owners_count":25727294,"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-09-25T02:00:09.612Z","response_time":80,"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":["excel","json","json-parser","python","python3","xlsx","xlsxwriter"],"created_at":"2025-09-25T16:58:37.296Z","updated_at":"2025-09-25T16:58:41.203Z","avatar_url":"https://github.com/ebsaral.png","language":"Python","funding_links":["https://github.com/sponsors/ebsaral"],"categories":[],"sub_categories":[],"readme":"# hfexcel 0.0.17 [![CircleCI](https://circleci.com/gh/ebsaral/hfexcel.svg?style=svg)](https://circleci.com/gh/ebsaral/hfexcel) [![codecov](https://codecov.io/gh/ebsaral/hfexcel/branch/master/graph/badge.svg)](https://codecov.io/gh/ebsaral/hfexcel)\n\nhuman friendly excel creation in python.\nsimplicity within a certain complexity..\n\n# development versions of dependencies\n\n- Python 3.x\n- XlsxWriter==1.1.8\n- jsonschema==2.6.0\n- pytest\n- codecov\n- pytest-cov\n\n# install\n\n```\npip install hfexcel\n```\n\n# features\n\n- Human readable coding, building\n- Support for any custom json schema: flexible api to build a helper of your own. There are already two helpers which you can see in the examples.\n- Object-Obriented based readable models: `HFExcelWorkbook`, `HFExcelSheet`, `HFExcelColumn`, `HFExcelColumn`\n- `HFExcelWorkbookFilter`: Helper class to populate Excel from a JSON data (python `dict`) with a pre-defined json schema. (default:`hfexcel.schemas.DEFAULT_SCHEMA`)\n- `HFExcelWorkbook.output`: Output creation on `filename (string)` input being null, and created `output` parameter with the type `BytesIO` linked to workbook itself\n\n\n# playground\n\n- http://www.hfexcel.io/\n\n# example of converting nested objects {sheet\u003ecolumn\u003erow} input from json format into excel format\n\n```python\nfrom hfexcel import HFExcel\nfrom hfexcel.schemas import DEFAULT_SCHEMA\n\n\nexcel_data = {\n    \"sheets\": [\n        {\n            \"key\": \"sheet1\",\n            \"name\": \"Example Sheet 1\",\n            \"columns\": [\n                {\n                    \"name\": \"Column 1\",\n                    \"width\": 2,\n                    \"args\": [\n                        \"headline\"\n                    ],\n                    \"rows\": [\n                        {\n                            \"data\": \"Column 1 Row 1\"\n\n                        },\n                        {\n                            \"data\": \"Column 1 Row 2\"\n                        }\n                    ]\n                },\n                {\n                    \"name\": \"Column 2\",\n                    \"rows\": [\n                        {\n                            \"data\": \"Column 2 Row 1\",\n                        },\n                        {\n                            \"data\": \"Column 2 Row 2\",\n                        }\n                    ]\n                },\n                {\n                    \"name\": \"Column 3\",\n                    \"rows\": [\n                        {\n                            \"data\": \"Column 3 Row 1\"\n                        },\n                        {\n                            \"data\": \"Column 3 Row 2\"\n                        }\n                    ]\n                }\n            ]\n        }\n    ],\n    \"styles\": [\n        {\n            \"name\": \"headline\",\n            \"style\": {\n                \"bold\": 1,\n                \"font_size\": 14,\n                \"font\": \"Arial\",\n                \"align\": \"center\"\n            }\n        }\n    ]\n}\n\nhf_workbook = HFExcel.hf_workbook('example.xlsx', set_default_styles=False)\nhf_workbook.filter().populate_with_json(excel_data, schema=DEFAULT_SCHEMA)\nhf_workbook.save()\n```\n\n# example of object-oriented python syntax\n\n```python\nfrom hfexcel import HFExcel\n\nhf_workbook = HFExcel.hf_workbook('example.xlsx', set_default_styles=False)\n\nhf_workbook.add_style(\n    \"headline\", \n    {\n        \"bold\": 1,\n        \"font_size\": 14,\n        \"font\": \"Arial\",\n        \"align\": \"center\"\n    }\n)\n\nsheet1 = hf_workbook.add_sheet(\"sheet1\", name=\"Example Sheet 1\")\n\ncolumn1, _ = sheet1.add_column('headline', name='Column 1', width=2)\ncolumn1.add_row(data='Column 1 Row 1')\ncolumn1.add_row(data='Column 1 Row 2')\n\ncolumn2, _ = sheet1.add_column(name='Column 2')\ncolumn2.add_row(data='Column 2 Row 1')\ncolumn2.add_row(data='Column 2 Row 2')\n\n\ncolumn3, _ = sheet1.add_column(name='Column 3')\ncolumn3.add_row(data='Column 3 Row 1')\ncolumn3.add_row(data='Column 3 Row 2')\n\n# In order to get a row with coordinates:\n# sheet[column_index][row_index] =\u003e row\nprint(sheet1[1][1].data)\nassert(sheet1[1][1].data == 'Column 2 Row 2')\n\nhf_workbook.save()\n```\n\n# example of converting inline index-based {sheet\u003e[column:row]} input from json format into excel format\n\n\n```python\nfrom hfexcel import HFExcel\nfrom hfexcel.extras import InlineInputHelper\n\nexcel_data = {\n    \"sheets\": [\n        {\n            \"key\": \"sheet1\",\n            \"name\": \"Example Sheet 1\",\n            \"columns\": [\n                {\n                    \"name\": \"Column 1\",\n                    \"width\": 2,\n                    \"args\": [\n                        \"headline\"\n                    ]\n                },\n                {\n                    \"name\": \"Column 2\"\n                }\n            ],\n            \"rows\": [\n                [\n                    {\n                        \"data\": \"Column 1 Row 1\"\n\n                    },\n                    {\n                        \"data\": \"Column 2 Row 1\"\n                    }\n                ],\n                [\n                    {\n                        \"data\": \"Column 1 Row 2\"\n\n                    },\n                    {\n                        \"data\": \"Column 2 Row 2\"\n                    }\n                ]\n            ]\n        }\n    ],\n    \"styles\": [\n        {\n            \"name\": \"headline\",\n            \"style\": {\n                \"bold\": 1,\n                \"font_size\": 14,\n                \"font\": \"Arial\",\n                \"align\": \"center\"\n            }\n        }\n    ]\n}\n\nhf_workbook = HFExcel.hf_workbook(filename, set_default_styles=False)\nInlineInputHelper(hf_workbook).populate_with_json(excel_data)\nhf_workbook.save()\nreturn True\n```\n\n# example output file\n\n- https://github.com/ebsaral/hfexcel/blob/master/example.xlsx\n\n# contributors\n\n- @ebsaral - author\n- feel free to contribute\n\n# dependencies\n\n- @jmcnamara: Based on XlsxWriter https://github.com/jmcnamara/XlsxWriter (to have a human readable object-oriented design on writing Excel documents)\n- @Julian: JSON Schema Validation, jsonschema https://github.com/Julian/jsonschema\n\n# warning\n\n- Happy path tests are written.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febsaral%2Fhfexcel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Febsaral%2Fhfexcel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febsaral%2Fhfexcel/lists"}