dict-zip


Namedict-zip JSON
Version 0.6.0 PyPI version JSON
download
home_pageNone
Summaryzip and zip_longest for dict
upload_time2025-01-10 06:16:25
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseCopyright 2019 Kitsu Yui Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # dict_zip

zip and zip_longest for dict.

[![Python](https://img.shields.io/pypi/pyversions/dict-zip.svg)](https://badge.fury.io/py/dict-zip)
[![PyPI version](https://img.shields.io/pypi/v/dict-zip.svg)](https://pypi.python.org/pypi/dict-zip/)
[![codecov](https://codecov.io/gh/kitsuyui/dict_zip/branch/main/graph/badge.svg?token=LiuhQeZsnc)](https://codecov.io/gh/kitsuyui/dict_zip)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![dict-zip](https://snyk.io/advisor/python/dict-zip/badge.svg)](https://snyk.io/advisor/python/dict-zip)

# Installation

```sh
$ pip install dict-zip
```

# Usage

## dict_zip

`dict_zip` is `zip` for dict.

```python
>>> from dict_zip import dict_zip
>>> dict_zip({'a': 1, 'b': 2}, {'a': 3, 'b': 4})
{'a': (1, 3), 'b': (2, 4)}
```

## dict_zip_longest

`dict_zip_longest` is `zip_longest` for dict.
It fills with fillvalue (default: `None`) when argument dict doesn't have match key.

```python
>>> from dict_zip import dict_zip_longest
>>> dict_zip_longest({'a': 1, 'b': 2, 'c': 4}, {'a': 3, 'b': 4})
{'a': (1, 3), 'b': (2, 4), 'c': (4, None)}
```

# Type hints

dict_zip supports for type hints.

<img width="535" alt="screen-shot-of-type-hints" src="https://user-images.githubusercontent.com/2596972/181838389-2860e45c-b366-41e4-83a1-f747b7115a5f.png">

# LICENSE

The 3-Clause BSD License. See also LICENSE file.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "dict-zip",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Yui KITSU <kitsuyui+github@kitsuyui.com>",
    "download_url": "https://files.pythonhosted.org/packages/86/eb/7f2e7268a8e92d8da2c32cb90dcf0f0474f06d5ca40b7e3b2d1d16e53789/dict_zip-0.6.0.tar.gz",
    "platform": null,
    "description": "# dict_zip\n\nzip and zip_longest for dict.\n\n[![Python](https://img.shields.io/pypi/pyversions/dict-zip.svg)](https://badge.fury.io/py/dict-zip)\n[![PyPI version](https://img.shields.io/pypi/v/dict-zip.svg)](https://pypi.python.org/pypi/dict-zip/)\n[![codecov](https://codecov.io/gh/kitsuyui/dict_zip/branch/main/graph/badge.svg?token=LiuhQeZsnc)](https://codecov.io/gh/kitsuyui/dict_zip)\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n[![dict-zip](https://snyk.io/advisor/python/dict-zip/badge.svg)](https://snyk.io/advisor/python/dict-zip)\n\n# Installation\n\n```sh\n$ pip install dict-zip\n```\n\n# Usage\n\n## dict_zip\n\n`dict_zip` is `zip` for dict.\n\n```python\n>>> from dict_zip import dict_zip\n>>> dict_zip({'a': 1, 'b': 2}, {'a': 3, 'b': 4})\n{'a': (1, 3), 'b': (2, 4)}\n```\n\n## dict_zip_longest\n\n`dict_zip_longest` is `zip_longest` for dict.\nIt fills with fillvalue (default: `None`) when argument dict doesn't have match key.\n\n```python\n>>> from dict_zip import dict_zip_longest\n>>> dict_zip_longest({'a': 1, 'b': 2, 'c': 4}, {'a': 3, 'b': 4})\n{'a': (1, 3), 'b': (2, 4), 'c': (4, None)}\n```\n\n# Type hints\n\ndict_zip supports for type hints.\n\n<img width=\"535\" alt=\"screen-shot-of-type-hints\" src=\"https://user-images.githubusercontent.com/2596972/181838389-2860e45c-b366-41e4-83a1-f747b7115a5f.png\">\n\n# LICENSE\n\nThe 3-Clause BSD License. See also LICENSE file.\n",
    "bugtrack_url": null,
    "license": "Copyright 2019 Kitsu Yui  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "zip and zip_longest for dict",
    "version": "0.6.0",
    "project_urls": {
        "Homepage": "https://github.com/kitsuyui/dict_zip"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a09e4c62330ea01bc65b23c58942bcc99236646f1641c0d8212443589514cf6a",
                "md5": "9c5bcdd3f26f23d0bf056d6df69f6a18",
                "sha256": "5e1586d88e9b3d3ee329e3cda0f450b4b1e9434917a82ba8d066c17c7afd9af0"
            },
            "downloads": -1,
            "filename": "dict_zip-0.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9c5bcdd3f26f23d0bf056d6df69f6a18",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 5750,
            "upload_time": "2025-01-10T06:16:23",
            "upload_time_iso_8601": "2025-01-10T06:16:23.069359Z",
            "url": "https://files.pythonhosted.org/packages/a0/9e/4c62330ea01bc65b23c58942bcc99236646f1641c0d8212443589514cf6a/dict_zip-0.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "86eb7f2e7268a8e92d8da2c32cb90dcf0f0474f06d5ca40b7e3b2d1d16e53789",
                "md5": "acad731297783bce9de8d4290d6bf3bc",
                "sha256": "797d03bfcf0039ad280a242c9330f08a3f017b9e8387a8f0247aaf4c1f6d9237"
            },
            "downloads": -1,
            "filename": "dict_zip-0.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "acad731297783bce9de8d4290d6bf3bc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 31660,
            "upload_time": "2025-01-10T06:16:25",
            "upload_time_iso_8601": "2025-01-10T06:16:25.426800Z",
            "url": "https://files.pythonhosted.org/packages/86/eb/7f2e7268a8e92d8da2c32cb90dcf0f0474f06d5ca40b7e3b2d1d16e53789/dict_zip-0.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-10 06:16:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kitsuyui",
    "github_project": "dict_zip",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "dict-zip"
}
        
Elapsed time: 0.42088s