{ "info": { "author": "Siegfried G\u00fcndert", "author_email": "siegfried.guendert@googlemail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7" ], "description": "# hdfdict helps h5py to dump and load python dictionaries\n\n[![Build Status](https://travis-ci.org/SiggiGue/hdfdict.svg?branch=master)](https://travis-ci.org/SiggiGue/hdfdict)\n\n[![Coverage Status](https://coveralls.io/repos/github/SiggiGue/hdfdict/badge.svg?branch=master)](https://coveralls.io/github/SiggiGue/hdfdict?branch=master)\n\nIf you have a hierarchical data structure of numpy arrays in a dictionary for example, you can use this tool to save this dictionary into a h5py `File()` or `Group()` and load it again.\nThis tool just maps the hdf `Groups` to dict `keys` and the `Datset` to dict `values`.\nOnly types supported by h5py can be used.\nThe dicitonary-keys need to be strings until now.\n\nA lazy loading option is activated per default. So big h5 files are not loaded at once. Instead a dataset gets only loaded if it is accessed from the LazyHdfDict instance.\n\n\n## Example\n\n```python\nimport hdfdict\nimport numpy as np\n\n\nd = {\n 'a': np.random.randn(10),\n 'b': [1, 2, 3],\n 'c': 'Hallo',\n 'd': np.array(['a', 'b']).astype('S'),\n 'e': True,\n 'f': (True, False),\n}\nfname = 'test_hdfdict.h5'\nhdfdict.dump(d, fname)\nres = hdfdict.load(fname)\n\nprint(res)\n```\n\nOutput:\n`\n{'a': , 'b': , 'c': , 'd': , 'e': , 'f': }\n`\n\nThis are all lazy loding fields in the result `res`.\nJust call `res.unlazy()` or `dict(res)` to get all fields loaded.\nIf you only want to load specific fields, just use item access e.g. `res['a']` so only field 'a' will be loaded from the file.\n\n\n```python\nprint(dict(res))`\n```\n\nOutput:\n`\n{'a': array([-0.47666824, 0.11787749, 0.51405835, -1.49557787, -0.33617182,\n -0.22381693, 0.25966526, 0.58160661, 0.17019176, 1.3167669 ]), 'b': array([1, 2, 3]), 'c': 'Hallo', 'd': array([b'a', b'b'], dtype='|S1'), 'e': True, 'f': array([ True, False])}\n`\n\n\n\n\n\n## Installation\n\n+ `pip install hdfdict`\n+ `poetry install hdfdict`\n+ `git clone https://github.com/SiggiGue/hdfdict.git` and `python hdfdict/setup.py install`\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/SiggiGue/hdfdict", "keywords": "", "license": "MIT", "maintainer": "Siegfried G\u00fcndert", "maintainer_email": "siegfried.guendert@googlemail.com", "name": "hdfdict", "package_url": "https://pypi.org/project/hdfdict/", "platform": "", "project_url": "https://pypi.org/project/hdfdict/", "project_urls": { "Homepage": "https://github.com/SiggiGue/hdfdict", "Repository": "https://github.com/SiggiGue/hdfdict" }, "release_url": "https://pypi.org/project/hdfdict/0.3.1/", "requires_dist": [ "h5py-wrapper (>=1.1,<2.0)", "pyyaml (>=5.1,<6.0)" ], "requires_python": ">=3.7,<4.0", "summary": "Helps h5py to load and dump dictionaries containing types supported by h5py.", "version": "0.3.1" }, "last_serial": 5729700, "releases": { "0.1.1alpha": [ { "comment_text": "", "digests": { "md5": "8f935e602945677dd009accfe9e8a5dc", "sha256": "82d5cf0bcae9b337acbfd41aa6c3983c96d2b4717f7a57d7385fc69ea21115be" }, "downloads": -1, "filename": "hdfdict-0.1.1alpha-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8f935e602945677dd009accfe9e8a5dc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3473, "upload_time": "2015-02-27T13:09:06", "url": "https://files.pythonhosted.org/packages/22/47/694c7e3260c962cf25f6782139b982c49e24c7ac7ce8ec5a84283ca962ce/hdfdict-0.1.1alpha-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "365c7f5f36cf3f22744126254bd55be5", "sha256": "ecb2e40c96c55557ffd2d25a15552f93704e9c6fd25355b237ae3b08b58e0ba3" }, "downloads": -1, "filename": "hdfdict-0.1.1alpha-py3-none-any.whl", "has_sig": false, "md5_digest": "365c7f5f36cf3f22744126254bd55be5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3468, "upload_time": "2015-02-27T13:09:09", "url": "https://files.pythonhosted.org/packages/b4/dc/09584c15b1370bb6df7ca6ff19145acd23caeb6c53854b8a40e6e5760461/hdfdict-0.1.1alpha-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0c63656b7056b88223dcb94c756e98f3", "sha256": "bf5d0cddf456500e6b9962ff987cb78a1bcd98bd4bea37ced6941bcb149553da" }, "downloads": -1, "filename": "hdfdict-0.1.1alpha.win-amd64.exe", "has_sig": false, "md5_digest": "0c63656b7056b88223dcb94c756e98f3", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 225458, "upload_time": "2015-02-27T13:09:13", "url": "https://files.pythonhosted.org/packages/c5/b9/8933530f9c5b102b14da8d0bab34924c62ecc446cb5fbf5fca91763db4a6/hdfdict-0.1.1alpha.win-amd64.exe" } ], "0.1alpha": [ { "comment_text": "", "digests": { "md5": "3ead0230b184de155dbec76f7f5f55ec", "sha256": "d4e8977c74d92227687f9afc413cac25702ad98b15a83fa8bbe4f0c6fd05d779" }, "downloads": -1, "filename": "hdfdict-0.1alpha-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3ead0230b184de155dbec76f7f5f55ec", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 2736, "upload_time": "2015-02-27T08:31:37", "url": "https://files.pythonhosted.org/packages/d1/fc/49131cd0e5285567a62fb70509787894bf7f3c645fe43bfe44db5af875ec/hdfdict-0.1alpha-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7fde18fa238bd7fad474c0ff70f2b7b5", "sha256": "424efdaa589a0da5d46ed45949edf31107978a69514bb50c6eccb1a4145dfa35" }, "downloads": -1, "filename": "hdfdict-0.1alpha-py3-none-any.whl", "has_sig": false, "md5_digest": "7fde18fa238bd7fad474c0ff70f2b7b5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2735, "upload_time": "2015-02-27T08:31:40", "url": "https://files.pythonhosted.org/packages/7c/45/efe1e4f18fde56528ff4cb4e10f7ff0807828073bb4f6e2c72f61848f0e2/hdfdict-0.1alpha-py3-none-any.whl" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "5469ea164e4f21aea3f51eb207493831", "sha256": "e875e4fefe767af9b23bf69b593683c2cbba7692e9baf4621333bdb50aecfa2b" }, "downloads": -1, "filename": "hdfdict-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5469ea164e4f21aea3f51eb207493831", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7,<4.0", "size": 5612, "upload_time": "2019-08-26T08:54:04", "url": "https://files.pythonhosted.org/packages/ab/29/bdd444399c839b24d837937d8ca255b1b95a3463e58c03abe04890b0717b/hdfdict-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7af3e33870f24488ffa0f54b3fcffed3", "sha256": "916209f4751b6b1c99d9a2194233fa142353e170b8601e480d431add65960f85" }, "downloads": -1, "filename": "hdfdict-0.3.1.tar.gz", "has_sig": false, "md5_digest": "7af3e33870f24488ffa0f54b3fcffed3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7,<4.0", "size": 5277, "upload_time": "2019-08-26T08:54:05", "url": "https://files.pythonhosted.org/packages/ed/6e/35198b32082cc8b9164b94d481fb08347abcca66441e3f0d09361a13d8e2/hdfdict-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5469ea164e4f21aea3f51eb207493831", "sha256": "e875e4fefe767af9b23bf69b593683c2cbba7692e9baf4621333bdb50aecfa2b" }, "downloads": -1, "filename": "hdfdict-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5469ea164e4f21aea3f51eb207493831", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7,<4.0", "size": 5612, "upload_time": "2019-08-26T08:54:04", "url": "https://files.pythonhosted.org/packages/ab/29/bdd444399c839b24d837937d8ca255b1b95a3463e58c03abe04890b0717b/hdfdict-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7af3e33870f24488ffa0f54b3fcffed3", "sha256": "916209f4751b6b1c99d9a2194233fa142353e170b8601e480d431add65960f85" }, "downloads": -1, "filename": "hdfdict-0.3.1.tar.gz", "has_sig": false, "md5_digest": "7af3e33870f24488ffa0f54b3fcffed3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7,<4.0", "size": 5277, "upload_time": "2019-08-26T08:54:05", "url": "https://files.pythonhosted.org/packages/ed/6e/35198b32082cc8b9164b94d481fb08347abcca66441e3f0d09361a13d8e2/hdfdict-0.3.1.tar.gz" } ] }