{
"info": {
"author": "Tomer Filiba, Corbin Simpson",
"author_email": "tomerfiliba@gmail.com, MostAwesomeDude@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 2.5",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.0",
"Programming Language :: Python :: 3.1",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3"
],
"description": "Construct2\n==========\nConstruct is a powerful **declarative** parser (and builder) for binary data.\n\nInstead of writing *imperative code* to parse a piece of data, you declaratively\ndefine a *data structure* that describes your data. As this data structure is not\ncode, you can use it in one direction to *parse* data into Pythonic objects, \nand in the other direction, convert (\"build\") objects into binary data.\n\nThe library provides both simple, atomic constructs (such as integers of various sizes), \nas well as composite ones which allow you form hierarchical structures of increasing complexity.\nConstruct features **bit and byte granularity**, easy debugging and testing, an \n**easy-to-extend subclass system**, and lots of primitive constructs to make your \nwork easier:\n\n* Fields: raw bytes or numerical types\n* Structs and Sequences: combine simpler constructs into more complex ones\n* Adapters: change how data is represented\n* Arrays/Ranges: duplicate constructs\n* Meta-constructs: use the context (history) to compute the size of data\n* If/Switch: branch the computational path based on the context\n* On-demand (lazy) parsing: read only what you require\n* Pointers: jump from here to there in the data stream \n\n.. note::\n `Construct3 `_ is a rewrite of Construct2; \n the two are incompatible, thus ``construct3`` will be released as a *different package*. \n Construct 2.5 is the last release of the 2.x codebase.\n \n Construct 2.5 drops the experimental text parsing support that was added in Construct 2.0;\n it was highly inefficient and I chose to concentrate on binary data.\n\nExample\n-------\n\nA ``PascalString`` is a string prefixed by its length::\n\n >>> from construct import *\n >>>\n >>> PascalString = Struct(\"PascalString\",\n ... UBInt8(\"length\"),\n ... Bytes(\"data\", lambda ctx: ctx.length),\n ... )\n >>>\n >>> PascalString.parse(\"\\x05helloXXX\")\n Container({'length': 5, 'data': 'hello'})\n >>> PascalString.build(Container(length = 6, data = \"foobar\"))\n '\\x06foobar'\n\nInstead of specifying the length manually, let's use an adapter::\n\n >>> PascalString2 = ExprAdapter(PascalString, \n ... encoder = lambda obj, ctx: Container(length = len(obj), data = obj), \n ... decoder = lambda obj, ctx: obj.data\n ... )\n >>> PascalString2.parse(\"\\x05hello\")\n 'hello'\n >>> PascalString2.build(\"i'm a long string\")\n \"\\x11i'm a long string\"\n\nSee more examples of `file formats `_\nand `network protocols `_ \nin the repository.\n\nResources\n---------\nConstruct's homepage is ``_, where you can find all kinds\nof docs and resources. The library itself is developed on `github `_;\nplease use `github issues `_ to report bugs, and\ngithub pull-requests to send in patches. For general discussion or questions, please use the \n`new discussion group `_.\n\nRequirements\n------------\nConstruct should run on any Python 2.5-3.5 or PyPy implementation. \n\nIts only requirement is `six `_, which is used to overcome the \ndifferences between Python 2 and 3.",
"description_content_type": null,
"docs_url": null,
"download_url": "UNKNOWN",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://construct.readthedocs.org",
"keywords": "construct,declarative,data structure,binary,parser,builder,pack,unpack",
"license": "MIT",
"maintainer": null,
"maintainer_email": null,
"name": "ak-construct",
"package_url": "https://pypi.org/project/ak-construct/",
"platform": "POSIX,Windows",
"project_url": "https://pypi.org/project/ak-construct/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "http://construct.readthedocs.org"
},
"release_url": "https://pypi.org/project/ak-construct/2.5.2/",
"requires_dist": null,
"requires_python": null,
"summary": "A powerful declarative parser/builder for binary data",
"version": "2.5.2"
},
"last_serial": 3153319,
"releases": {
"2.5.2": [
{
"comment_text": "",
"digests": {
"md5": "eb5667fb249c9f3e10c25ca5b2917fe7",
"sha256": "6206368eb9bfe2baa9112e0b27e025a0553b6bb6ab27936ca39e3e5052d85fc0"
},
"downloads": -1,
"filename": "ak_construct-2.5.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "eb5667fb249c9f3e10c25ca5b2917fe7",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 73222,
"upload_time": "2016-06-07T21:33:10",
"url": "https://files.pythonhosted.org/packages/84/5b/570592d94eb7ffb6f11c78a7ed880f50607cbc99f7aab4e6de1435e1a11f/ak_construct-2.5.2-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "d7f4baefcc5808606f1154c9b721e1f3",
"sha256": "18b9a364723e1f52d907c0038a11033e624ff9ac035a3b6dd40d5fe6d70a7c62"
},
"downloads": -1,
"filename": "ak-construct-2.5.2.tar.gz",
"has_sig": false,
"md5_digest": "d7f4baefcc5808606f1154c9b721e1f3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 58264,
"upload_time": "2016-06-07T21:33:16",
"url": "https://files.pythonhosted.org/packages/02/45/d5dfb7790ce40d03108db2ed4a979d7cb8572b4296af26be54b8f6a20a9c/ak-construct-2.5.2.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "eb5667fb249c9f3e10c25ca5b2917fe7",
"sha256": "6206368eb9bfe2baa9112e0b27e025a0553b6bb6ab27936ca39e3e5052d85fc0"
},
"downloads": -1,
"filename": "ak_construct-2.5.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "eb5667fb249c9f3e10c25ca5b2917fe7",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 73222,
"upload_time": "2016-06-07T21:33:10",
"url": "https://files.pythonhosted.org/packages/84/5b/570592d94eb7ffb6f11c78a7ed880f50607cbc99f7aab4e6de1435e1a11f/ak_construct-2.5.2-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "d7f4baefcc5808606f1154c9b721e1f3",
"sha256": "18b9a364723e1f52d907c0038a11033e624ff9ac035a3b6dd40d5fe6d70a7c62"
},
"downloads": -1,
"filename": "ak-construct-2.5.2.tar.gz",
"has_sig": false,
"md5_digest": "d7f4baefcc5808606f1154c9b721e1f3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 58264,
"upload_time": "2016-06-07T21:33:16",
"url": "https://files.pythonhosted.org/packages/02/45/d5dfb7790ce40d03108db2ed4a979d7cb8572b4296af26be54b8f6a20a9c/ak-construct-2.5.2.tar.gz"
}
]
}