{ "info": { "author": "Aleksey Zhukov", "author_email": "drdaeman@drdaeman.pp.ru", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "========\ndestruct\n========\n\nDestruct is a tiny library to declaratively define data structures\nand parse them to Python objects.\n\nThe library is not mature by any means. Things may break, and API may\nsignificantly change in future.\n\n.. image:: https://secure.travis-ci.org/drdaeman/destruct.png?branch=master\n\nExample\n-------\n\nData structures are declared in a manner somehow similar to Django models::\n\n from destruct import StructBase\n import destruct.fields as f\n\n class MyStruct(StructBase):\n timestamp = f.TimestampField()\n value = f.U32Field()\n\nThen, parsing is just creating object::\n\n data = MyStruct(b\"\\0\\0\\0\\0\\0\\0\\0\\xFF\")\n assert data.timestamp == datetime.datetime.utcfromtimestamp(0)\n assert data.value == 255\n\nCopyright\n---------\n\nCopyright (c) 2012, Aleksey Zhukov. Distributed under MIT (Expat) license.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nThe software is provided **\"as is\"**, *without warranty of any kind*, express or\nimplied, including but not limited to the warranties of merchantability, fitness\nfor a particular purpose and noninfringement. *In no event* shall the authors or\ncopyright holders be liable for any claim, damages or other liability,\nwhether in an action of contract, tort or otherwise, arising from, out of\nor in connection with the software or the use or other dealings in the software.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/drdaeman/destruct", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "destruct", "package_url": "https://pypi.org/project/destruct/", "platform": "any", "project_url": "https://pypi.org/project/destruct/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/drdaeman/destruct" }, "release_url": "https://pypi.org/project/destruct/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Tiny library to parse binary structures into Python objects", "version": "0.1.0" }, "last_serial": 788916, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "434676d9a560068b48f5f15bbc084459", "sha256": "c8f1f972e2617e5a01841876a78211d024037b050712bf7737fd670717783cae" }, "downloads": -1, "filename": "destruct-0.1.0.tar.gz", "has_sig": true, "md5_digest": "434676d9a560068b48f5f15bbc084459", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4813, "upload_time": "2012-08-09T21:02:12", "url": "https://files.pythonhosted.org/packages/dd/41/4d3c211b512b79c47cb0247c92f2c2f874005d785148a87b9052b3699300/destruct-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "434676d9a560068b48f5f15bbc084459", "sha256": "c8f1f972e2617e5a01841876a78211d024037b050712bf7737fd670717783cae" }, "downloads": -1, "filename": "destruct-0.1.0.tar.gz", "has_sig": true, "md5_digest": "434676d9a560068b48f5f15bbc084459", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4813, "upload_time": "2012-08-09T21:02:12", "url": "https://files.pythonhosted.org/packages/dd/41/4d3c211b512b79c47cb0247c92f2c2f874005d785148a87b9052b3699300/destruct-0.1.0.tar.gz" } ] }