{"id":18795511,"url":"https://github.com/fmenabe/python-yamlordereddictloader","last_synced_at":"2025-08-25T22:11:00.273Z","repository":{"id":60723520,"uuid":"20809771","full_name":"fmenabe/python-yamlordereddictloader","owner":"fmenabe","description":"(DEPRECATED) YAML loader and dumper for PyYAML allowing to keep keys order.","archived":false,"fork":false,"pushed_at":"2023-09-22T13:52:39.000Z","size":13,"stargazers_count":26,"open_issues_count":0,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-24T08:28:16.706Z","etag":null,"topics":["dumper","keep-order","loader","ordered","ordereddict","python","yaml"],"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/fmenabe.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2014-06-13T16:04:14.000Z","updated_at":"2024-06-18T18:57:43.990Z","dependencies_parsed_at":"2024-06-18T18:57:43.463Z","dependency_job_id":"5acc879b-d096-4740-a211-cc1ed19f6da4","html_url":"https://github.com/fmenabe/python-yamlordereddictloader","commit_stats":{"total_commits":23,"total_committers":4,"mean_commits":5.75,"dds":"0.13043478260869568","last_synced_commit":"daecb444fb62797fb0e439ab04f11882d85b1237"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmenabe%2Fpython-yamlordereddictloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmenabe%2Fpython-yamlordereddictloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmenabe%2Fpython-yamlordereddictloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmenabe%2Fpython-yamlordereddictloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fmenabe","download_url":"https://codeload.github.com/fmenabe/python-yamlordereddictloader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248739843,"owners_count":21154247,"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","keep-order","loader","ordered","ordereddict","python","yaml"],"created_at":"2024-11-07T21:34:22.176Z","updated_at":"2025-04-13T15:40:47.841Z","avatar_url":"https://github.com/fmenabe.png","language":"Python","readme":"python-yamlordereddictloader\n============================\n\n**DEPRECATED: the** `Phynix/yamlloader \u003chttps://github.com/Phynix/yamlloader\u003e`_ **project\nprovide an improved version of this library with unit tests, performance improvements\n(by providing access to the C implementation of PyYAML) and is more actively developed.\nYou should use it!**\n\n.. image:: https://img.shields.io/pypi/l/yamlordereddictloader.svg\n           :target: https://opensource.org/licenses/MIT\n           :alt: License\n\n.. image:: https://img.shields.io/pypi/pyversions/yamlordereddictloader.svg\n           :target: https://pypi.python.org/pypi/yamlordereddictloader\n           :alt: Versions\n\n.. image:: https://img.shields.io/pypi/v/yamlordereddictloader.svg\n           :target: https://pypi.python.org/pypi/yamlordereddictloader\n           :alt: PyPi\n\n.. image:: https://img.shields.io/badge/github-repo-yellow.jpg\n           :target: https://github.com/fmenabe/python-yamlordereddictloader\n           :alt: Code repo\n\n.. image:: https://landscape.io/github/fmenabe/python-yamlordereddictloader/master/landscape.svg?style=flat\n           :target: https://landscape.io/github/fmenabe/python-yamlordereddictloader/master\n           :alt: Code Health\n\nThis module provide a loader and a dumper for PyYAML allowing to keep items order\nwhen loading a file (by putting them in ``OrderedDict`` objects) and to manage\n``OrderedDict`` objects when dumping to a file.\n\nThe loader is based on stackoverflow topic (thanks to Eric Naeseth):\nhttp://stackoverflow.com/questions/5121931/in-python-how-can-you-load-yaml-mappings-as-ordereddicts#answer-5121963\n\nSelf promotion: I use it a lot with `clg \u003chttps://clg.readthedocs.io\u003e`_, which\nallows to generate command-line definition from a configuration file, for keeping\norder of subcommands, options and arguments in the help message!\n\n\nTo install it\n-------------\n\n.. code-block:: bash\n\n    $ pip install yamlordereddictloader\n\nLoader usage\n------------\n\n.. code-block:: python\n\n    import yaml\n    import yamlordereddictloader\n\n    data = yaml.load(open('myfile.yml'), Loader=yamlordereddictloader.Loader)\n\n**Note:** For using the safe loader (which want standard YAML tags and does\nnot construct arbitrary Python objects), replace ``yamlorderdictloader.Loader`` by\n``yamlorderedictloader.SafeLoader``.\n\nDumper usage\n------------\n\n.. code-block:: python\n\n    import yaml\n    import yamlordereddictloader\n    from collections import OrderedDict\n\n    data = OrderedDict([\n        ('key1', 'val1'),\n        ('key2', OrderedDict([('key21', 'val21'), ('key22', 'val22')]))\n    ])\n    yaml.dump(\n        data,\n        open('myfile.yml', 'w'),\n        Dumper=yamlordereddictloader.Dumper,\n        default_flow_style=False)\n\n**Note:** For using the safe dumper (which produce standard YAML tags and does\nnot represent arbitrary Python objects), replace ``yamlorderdictloader.Dumper`` by\n``yamlorderedictloader.SafeDumper``.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffmenabe%2Fpython-yamlordereddictloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffmenabe%2Fpython-yamlordereddictloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffmenabe%2Fpython-yamlordereddictloader/lists"}