{ "info": { "author": "Markus Juenemann", "author_email": "markus@juenemann.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: Implementation :: MicroPython", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "======================================\nbitstring module (MicroPython version)\n======================================\n\n**micropython-bitstring** is a stripped-down version of the Bitstring package by Scott Griffiths\nthat works with MicroPython. It defines a single class ``Bits`` for the creation\nof binary strings. Binary strings created with this module are compatible\nwith the original Bitstring module.\n\nExample::\n\n from ubitstring import Bits\n s = Bits(float=3.1415, length=32) + Bits(uint=15, length=4) + Bits(bool=True)\n assert len(s) == 32 + 4 + 1\n\n\nThe Bits class\n-----------------------\n\nThe ``Bits`` class is a simplified version of the Bits_ class of the same name\nof the original Bitstring package. The focus is on the *creation* of\nbinary strings, for instance in IoT devices.\n\n.. _Bits: https://pythonhosted.org/bitstring/constbitarray.html\n\nThe ``auto`` and ``filename`` keyword arguments have been removed and only the\nfunctionality shown in the example below is supported::\n\n a = Bits(int=-31111, length=32)\n b = Bits(int=-31111, length=32)\n\n assert a.len == 32\n\n assert a.int == -31111\n assert a.hex == 'ffff8679'\n assert a.bin == '11111111111111111000011001111001'\n assert a.bytes == b'\\xff\\xff\\x86y'\n\n assert a.all(True, [1,2,3,4]) is True\n assert a.all(True, [30]) is False\n\n assert a.any(True, [0,30]) is True\n assert a.any(True, [29,30]) is False\n\n assert a.count(1) == 24\n assert a.count(0) == 8\n\n assert a.tobytes() == b'\\xff\\xff\\x86y'\n assert a[-4:].bin == '1001'\n\n assert a == b\n\n c = a + b\n assert c.hex == 'ffff8679ffff8679'\n\n\n----\n\nThe bitstring module has been released as open source under the MIT License.\nCopyright (c) 2016 Scott Griffiths\n\nFor more information see the project's homepage on GitHub:\n\n\nThe MicroPython version has been created by Markus Juenemann: \n", "description_content_type": null, "docs_url": null, "download_url": "https://pypi.python.org/pypi/micropython-bitstring/", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mjuenema/micropython-bitstring", "keywords": "", "license": "The MIT License: http://www.opensource.org/licenses/mit-license.php", "maintainer": "", "maintainer_email": "", "name": "micropython-bitstring", "package_url": "https://pypi.org/project/micropython-bitstring/", "platform": "all", "project_url": "https://pypi.org/project/micropython-bitstring/", "project_urls": { "Download": "https://pypi.python.org/pypi/micropython-bitstring/", "Homepage": "https://github.com/mjuenema/micropython-bitstring" }, "release_url": "https://pypi.org/project/micropython-bitstring/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "Very stripped down version of Scott Griffith's Bitstring package.", "version": "0.1.2" }, "last_serial": 2987379, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7394c1381f77a1f5c96b9c5edc7695b8", "sha256": "cb89db59cf5bd84d3d417fe3f325d720751adcf092879f590e5f96bb6fa00b9e" }, "downloads": -1, "filename": "micropython-bitstring-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7394c1381f77a1f5c96b9c5edc7695b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30334, "upload_time": "2017-06-26T03:57:36", "url": "https://files.pythonhosted.org/packages/ed/99/2d69c10ec3683380b92b2804dabd0717c243198460cfe2ade4ec4971d175/micropython-bitstring-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "82e85880a8c920a405ed07e578a94ac1", "sha256": "ea2cb60da98171722b294fd07c0faf09f549c32101846d8dd90cc38b30c8fce9" }, "downloads": -1, "filename": "micropython-bitstring-0.1.1.tar.gz", "has_sig": false, "md5_digest": "82e85880a8c920a405ed07e578a94ac1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23034, "upload_time": "2017-06-26T13:34:36", "url": "https://files.pythonhosted.org/packages/c6/5d/a7f923e594dd57a8544bfe0a17aa37e1a35a63c7a94048c554964bd5892e/micropython-bitstring-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "567fb4c8c8b0701f195dcba58a586615", "sha256": "b19dec653c2f0bce42ff52817423433146f37d0712575e3a96b88473836e3269" }, "downloads": -1, "filename": "micropython-bitstring-0.1.2.tar.gz", "has_sig": false, "md5_digest": "567fb4c8c8b0701f195dcba58a586615", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22842, "upload_time": "2017-06-29T12:43:40", "url": "https://files.pythonhosted.org/packages/44/08/7823cd89a5d4ced8f57a4e5c8f6ec6950ee5e62308783bb182b51d70808d/micropython-bitstring-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "567fb4c8c8b0701f195dcba58a586615", "sha256": "b19dec653c2f0bce42ff52817423433146f37d0712575e3a96b88473836e3269" }, "downloads": -1, "filename": "micropython-bitstring-0.1.2.tar.gz", "has_sig": false, "md5_digest": "567fb4c8c8b0701f195dcba58a586615", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22842, "upload_time": "2017-06-29T12:43:40", "url": "https://files.pythonhosted.org/packages/44/08/7823cd89a5d4ced8f57a4e5c8f6ec6950ee5e62308783bb182b51d70808d/micropython-bitstring-0.1.2.tar.gz" } ] }