{ "info": { "author": "Chris Lloyd Barnes", "author_email": "barnesc@janelia.hhmi.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3.7" ], "description": "# h5py_like\n\nSome base classes and helper functions for an approximately h5py-like API in python 3.7+.\n\n## Use case\n\nYou have a library which reads/writes contiguous regions of chunked numeric arrays,\n and want to make it behave somewhat like h5py.\n\ne.g.\n[zarr](https://github.com/zarr-developers/zarr), \n[z5](https://github.com/constantinpape/z5), \n[xarray](http://xarray.pydata.org/en/stable/),\n[pyn5](https://github.com/pattonw/rust-pyn5)\n\n## Not supported\n\n- Empty and scalar data spaces\n- Logical indexing\n- Broadcasting (other than scalar)\n- Dimension scales\n\n## Differences from h5py\n\n- Access modes are converted to enums, although they are largely compatible with the `str` forms\n - `\"x\"` is preferred over `\"w-\"` for exclusive creation\n\n## Usage\n\nSee the trivial HDF5 implementation in [the tests package](./tests/h5_impl.py).\n\nCreate your own `Dataset`, `Group`, `File`, and `AttributeManager` classes, \nimplementing their abstract methods.\nBecause `File`s should subclass your `Group`, the base class here is a mixin.\nIt should come before the `Group` in the MRO.\n\nMethods containing write operations should be given the `@mutation` decorator.\nThis checks their `mode` attribute and raises an error if it is readonly.\n\n```python\nfrom h5py_like import DatasetBase, GroupBase, AttributeManagerBase, FileMixin, mutation\n\nclass MyDataset(DatasetBase):\n # ... implement abstract methods\n @mutation\n def __setitem__(self, idx, val):\n ...\n\nclass MyGroup(GroupBase):\n # ... implement abstract methods\n pass\n\nclass MyFile(FileMixin, MyGroup):\n # ... implement abstract methods\n pass\n\nclass MyAttributeManager(AttributeManagerBase):\n # ... implement abstract methods\n pass\n\n```\n\n### Helpers\n\n`h5py_like.shape_utils` contains a variety of helper functions,\nto simulate numpy's flexibility.\n\n### Testing\n\nA suite of tests for basic h5py-like functionality is included.\nTo use it, you must be using pytest, and define a fixture which yields an instance of your `File` implementation.\nThen you just need to subclass the provided abstract test classes:\n\nconftest.py\n\n```python\nimport pytest\n\n@pytest.fixture\ndef file_():\n yield MyFile(\"my_name\")\n```\n\ntest_implementation.py\n\n```python\nfrom h5py_like.test_utils import FileTestBase, GroupTestBase, DatasetTestBase, ModeTestBase\n\n# concrete class names must start with Test\n\nclass TestFile(FileTestBase):\n pass\n\nclass TestGroup(GroupTestBase):\n pass\n\nclass TestDataset(DatasetTestBase):\n pass\n\nclass TestMode(ModeTestBase):\n def factory(self, mode):\n # Instantiate your File object in the given mode in a way which is repeatable within a method.\n return MyFile(mode)\n\n```\n\nIf your dataset implementation supports chunking and threading, use the `ThreadedDatasetTestBase` base class instead.\n\nThe provided base classes test some of the expected functionality, even if you don't write any methods in your test classes.\nYou can add more tests if you like, or override those you want to change, or decorate any you to skip or xfail.\n\nThe `GroupTestBase` provides a `group_name` attribute and a `self.group(parent)` method for creating a group of that name.\n\nThe `DatasetTestBase` provides `dataset_` `name`, `shape`, and `dtype`, and a `self.dataset(parent)` method for making that dataset.\n\n\n## Notes\n\nIf you only want to implement part of the h5py-like API, just `raise NotImplementedError()`.\nThen your classes are being explicit about what they do and don't support. \n\n\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/barnesc/h5py_like", "keywords": "h5py", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "h5py-like", "package_url": "https://pypi.org/project/h5py-like/", "platform": "", "project_url": "https://pypi.org/project/h5py-like/", "project_urls": { "Homepage": "https://github.com/barnesc/h5py_like" }, "release_url": "https://pypi.org/project/h5py-like/0.6.0/", "requires_dist": [ "numpy", "pytest (>=4.6.3) ; extra == 'test'" ], "requires_python": "", "summary": "Abstract base classes for making h5py-like objects.", "version": "0.6.0" }, "last_serial": 5646479, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "30869d0e33ac1a943a62b1648e74a3f2", "sha256": "fc95fb0619fa16eb8850811de7adcafe9692b8589829195563ad6864507e085c" }, "downloads": -1, "filename": "h5py_like-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "30869d0e33ac1a943a62b1648e74a3f2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17798, "upload_time": "2019-06-17T18:37:30", "url": "https://files.pythonhosted.org/packages/f6/53/ef01eb0994f4fa3fc7d2d872b0891a84177b8777c94c9e2cec51bc3ba620/h5py_like-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7115444a30720c4bae05175bc75c8b4d", "sha256": "0ace941a4f2801ce28e91614a263f87642917116729fc8603f5d06ccdfe8d738" }, "downloads": -1, "filename": "h5py_like-0.2.0.tar.gz", "has_sig": false, "md5_digest": "7115444a30720c4bae05175bc75c8b4d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15523, "upload_time": "2019-06-17T18:37:33", "url": "https://files.pythonhosted.org/packages/e9/09/8db855cc78be1c5c37740d92cc9308d32ecebd87b04d7cc6378057eda758/h5py_like-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "98824178cfca8dd1631147066c98e6a8", "sha256": "c35e662dfeed30a97a532c1d4e9277619cd6ce1ebb28ede8b049d8d7c6639f38" }, "downloads": -1, "filename": "h5py_like-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "98824178cfca8dd1631147066c98e6a8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 20919, "upload_time": "2019-06-18T14:40:09", "url": "https://files.pythonhosted.org/packages/02/4e/9d3073991875a6b3328d84ec15f439fdc52edb0682e2a1279bd01580ef39/h5py_like-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f0b7cdddf041a1d7c681cd80a8cd1796", "sha256": "f31edc7ab3d685c3755c147c7ef2a23cec42826c5d7f7f4e4ae5e1fa5f807fe5" }, "downloads": -1, "filename": "h5py_like-0.2.1.tar.gz", "has_sig": false, "md5_digest": "f0b7cdddf041a1d7c681cd80a8cd1796", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17228, "upload_time": "2019-06-18T14:40:10", "url": "https://files.pythonhosted.org/packages/88/a6/f0cc03214bacdbe3aebab932138815cc81cceece4ee521bfcd145926e5eb/h5py_like-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "da77052d348dca066a0cc66b502ec5eb", "sha256": "6cbf19aa14461a41933c3e42153719413f01643f1be761453d6b1548a15f3c47" }, "downloads": -1, "filename": "h5py_like-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "da77052d348dca066a0cc66b502ec5eb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 20922, "upload_time": "2019-06-18T14:39:42", "url": "https://files.pythonhosted.org/packages/39/b5/85415c0ff06d90a113a33f7f5d4c10eec6605919a845c0dfd6ad3d70bf1e/h5py_like-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "74a6ceb3e9c242556626bcba32e28b41", "sha256": "4ce3c7361942e77fe1635d2f57015f411f9055d1c969011f0b0fa5b3260fe97c" }, "downloads": -1, "filename": "h5py_like-0.2.2.tar.gz", "has_sig": false, "md5_digest": "74a6ceb3e9c242556626bcba32e28b41", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17223, "upload_time": "2019-06-18T14:39:43", "url": "https://files.pythonhosted.org/packages/9b/52/6709a46c02ea046418fa1c7843c61b4b58c3273609f741a4b71d724f1972/h5py_like-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "da2ddde6f79860d59d892fd7d38ef41f", "sha256": "af89c3dda1126233ea47635ef6714145269a7e6215c33bf97c12c9b540eaf879" }, "downloads": -1, "filename": "h5py_like-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "da2ddde6f79860d59d892fd7d38ef41f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 21907, "upload_time": "2019-07-15T17:38:38", "url": "https://files.pythonhosted.org/packages/eb/81/0381f924a812ed68d8fdb8b679460c5d4cdf5884299ab4cc392ef2a6adcf/h5py_like-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "af1e7fc7cece64b635eca8d93ec9d934", "sha256": "fa32178e581de5a902a68851fa93138bbe7d91b664f070a8ab3356b3e31e6289" }, "downloads": -1, "filename": "h5py_like-0.3.0.tar.gz", "has_sig": false, "md5_digest": "af1e7fc7cece64b635eca8d93ec9d934", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18166, "upload_time": "2019-07-15T17:38:40", "url": "https://files.pythonhosted.org/packages/ca/d9/bc71f131ce59e3b5dec576d153aceafe9577aec2b0ed1453be79adf22955/h5py_like-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "4f2d1309f6e054ff9080109481f23adf", "sha256": "8d6c786d5693721dc85473518f531910bc1dcf9f5fe78dd548442cf4f6b21c3e" }, "downloads": -1, "filename": "h5py_like-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4f2d1309f6e054ff9080109481f23adf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 21844, "upload_time": "2019-07-17T15:38:27", "url": "https://files.pythonhosted.org/packages/d5/bb/4387becfbeefb8d3fd4e37d2c9c8d01b2f062ab0393225abffcda95328a7/h5py_like-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "426d924a4e5ece0991540a0c38726804", "sha256": "a8d592c274080b8868f0d2dea08045613f9389a45d76f399287fd79dcfc715f3" }, "downloads": -1, "filename": "h5py_like-0.4.0.tar.gz", "has_sig": false, "md5_digest": "426d924a4e5ece0991540a0c38726804", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18152, "upload_time": "2019-07-17T15:38:29", "url": "https://files.pythonhosted.org/packages/56/e1/7fdfc461c1cc9483532bd46c130eae1dec0dfb6fe8ea33009a666aeb8cda/h5py_like-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "67c4405b85fbb9f88e6978e6412b1dc6", "sha256": "b9303e0d3dc53128bd808ea746f10f45f175fea1d0ca6f7e8f4c77a97ae7140b" }, "downloads": -1, "filename": "h5py_like-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "67c4405b85fbb9f88e6978e6412b1dc6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22242, "upload_time": "2019-07-18T13:31:58", "url": "https://files.pythonhosted.org/packages/17/c1/a53de602c23939c17f1dc936e28a7b78970aaa374df54ab8a37e48c34231/h5py_like-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f7a399fc660856ce8545ead9f132179d", "sha256": "17c40c168e13178f0d61f88270d2438b21085f98b17c545e3ca9e7def79ec4cd" }, "downloads": -1, "filename": "h5py_like-0.5.0.tar.gz", "has_sig": false, "md5_digest": "f7a399fc660856ce8545ead9f132179d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18508, "upload_time": "2019-07-18T13:31:59", "url": "https://files.pythonhosted.org/packages/35/5f/094013619e7949d7a8b6498b527a554a7220688789e3071fedd6eb6b772d/h5py_like-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "9a48fcdb5dae4eed4fdf524443fa2e1e", "sha256": "68c485b9a44a92474717877292f1ddeca05a74638e7ba5f1f473d8ca67a708d2" }, "downloads": -1, "filename": "h5py_like-0.5.1-py3-none-any.whl", "has_sig": false, "md5_digest": "9a48fcdb5dae4eed4fdf524443fa2e1e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23016, "upload_time": "2019-07-18T14:34:35", "url": "https://files.pythonhosted.org/packages/1e/17/9377f94189e892e46778e6e8f3783a682e12de63a8947a98df5d53e9dcc2/h5py_like-0.5.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "337f76029b8a386e75f2e63e5ae7d60a", "sha256": "e5505dbdac0edb595a5c46365c4585a93ec6b3b324b6340ad03f1404599190e2" }, "downloads": -1, "filename": "h5py_like-0.5.1.tar.gz", "has_sig": false, "md5_digest": "337f76029b8a386e75f2e63e5ae7d60a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19121, "upload_time": "2019-07-18T14:34:36", "url": "https://files.pythonhosted.org/packages/f8/c3/f10b6aa1f7c03daea0062a57bce5d341fd83193c9de3be2f542933272602/h5py_like-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "542b17c7b59221249c29950c0eddce73", "sha256": "8b7c42598ea7c71330c94977512c82ca550b927a8b1ee098a6b6592af2c490da" }, "downloads": -1, "filename": "h5py_like-0.5.2-py3-none-any.whl", "has_sig": false, "md5_digest": "542b17c7b59221249c29950c0eddce73", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22882, "upload_time": "2019-07-18T15:10:59", "url": "https://files.pythonhosted.org/packages/db/e3/495abfd1e432e7c4e38daf39d0f32a5647c6bed47b13fa1837813afba995/h5py_like-0.5.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1e8b256700c2a6beeb89634c8da44ec0", "sha256": "7ec3c4e7ee839c673011e72cd1f4f1ce93a7596f1d2a6d9acb1b7fddee6de388" }, "downloads": -1, "filename": "h5py_like-0.5.2.tar.gz", "has_sig": false, "md5_digest": "1e8b256700c2a6beeb89634c8da44ec0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19005, "upload_time": "2019-07-18T15:11:00", "url": "https://files.pythonhosted.org/packages/95/de/5d0151fb6e8408374578caaa0199a2ea7169922fe3e7d73993baa4b5e710/h5py_like-0.5.2.tar.gz" } ], "0.5.3": [ { "comment_text": "", "digests": { "md5": "ad0031334f118e65a24a87c1e622cd58", "sha256": "6613116b2342704170879d7e5dc779813040490990c225940cdd8832268ceb9c" }, "downloads": -1, "filename": "h5py_like-0.5.3-py3-none-any.whl", "has_sig": false, "md5_digest": "ad0031334f118e65a24a87c1e622cd58", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22897, "upload_time": "2019-07-26T20:47:59", "url": "https://files.pythonhosted.org/packages/82/85/3a908baf8a1a45420370fa605514b27abebdcbd57cea1faeb7366425823c/h5py_like-0.5.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5ddb0f01f75c93bee7c3cd0ea3d2f3bf", "sha256": "5aff6b120f3ecd20119703d5d23f9c9877438e60a8aba7e7324bb7d522bb9b41" }, "downloads": -1, "filename": "h5py_like-0.5.3.tar.gz", "has_sig": false, "md5_digest": "5ddb0f01f75c93bee7c3cd0ea3d2f3bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19014, "upload_time": "2019-07-26T20:48:01", "url": "https://files.pythonhosted.org/packages/60/b5/f893d1bad96eb1370e48ae86864b22f63ebb35dbb678ff3668c603aacdcc/h5py_like-0.5.3.tar.gz" } ], "0.5.4": [ { "comment_text": "", "digests": { "md5": "1e17064c3a771c6731a4972fc9879a93", "sha256": "4b62f38b4f8ef8d4553cf5c1c92b18621e336334108b5006c582d524f40dbad1" }, "downloads": -1, "filename": "h5py_like-0.5.4-py3-none-any.whl", "has_sig": false, "md5_digest": "1e17064c3a771c6731a4972fc9879a93", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22978, "upload_time": "2019-08-05T16:00:20", "url": "https://files.pythonhosted.org/packages/b3/88/60c7268d99c207c69b0041ad40d333c3aa39c0bcc282191db2207cd59720/h5py_like-0.5.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b2f0b4a79820d0c589a58b126c6e3604", "sha256": "2ddad2a6e010eef4a22e851156f5b42f3d781a8864739035a6cc15b3463146cc" }, "downloads": -1, "filename": "h5py_like-0.5.4.tar.gz", "has_sig": false, "md5_digest": "b2f0b4a79820d0c589a58b126c6e3604", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19091, "upload_time": "2019-08-05T16:00:22", "url": "https://files.pythonhosted.org/packages/0b/01/34cac4d81b6089ecadb173950377b335d09b53df76086cff3db090624efb/h5py_like-0.5.4.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "e2cac553d27bed8553f7a6b18fa6ebad", "sha256": "cf92e575c15041b731d5694217aae10790995ed7215f1216b50ef93e4d934a16" }, "downloads": -1, "filename": "h5py_like-0.6.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e2cac553d27bed8553f7a6b18fa6ebad", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22985, "upload_time": "2019-08-07T18:56:41", "url": "https://files.pythonhosted.org/packages/e4/44/8b82f01929fb949b91cafe916d1cd583e51ec0fe96d91a6506cd012f274b/h5py_like-0.6.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "467b369ccf99eb46402db448e04c68c7", "sha256": "fd4b998c260e68c0183380b54e609bc3ab2b22f036ff1fd3006be07f40654550" }, "downloads": -1, "filename": "h5py_like-0.6.0.tar.gz", "has_sig": false, "md5_digest": "467b369ccf99eb46402db448e04c68c7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19132, "upload_time": "2019-08-07T18:56:43", "url": "https://files.pythonhosted.org/packages/e9/a3/f4a20799ed55f88f6a54442a1854207bfbc978d6d095d9c4b2fe9177f320/h5py_like-0.6.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e2cac553d27bed8553f7a6b18fa6ebad", "sha256": "cf92e575c15041b731d5694217aae10790995ed7215f1216b50ef93e4d934a16" }, "downloads": -1, "filename": "h5py_like-0.6.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e2cac553d27bed8553f7a6b18fa6ebad", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22985, "upload_time": "2019-08-07T18:56:41", "url": "https://files.pythonhosted.org/packages/e4/44/8b82f01929fb949b91cafe916d1cd583e51ec0fe96d91a6506cd012f274b/h5py_like-0.6.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "467b369ccf99eb46402db448e04c68c7", "sha256": "fd4b998c260e68c0183380b54e609bc3ab2b22f036ff1fd3006be07f40654550" }, "downloads": -1, "filename": "h5py_like-0.6.0.tar.gz", "has_sig": false, "md5_digest": "467b369ccf99eb46402db448e04c68c7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19132, "upload_time": "2019-08-07T18:56:43", "url": "https://files.pythonhosted.org/packages/e9/a3/f4a20799ed55f88f6a54442a1854207bfbc978d6d095d9c4b2fe9177f320/h5py_like-0.6.0.tar.gz" } ] }