dictf


Namedictf JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryAn extended Python dict implementation that supports multiple key selection with a pretty syntax.
upload_time2023-04-25 21:20:10
maintainer
docs_urlNone
author
requires_python>=3.8
licenseCopyright (c) 2016 The Python Packaging Authority (PyPA) Permission 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: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE 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.
keywords data structures data dict map
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # dictf
An extended Python dict implementation that supports multiple key selection with a pretty syntax.

## How to use it
First you install the package with pip
```bash
pip install dictf
```
Then you can use it like this:
```python
from dictf import dictf


example_dictf = dictf(name="Led Zepellin", singer="Robert Plant", guitarist="Jimmy Page")

print(example_dictf["name"])
>>> 'Led Zepellin'

print(example_dictf[["name"]])
>>> {'name': 'Led Zepellin'}

# The pandas inspired syntax makes it easy to understand how the lib works
print(example_dictf[["name", "singer"]])
>>> {'name': 'Led Zepellin', 'singer': 'Robert Plant'}

# The return type is a dictf whenever you use a list, tuple or set as key
print(type(example_dictf[["name", "singer"]]))
>>> dictf

# If one key doesn't exist, a KeyError is raised
print(example_dictf[["name", "singer", "drummer"]])
>>> KeyError
```
Currently you can not make multiple assignments at the same time, and I'm not sure we need to add this functionality. I'm open to suggestions, though!

## Contributing
Contributions are welcome and appreciated. Make sure to read our [guide for contributing](https://github.com/Eric-Mendes/dictf/blob/main/CONTRIBUTING.md) and don't forget to check out our [code of conduct](https://github.com/Eric-Mendes/dictf/blob/main/CODE_OF_CONDUCT.md).

Also, please do check out our other libs as well such as https://github.com/Eric-Mendes/unexpected-isaves.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "dictf",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Eric Mendes <ericvelasco.2000@gmail.com>",
    "keywords": "data structures,data,dict,map",
    "author": "",
    "author_email": "Eric Mendes <ericvelasco.2000@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/c5/a0/b63b37021568ec0d0a1e86c7e6c26e961f8ff1661fb58a6dfe64bc3e52d8/dictf-1.0.0.tar.gz",
    "platform": null,
    "description": "# dictf\nAn extended Python dict implementation that supports multiple key selection with a pretty syntax.\n\n## How to use it\nFirst you install the package with pip\n```bash\npip install dictf\n```\nThen you can use it like this:\n```python\nfrom dictf import dictf\n\n\nexample_dictf = dictf(name=\"Led Zepellin\", singer=\"Robert Plant\", guitarist=\"Jimmy Page\")\n\nprint(example_dictf[\"name\"])\n>>> 'Led Zepellin'\n\nprint(example_dictf[[\"name\"]])\n>>> {'name': 'Led Zepellin'}\n\n# The pandas inspired syntax makes it easy to understand how the lib works\nprint(example_dictf[[\"name\", \"singer\"]])\n>>> {'name': 'Led Zepellin', 'singer': 'Robert Plant'}\n\n# The return type is a dictf whenever you use a list, tuple or set as key\nprint(type(example_dictf[[\"name\", \"singer\"]]))\n>>> dictf\n\n# If one key doesn't exist, a KeyError is raised\nprint(example_dictf[[\"name\", \"singer\", \"drummer\"]])\n>>> KeyError\n```\nCurrently you can not make multiple assignments at the same time, and I'm not sure we need to add this functionality. I'm open to suggestions, though!\n\n## Contributing\nContributions are welcome and appreciated. Make sure to read our [guide for contributing](https://github.com/Eric-Mendes/dictf/blob/main/CONTRIBUTING.md) and don't forget to check out our [code of conduct](https://github.com/Eric-Mendes/dictf/blob/main/CODE_OF_CONDUCT.md).\n\nAlso, please do check out our other libs as well such as https://github.com/Eric-Mendes/unexpected-isaves.\n",
    "bugtrack_url": null,
    "license": "Copyright (c) 2016 The Python Packaging Authority (PyPA)  Permission 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:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE 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. ",
    "summary": "An extended Python dict implementation that supports multiple key selection with a pretty syntax.",
    "version": "1.0.0",
    "split_keywords": [
        "data structures",
        "data",
        "dict",
        "map"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cb4e2dd8e1727ba2532ec2607134517e552d398a651a7083386d0ea2f0cb6f96",
                "md5": "7771bd0094048d97670963a7048bd4e2",
                "sha256": "c872c61ebc22d8bd7e17d948a17b83eb784178f7cc0dd382c8432f2fe7441007"
            },
            "downloads": -1,
            "filename": "dictf-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7771bd0094048d97670963a7048bd4e2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 3913,
            "upload_time": "2023-04-25T21:20:08",
            "upload_time_iso_8601": "2023-04-25T21:20:08.601139Z",
            "url": "https://files.pythonhosted.org/packages/cb/4e/2dd8e1727ba2532ec2607134517e552d398a651a7083386d0ea2f0cb6f96/dictf-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c5a0b63b37021568ec0d0a1e86c7e6c26e961f8ff1661fb58a6dfe64bc3e52d8",
                "md5": "db0ee52be802dff991dd198cf4943998",
                "sha256": "bb79f7fbc31292058c889f005c250a675dd9339005449c7e025c486372b97cbd"
            },
            "downloads": -1,
            "filename": "dictf-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "db0ee52be802dff991dd198cf4943998",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 3214,
            "upload_time": "2023-04-25T21:20:10",
            "upload_time_iso_8601": "2023-04-25T21:20:10.424421Z",
            "url": "https://files.pythonhosted.org/packages/c5/a0/b63b37021568ec0d0a1e86c7e6c26e961f8ff1661fb58a6dfe64bc3e52d8/dictf-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-25 21:20:10",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "dictf"
}
        
Elapsed time: 0.05887s