{ "info": { "author": "Matthew Sachs", "author_email": "matthewg@zevils.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "========\n EzStruct\n ========\n \n :copyright: 2013 by Matthew Sachs\n :license: Apache License v2.0\n \n Expressive syntax for working with binary data formats and network\n protocols. Like the :py:mod:`struct` module, but with a more readable\n syntax, especially if your format has:\n \n * Length-prefixed variable-length byte sequences or strings\n * Count-prefixed variable-count repeated fields\n * Terminated (null or otherwise) strings\n * String encodings\n * Numbers which represent enumeration members\n \n Example::\n \n tcp = ezstruct.Struct(\n \"NET_ENDIAN\",\n ezstruct.Field(\"UINT16\", name=\"sport\"),\n ezstruct.Field(\"UINT16\", name=\"dport\"),\n ezstruct.Field(\"UINT32\", name=\"seqno\"),\n ezstruct.Field(\"UINT32\", name=\"ackno\"),\n ezstruct.Field(\"UINT16\",\n name=\"flags\",\n value_transform=ezstruct.FieldTransform(\n \t\t pack_flags_bitfield,\n \t\t\t unpack_flags_bitfield)),\n ezstruct.Field(\"UINT16\", name=\"window_size\"),\n ezstruct.Field(\"UINT16\", name=\"checksum\"),\n ezstruct.Field(\"UINT16\", name=\"urg\"),\n ezstruct.Field(\"BYTES\",\n name=\"options\",\n \t\t default_pack_value={},\n \t\t length=lambda data: data[\"offset\"] - 5,\n \t\t value_transform=ezstruct.FieldTransform(\n pack_and_pad_options,\n \t\t\t unpack_options)))\n \n header_data = {\"sport\": 123,\n \"dport\": 456,\n \"seqno\": 1,\n \"ackno\": 0,\n \"flags\": {\"offset\": 5,\n \t\t \"syn\": 1},\n \t\t \"window_size\": 100,\n \t\t \"checksum\": 0,\n \t\t \"urg\": 0}\n header_bytes = tcp.pack_bytes(header_data)\n assert tcp.unpack_bytes(header_bytes) == header_data\n \n \n History\n =======\n \n v0.1.0, 2014-01-15\n Initial release.\n \n \n Authors\n =======\n \n * `Matthew Sachs `_", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/matthewg/EzStruct/", "keywords": null, "license": "Apache", "maintainer": null, "maintainer_email": null, "name": "ezstruct", "package_url": "https://pypi.org/project/ezstruct/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ezstruct/", "project_urls": { "Homepage": "http://github.com/matthewg/EzStruct/" }, "release_url": "https://pypi.org/project/ezstruct/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Expressive syntax for working with binary data formats and network protocols.", "version": "0.1.0" }, "last_serial": 970576, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "3d991789eb8ec6036a02b0b37c1917ef", "sha256": "86dcc03a4f784a0b7095e610e58409dced8a83fa1e27fcf8dd0c90c838413a6c" }, "downloads": -1, "filename": "ezstruct-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3d991789eb8ec6036a02b0b37c1917ef", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11568, "upload_time": "2014-01-16T05:25:22", "url": "https://files.pythonhosted.org/packages/4b/ee/2c5c5773aa5023fc940e9504f71dee7f28b6d81dbc3e593b466da66b8bd4/ezstruct-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fc49082f6ffb99f5533e4b70dfbaaec6", "sha256": "df2776974ac5328d5a82267ec6b8c49d5d6fb26580dec656e93ec54146401d0f" }, "downloads": -1, "filename": "ezstruct-0.1.0.tar.gz", "has_sig": false, "md5_digest": "fc49082f6ffb99f5533e4b70dfbaaec6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13906, "upload_time": "2014-01-16T05:25:23", "url": "https://files.pythonhosted.org/packages/66/82/edb807b2622082b15c56400fbe88301c238b5777aef86baab06bfabbd58e/ezstruct-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3d991789eb8ec6036a02b0b37c1917ef", "sha256": "86dcc03a4f784a0b7095e610e58409dced8a83fa1e27fcf8dd0c90c838413a6c" }, "downloads": -1, "filename": "ezstruct-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3d991789eb8ec6036a02b0b37c1917ef", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11568, "upload_time": "2014-01-16T05:25:22", "url": "https://files.pythonhosted.org/packages/4b/ee/2c5c5773aa5023fc940e9504f71dee7f28b6d81dbc3e593b466da66b8bd4/ezstruct-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fc49082f6ffb99f5533e4b70dfbaaec6", "sha256": "df2776974ac5328d5a82267ec6b8c49d5d6fb26580dec656e93ec54146401d0f" }, "downloads": -1, "filename": "ezstruct-0.1.0.tar.gz", "has_sig": false, "md5_digest": "fc49082f6ffb99f5533e4b70dfbaaec6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13906, "upload_time": "2014-01-16T05:25:23", "url": "https://files.pythonhosted.org/packages/66/82/edb807b2622082b15c56400fbe88301c238b5777aef86baab06bfabbd58e/ezstruct-0.1.0.tar.gz" } ] }