{"id":16223699,"url":"https://github.com/lykmapipo/dict2dict","last_synced_at":"2025-07-10T17:04:36.445Z","repository":{"id":203069765,"uuid":"708743083","full_name":"lykmapipo/dict2dict","owner":"lykmapipo","description":"Opinionated dictionary utilities for Python","archived":false,"fork":false,"pushed_at":"2024-07-09T22:03:52.000Z","size":42,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-18T23:41:51.079Z","etag":null,"topics":["clean","dict","dictionary","helpers","lykmapipo","merge","normalize","omit","python","remove","transform","utilities"],"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/lykmapipo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-23T09:51:19.000Z","updated_at":"2025-05-21T00:28:30.000Z","dependencies_parsed_at":"2023-10-25T18:36:07.279Z","dependency_job_id":"47667d76-91a4-46b6-bac2-1625cda80f8d","html_url":"https://github.com/lykmapipo/dict2dict","commit_stats":null,"previous_names":["lykmapipo/dict2dict"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/lykmapipo/dict2dict","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2Fdict2dict","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2Fdict2dict/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2Fdict2dict/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2Fdict2dict/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lykmapipo","download_url":"https://codeload.github.com/lykmapipo/dict2dict/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2Fdict2dict/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264614101,"owners_count":23637511,"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":["clean","dict","dictionary","helpers","lykmapipo","merge","normalize","omit","python","remove","transform","utilities"],"created_at":"2024-10-10T12:19:47.365Z","updated_at":"2025-07-10T17:04:36.428Z","avatar_url":"https://github.com/lykmapipo.png","language":"Python","readme":"# dict2dict\n\n[![ci](https://github.com/lykmapipo/dict2dict/actions/workflows/ci.yaml/badge.svg)](https://github.com/lykmapipo/dict2dict/actions/workflows/ci.yaml)\n[![codecov](https://codecov.io/gh/lykmapipo/dict2dict/graph/badge.svg?token=VUHBA2EZ4K)](https://codecov.io/gh/lykmapipo/dict2dict)\n[![pypi](https://img.shields.io/pypi/v/dict2dict)](https://pypi.org/project/dict2dict/)\n[![downloads](https://img.shields.io/pepy/dt/dict2dict)](https://www.pepy.tech/projects/dict2dict)\n[![versions](https://img.shields.io/pypi/pyversions/dict2dict)](https://github.com/lykmapipo/dict2dict)\n[![license](https://img.shields.io/github/license/lykmapipo/dict2dict)](https://github.com/lykmapipo/dict2dict/blob/main/LICENSE)\n\n[![pre-commit action](https://github.com/lykmapipo/dict2dict/actions/workflows/pre-commit.yaml/badge.svg)](https://github.com/lykmapipo/dict2dict/actions/workflows/pre-commit.yaml)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)\n[![ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![conventional commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits\u0026logoColor=white)](https://conventionalcommits.org)\n\nOpinionated dictionary utilities for Python.\n\n## Requirements\n\n- [Python 3.8+](https://www.python.org/)\n- [pip 23.3+](https://github.com/pypa/pip)\n\n## Installation\n\n```sh\npip install -U dict2dict\n```\n\n## Usage\n\n- Merge multiple dictionaries into one dictionary\n```python\nfrom dict2dict import dicts_to_dict\n\na = {\"a\": 1, \"b\": None, \"c\": None, }\nb = {\"b\": 2, \"c\": None, }\nc = dicts_to_dict(a, b)\n\nc == {\"a\": 1, \"b\": 2, \"c\": None, }\n# True\n```\n\n- Normalize and remove ``Falsey`` items from a dictionary\n```python\nfrom dict2dict import dict_to_dict\na = { \"a\": 1, \"b\": None, \"c\": [], }\nb = dict_to_dict(a)\n\nb == { \"a\": 1, }\n#True\n```\n\n- Normalize ``Falsey`` items from a dictionary to ``None``\n```python\nfrom dict2dict import falsey_to_none\n\na = { \"a\": 1, \"b\": [], }\nb = falsey_to_none(a)\n\nb == { \"a\": 1, \"b\": None, }\n# True\n```\n\n- Remove ``Falsey`` items from a dictionary\n```python\nfrom dict2dict import omit_falsey\n\na = { \"a\": 1, \"b\": None, }\nb = omit_falsey(a)\n\nb == { \"a\": 1, }\n# True\n```\n\n## Test\n\n- Clone this repository\n\n- Install all dependencies\n\n```sh\npip install -e .[dev]\n```\n\n- Then run test\n\n```sh\npytest\n```\n\n## Contribute\n\nIt will be nice, if you open an issue first so that we can know what is going on, then, fork this repo and push in your ideas. Do not forget to add a bit of test(s) of what value you adding.\n\n## Licence\n\nThe MIT License (MIT)\n\nCopyright (c) lykmapipo \u0026 Contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flykmapipo%2Fdict2dict","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flykmapipo%2Fdict2dict","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flykmapipo%2Fdict2dict/lists"}