{"id":28805964,"url":"https://github.com/jarryshaw/dictdumper","last_synced_at":"2025-12-13T17:10:00.589Z","repository":{"id":32896421,"uuid":"123921210","full_name":"JarryShaw/DictDumper","owner":"JarryShaw","description":"Python dict formatted dumper.","archived":false,"fork":false,"pushed_at":"2025-01-11T02:25:35.000Z","size":1213,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-20T04:48:24.263Z","etag":null,"topics":["dumper","formatting","stream-format"],"latest_commit_sha":null,"homepage":"https://jarryshaw.github.io/DictDumper/","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/JarryShaw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":null,"patreon":"jarryshaw","open_collective":null,"ko_fi":null,"tidelift":"pypi/dictdumper","community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-03-05T13:09:49.000Z","updated_at":"2024-11-03T20:43:42.000Z","dependencies_parsed_at":"2023-07-13T08:31:21.912Z","dependency_job_id":"5ab1c3e4-1098-4bb2-9594-cbfebb4d6904","html_url":"https://github.com/JarryShaw/DictDumper","commit_stats":{"total_commits":278,"total_committers":6,"mean_commits":"46.333333333333336","dds":0.5323741007194245,"last_synced_commit":"62e3b736625a5ceb65cada1cee01600c63f39d0e"},"previous_names":["jarryshaw/jsformat"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/JarryShaw/DictDumper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JarryShaw%2FDictDumper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JarryShaw%2FDictDumper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JarryShaw%2FDictDumper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JarryShaw%2FDictDumper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JarryShaw","download_url":"https://codeload.github.com/JarryShaw/DictDumper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JarryShaw%2FDictDumper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260537205,"owners_count":23024563,"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":["dumper","formatting","stream-format"],"created_at":"2025-06-18T10:44:01.598Z","updated_at":"2025-12-13T17:10:00.564Z","avatar_url":"https://github.com/JarryShaw.png","language":"Python","funding_links":["https://patreon.com/jarryshaw","https://tidelift.com/funding/github/pypi/dictdumper"],"categories":[],"sub_categories":[],"readme":"# DictDumper\n\n\u0026emsp; The `dictdumper` project is an open source Python program works as a stream formatted output dumper for `dict`.\n\n- [About](#about)\n    * `dictdumper.Dumper`\n    * `dictdumper.JSON`\n    * `dictdumper.PLIST`\n    * `dictdumper.Tree`\n    * `dictdumper.XML`\n    * `dictdumper.HTML`\n- [Installation](#installation)\n- [Usage](#usage)\n\n---\n\n### About\n\n\u0026emsp; Currently, it supports following formats --\n\n - `dictdumper.Dumper` -- abstract base class of all dumpers\n - `dictdumper.JSON` -- dump JavaScript object notation (`JSON`) format file\n - `dictdumper.PLIST` -- dump Apple property list (`PLIST`) format file\n - `dictdumper.Tree` -- dump tree-view text (`TXT`) format file\n - `dictdumper.XML` -- dump extensible markup language (`XML`) file (__base class__)\n - `dictdumper.HTML` -- dump JavaScript file under `Vue.js` framework (__DEPRECATED__)\n\n![](https://github.com/JarryShaw/dictdumper/blob/master/doc/dictdumper.png)\n\n\u0026nbsp;\n\n### Installation:\n\n\u003e Note that `dictdumper` supports Python versions __2.7__ and all versions __since 3.0__\n\n```\npip install dictdumper\n```\n\n\u0026nbsp;\n\n### Usage\n\n\u0026emsp; `dictdumper` is quite easy to use. After installation, importation, and initialisation, you can simple call the instance to dump contents.\n\n\u003e Take `dictdumper.Tree` for example\n\n```python\nimport dictdumper\ndumper = dictdumper.Tree('out.txt')\ntest_1 = dict(\n    foo=-1,\n    bar='Hello, world!',\n    boo=dict(\n        foo_again=True,\n        bar_again=memoryview(b'bytes'),\n        boo_again=None,\n    ),\n)\ndumper(test_1, name='test_1')\n```\n```\n$ cat out.txt\ntest_1\n  |-- foo -\u003e -1\n  |-- bar -\u003e Hello, world!\n  |-- boo\n        |-- foo_again -\u003e True\n        |-- bar_again\n        |     |-- type -\u003e memoryview\n        |     |-- value -\u003e 62 79 74 65 73\n        |     |-- text -\u003e bytes\n        |-- boo_again -\u003e NIL\n```\n```python\nimport datetime\ntest_2 = dict(\n    foo=[1, 2.0, 3],\n    bar=(1.0, bytearray(b'a long long bytes'), 3.0),\n    boo=dict(\n        foo_again=b'bytestring',\n        bar_again=datetime.datetime(2020, 1, 31, 20, 15, 10, 163010),\n        boo_again=float('-inf'),\n    ),\n)\ndumper(test_2, name='test_2')\n```\n```\n$ cat out.txt\ntest_1\n  |-- foo -\u003e -1\n  |-- bar -\u003e Hello, world!\n  |-- boo\n        |-- foo_again -\u003e True\n        |-- bar_again\n        |     |-- type -\u003e memoryview\n        |     |-- value -\u003e 62 79 74 65 73\n        |     |-- text -\u003e bytes\n        |-- boo_again -\u003e NIL\n\ntest_2\n  |-- foo\n  |     |--\u003e 1\n  |     |--\u003e 2.0\n  |     |--\u003e 3\n  |-- bar\n  |     |-- type -\u003e tuple\n  |     |-- value\n  |           |--\u003e 1.0\n  |           |--\u003e --\n  |           |     |-- type -\u003e bytearray\n  |           |     |-- value\n  |           |     |     |--\u003e 61 20 6c 6f 6e 67 20 6c 6f 6e 67 20 62 79 74 65\n  |           |     |          73\n  |           |     |-- text -\u003e a long long bytes\n  |           |--\u003e 3.0\n  |-- boo\n        |-- foo_again -\u003e 62 79 74 65 73 74 72 69 6e 67\n        |-- bar_again -\u003e 2020-01-31T20:15:10.163010\n        |-- boo_again -\u003e -Infinity\n```\n```python\ntest_3 = dict(\n    foo=\"stringstringstringstringstringstringstringstringstringstring\",\n    bar=[\n        \"s1\", False, \"s3\",\n    ],\n    boo=[\n        \"s4\", dict(s=\"5\", j=\"5\"), \"s6\"\n    ],\n    far=dict(\n        far_foo=[\"s1\", \"s2\", \"s3\"],\n        far_var=\"s4\",\n    ),\n    biu=float('nan'),\n)\ndumper(test_3, name='test_3')\n```\n```\n$ cat out.txt\ntest_1\n  |-- foo -\u003e -1\n  |-- bar -\u003e Hello, world!\n  |-- boo\n        |-- foo_again -\u003e True\n        |-- bar_again\n        |     |-- type -\u003e memoryview\n        |     |-- value -\u003e 62 79 74 65 73\n        |     |-- text -\u003e bytes\n        |-- boo_again -\u003e NIL\n\ntest_2\n  |-- foo\n  |     |--\u003e 1\n  |     |--\u003e 2.0\n  |     |--\u003e 3\n  |-- bar\n  |     |-- type -\u003e tuple\n  |     |-- value\n  |           |--\u003e 1.0\n  |           |--\u003e --\n  |           |     |-- type -\u003e bytearray\n  |           |     |-- value\n  |           |     |     |--\u003e 61 20 6c 6f 6e 67 20 6c 6f 6e 67 20 62 79 74 65\n  |           |     |          73\n  |           |     |-- text -\u003e a long long bytes\n  |           |--\u003e 3.0\n  |-- boo\n        |-- foo_again -\u003e 62 79 74 65 73 74 72 69 6e 67\n        |-- bar_again -\u003e 2020-01-31T20:15:10.163010\n        |-- boo_again -\u003e -Infinity\n\ntest_3\n  |-- foo\n  |     |--\u003e stringstringstringstringstringstringstri\n  |          ngstringstringstring\n  |-- bar\n  |     |--\u003e s1\n  |     |--\u003e False\n  |     |--\u003e s3\n  |-- boo\n  |     |--\u003e s4\n  |     |--\u003e --\n  |     |     |-- s -\u003e 5\n  |     |     |-- j -\u003e 5\n  |     |--\u003e s6\n  |-- far\n  |     |-- far_foo\n  |     |     |--\u003e s1\n  |     |     |--\u003e s2\n  |     |     |--\u003e s3\n  |     |-- far_var -\u003e s4\n  |-- biu -\u003e NaN\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarryshaw%2Fdictdumper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjarryshaw%2Fdictdumper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarryshaw%2Fdictdumper/lists"}