{ "info": { "author": "Peter Li@HuLab UCSF", "author_email": "peter0306@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# binfilepy\n\nSoftware library to read and write binary file (.adibin format).\n\n## Example to write a binary file:\n```\nfrom binfilepy import BinFile\nfrom binfilepy import CFWBINARY\nfrom binfilepy import CFWBCHANNEL\n\nwith BinFile(filename, \"w\") as f:\n header = CFWBINARY()\n header.setValue(1.0 / 240.0, 2019, 1, 28, 8, 30, 0.0, 0.0, 2, 0)\n f.setHeader(header)\n channel1 = CFWBCHANNEL()\n channel1.setValue(\"I\", \"mmHg\", 1.0, 0.0)\n f.addChannel(channel1)\n channel2 = CFWBCHANNEL(\"II\", \"mmHg\", 1.0, 0.0)\n f.addChannel(channel2)\n chanData = []\n d1 = [1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1]\n d2 = [8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8]\n chanData.append(data1)\n chanData.append(data2)\n f.writeHeader()\n f.writeChannelData(chanData)\n f.updateSamplesPerChannel(16, True)\n```\n\n## Example to read a binary file:\n```\nfrom binfilepy import BinFile\n\nwith BinFile(filename, \"r\") as f:\n # You must read header first before you can read channel data\n f.readHeader()\n # readChannelData() supports reading in random location (Ex: Read 10 secs of data at 1 min mark)\n data = f.readChannelData(offset=60, length=10, useSecForOffset=True, useSecForLength=True)\n```\n\n## File open mode\nCurrently, there are three modes to open a file:\n- \"w\": For writing to a new file. You need to make sure the file doesn't exist.\n- \"r\": For reading from an existing file. You need to make sure the file exists.\n- \"r+\": For appending data to an existing file. You need to make sure the file exists.\n\nYou can use either syntax:\n```\nwith BinFile(filename, \"w\") as f:\n ...\n ...\n```\nor\n```\nf = BinFile(filename, \"w\")\nf.open()\n...\n...\nf.close()\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/hulab-ucsf/binfilepy.git", "keywords": "ECG EKG binary chart adibin", "license": "", "maintainer": "", "maintainer_email": "", "name": "binfilepy", "package_url": "https://pypi.org/project/binfilepy/", "platform": "", "project_url": "https://pypi.org/project/binfilepy/", "project_urls": { "Homepage": "https://github.com/hulab-ucsf/binfilepy.git" }, "release_url": "https://pypi.org/project/binfilepy/0.1.7/", "requires_dist": null, "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "summary": "Package for read/write binary file (.adibin format)", "version": "0.1.7" }, "last_serial": 5980497, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d62dc8e179c8a384d0559071635d0804", "sha256": "28d681a8c1f1a2b742bbff4a3503d754b9d0758e377f2960b1982445ddd87379" }, "downloads": -1, "filename": "binfilepy-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d62dc8e179c8a384d0559071635d0804", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 8922, "upload_time": "2019-04-01T22:36:23", "url": "https://files.pythonhosted.org/packages/70/32/572090cba689184d3175e4118150477667db69c4fe8135e69954ad78bd5c/binfilepy-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ecb9cf87b0321c695d042a9e01ee30da", "sha256": "936a9fe20786b09b38dbb98659ae56975c1ad653cd51f077980ee60078994d08" }, "downloads": -1, "filename": "binfilepy-0.1.0.tar.gz", "has_sig": false, "md5_digest": "ecb9cf87b0321c695d042a9e01ee30da", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 5643, "upload_time": "2019-04-01T22:36:25", "url": "https://files.pythonhosted.org/packages/40/b6/122d7cc17ccbc6b5677271803801c57d8fced544cc27b8f90064f472c174/binfilepy-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "4440adf305cc0c99b5a64efaaaceb883", "sha256": "2255b8379fead06af4749284480f6b68a073949fe01e97cb8f170d2d29d46915" }, "downloads": -1, "filename": "binfilepy-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "4440adf305cc0c99b5a64efaaaceb883", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 9034, "upload_time": "2019-04-01T23:04:42", "url": "https://files.pythonhosted.org/packages/e0/11/6aa0f8b9b820e7f969d817dd415a23684d416111a109ac6f1164af327b79/binfilepy-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cd810e5a30e3af2d165bfda11b2a6879", "sha256": "e9d4cf6ba1a0a78b084d9086c830c2a3f8c36e3a2a44a400216c6882f11f9e59" }, "downloads": -1, "filename": "binfilepy-0.1.1.tar.gz", "has_sig": false, "md5_digest": "cd810e5a30e3af2d165bfda11b2a6879", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 5831, "upload_time": "2019-04-01T23:04:44", "url": "https://files.pythonhosted.org/packages/e0/c4/a354c1ba419b1e7c4101a0752359803d989293e617fe8bed5bc51d38791c/binfilepy-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "baed57c11ab8f36fc73a1f83406b705a", "sha256": "8eaef829e20a5afb0a4c6ea9f422b4259ff3ac9fa69792e43bb864f1dd990274" }, "downloads": -1, "filename": "binfilepy-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "baed57c11ab8f36fc73a1f83406b705a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 9080, "upload_time": "2019-04-01T23:09:46", "url": "https://files.pythonhosted.org/packages/ae/b8/316f62f9ef62714b318fa2999a9ac7e7c30dda1e9335a710a5d091578434/binfilepy-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7568bf914883cce609e8742059aafdca", "sha256": "90d6f294f2d92d65a9690c951ac95b2ed92cac810354b59c2db4a1ef637bcb3e" }, "downloads": -1, "filename": "binfilepy-0.1.2.tar.gz", "has_sig": false, "md5_digest": "7568bf914883cce609e8742059aafdca", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 5923, "upload_time": "2019-04-01T23:09:48", "url": "https://files.pythonhosted.org/packages/3c/9f/3931215c2554c04fc4b39fed69c588be0fc8ee6a3d0327c6b604e2a163d1/binfilepy-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "ac6c930d05b0b95922de40143caa14a2", "sha256": "b6099a33f3afe6757eab2d9b4140fc06688d4b9c94c9af912b915c6439c55fd9" }, "downloads": -1, "filename": "binfilepy-0.1.3.tar.gz", "has_sig": false, "md5_digest": "ac6c930d05b0b95922de40143caa14a2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 5931, "upload_time": "2019-07-20T23:28:55", "url": "https://files.pythonhosted.org/packages/8e/c0/6e6e2f442c72986688908d7b96838b934eafd0814cdc97af34553d1965fa/binfilepy-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "20a0816d1df0baeca7de9ae0691752e3", "sha256": "502bd1cf0de9d786342f14a183a49390b4e45c843207b4f5410e4b6156cf452d" }, "downloads": -1, "filename": "binfilepy-0.1.4.tar.gz", "has_sig": false, "md5_digest": "20a0816d1df0baeca7de9ae0691752e3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 6034, "upload_time": "2019-07-23T19:31:21", "url": "https://files.pythonhosted.org/packages/22/ff/f66ca074851e6c7fb2372e7232f3c32070a6e641a1a05207da12e832e923/binfilepy-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "1736c9ed2530d35b3117fc1d00f6f790", "sha256": "1390458197de728fb98e74b2ebeb6203fd4e2d235769ac4b1060aed97deb6731" }, "downloads": -1, "filename": "binfilepy-0.1.5.tar.gz", "has_sig": false, "md5_digest": "1736c9ed2530d35b3117fc1d00f6f790", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 5857, "upload_time": "2019-07-23T21:48:13", "url": "https://files.pythonhosted.org/packages/7d/f5/4dad7e27e409fd7a6b7c7bffaf2827dcc1c5a9394d83dcefc5f52e9462b8/binfilepy-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "2d771733694faf4226f3b8bb954893a0", "sha256": "8e01db66bcf5a5a5d28acb62afaf62970d689eb10e76625ed91495d11145758b" }, "downloads": -1, "filename": "binfilepy-0.1.6.tar.gz", "has_sig": false, "md5_digest": "2d771733694faf4226f3b8bb954893a0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 5876, "upload_time": "2019-07-24T15:30:10", "url": "https://files.pythonhosted.org/packages/a7/6e/db12f84cc71e069bb1e8203f12862f1d542d353654135ec08da976528137/binfilepy-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "23dde58801b13d477a70282baaf10acf", "sha256": "1cea479033d9a6db23680e3316d87f0507a8dc0afa2f7c401b9e5335cc58cdda" }, "downloads": -1, "filename": "binfilepy-0.1.7.tar.gz", "has_sig": false, "md5_digest": "23dde58801b13d477a70282baaf10acf", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 5844, "upload_time": "2019-10-16T00:22:14", "url": "https://files.pythonhosted.org/packages/fe/80/bd204871e9ed888e39245e91be14a990d86b25410a108afc8505e71921a8/binfilepy-0.1.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "23dde58801b13d477a70282baaf10acf", "sha256": "1cea479033d9a6db23680e3316d87f0507a8dc0afa2f7c401b9e5335cc58cdda" }, "downloads": -1, "filename": "binfilepy-0.1.7.tar.gz", "has_sig": false, "md5_digest": "23dde58801b13d477a70282baaf10acf", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 5844, "upload_time": "2019-10-16T00:22:14", "url": "https://files.pythonhosted.org/packages/fe/80/bd204871e9ed888e39245e91be14a990d86b25410a108afc8505e71921a8/binfilepy-0.1.7.tar.gz" } ] }