{ "info": { "author": "Paul Osborne", "author_email": "paul.osborne@digi.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries" ], "description": "Suitcase\n========\n\n|Build Status| |Coverage Status| |Code Climate| |Latest Version|\n|License|\n\nSuitcase is a library providing a set of primitives and helpers for\nspecifying and parsing protocols. Suitcase provides an internal DSL\n(Domain Specific Language) for describing protocol frames. It seeks to\ndo for binary protocols what things like `Django\u2019s\nORM `__ and\n`Sqlalchemy\u2019s Declarative\nSyntax `__\ndo for Database ORMs and adopts a similar, class-based syntax.\n\n`View the Full\nDocumentation `__\n\nThe original version of suitcase was generously contributed by the\n`Digi `__ `Wireless Design\nServices `__. The\nsoftware is provided as Alpha software and has not undergone formal\ntesting but does ship with extensive unit testing.\n\n`View the\nChangelog `__\n\nExample\n=======\n\nThe following example shows how you would use Suitcase to describe some\nof the core network protocols that form the backbone of the internet:\n\n.. code:: python\n\n from suitcase.fields import UBInt16, Payload, LengthField, Magic, \\\n UBInt8Sequence, DispatchField, DispatchTarget, UBInt8, UBInt32, BitField, BitNum, \\\n BitBool\n from suitcase.structure import Structure\n\n\n class TCPFrameHeader(Structure):\n source_address = UBInt16()\n destination_address = UBInt16()\n sequence_number = UBInt32()\n acknowledgement_number = UBInt32()\n options = BitField(16,\n data_offset=BitNum(4),\n reserved=BitNum(3),\n NS=BitBool(),\n CWR=BitBool(),\n ECE=BitBool(),\n URG=BitBool(),\n ACK=BitBool(),\n PSH=BitBool(),\n RST=BitBool(),\n SYN=BitBool(),\n FIN=BitBool()\n )\n window_size = UBInt16()\n checksum = UBInt16()\n urgent_pointer = UBInt16()\n # TODO: additional options if data_offset > 5\n\n\n class UDPFrame(Structure):\n source_port = UBInt16()\n destination_port = UBInt16()\n length = LengthField(UBInt16())\n checksum = UBInt16()\n data = Payload(length)\n\n\n class IPV4Frame(Structure):\n options = BitField(64,\n version=BitNum(4),\n internet_header_length=BitNum(4),\n differentiated_services_code_point=BitNum(6),\n explicit_congestion_notification=BitNum(2),\n total_length=BitNum(16),\n identification=BitNum(16),\n flags=BitNum(3),\n fragment_offset=BitNum(13),\n )\n time_to_live = UBInt8()\n protocol = DispatchField(UBInt8())\n header_checksum = UBInt16()\n source_ip_address = UBInt32()\n destination_ip_address = UBInt32()\n\nFrom these declarative definitions, you can both create message\ninstances and pack them or parse bytes (including stream parsing) to get\nobjects that you can do with as you please.\n\nFor more information, including how to use the structures that you have\ndescribed, please refer to the `Full\nDocumentation `__.\n\nDesign Goals\n============\n\nThe library seeks to adhere to these core principles:\n\n- Simple Interfaces\n\n Interfaces to the library should be simple and there should be a\n logical consistency in the library API. Internally, advanced language\n techniques are used, but the API consumer shouldn\u2019t need to be aware\n of these details.\n\n- Declarative Syntax\n\n Wherever appropriate, the library should seek to provide a syntax for\n specifying protocols that is as declarative as possible. These\n declarations should be explicit and it should be clear what is being\n declared.\n\n- Informative Error Messages\n\n When implementing a protocol, you usually don\u2019t get it right the\n first time. The library should use all available information to\n provide information to the API consumer that can help them figure out\n what is going wrong easily.\n\n- Common Use Cases Should Be Easy\n\n There are certain data types/patterns that are common amongst\n protocols. The library should include code to help with these cases\n to make the programmer\u2019s life easier.\n\n- Less Common Use Cases Should Be Possible\n\n When there is a protocol that is significantly different than the\n norm, the library should still provide some useful code that can be\n reused. Some parts of the library might need to be abandoned, but the\n hope would be that one would not need to start from scratch.\n\nLicense\n=======\n\nThis software is open-source software. Copyright Digi International,\n2015.\n\nThis Source Code Form is subject to the terms of the Mozilla Public\nLicense, v. 2.0. If a copy of the MPL was not distributed with this\nfile, you can obtain one at http://mozilla.org/MPL/2.0/.\n\n.. |Build Status| image:: https://travis-ci.org/digidotcom/python-suitcase.svg?branch=master\n :target: https://travis-ci.org/digidotcom/python-suitcase\n.. |Coverage Status| image:: https://img.shields.io/coveralls/digidotcom/python-suitcase.svg\n :target: https://coveralls.io/r/digidotcom/python-suitcase\n.. |Code Climate| image:: https://img.shields.io/codeclimate/github/digidotcom/python-suitcase.svg\n :target: https://codeclimate.com/github/digidotcom/python-suitcase\n.. |Latest Version| image:: https://img.shields.io/pypi/v/suitcase.svg\n :target: https://pypi.python.org/pypi/suitcase/\n.. |License| image:: https://img.shields.io/badge/license-MPL%202.0-blue.svg\n :target: https://github.com/digidotcom/python-suitcase/blob/master/LICENSE.txt\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/digidotcom/python-suitcase", "keywords": "suitcase,construct,declarative,dsl,protocol,binary,parser,builder,pack,unpack", "license": "", "maintainer": "", "maintainer_email": "", "name": "suitcase", "package_url": "https://pypi.org/project/suitcase/", "platform": "", "project_url": "https://pypi.org/project/suitcase/", "project_urls": { "Homepage": "https://github.com/digidotcom/python-suitcase" }, "release_url": "https://pypi.org/project/suitcase/0.11.0/", "requires_dist": [ "six" ], "requires_python": "", "summary": "A library for specifying/parsing/packing binary protocols", "version": "0.11.0" }, "last_serial": 4985249, "releases": { "0.10": [ { "comment_text": "", "digests": { "md5": "74a2d1c4fa74d51262a35c5a4e815740", "sha256": "495ae96f56bed998aa4973a14ae76632ab39285464c5bfa691da8298698fa945" }, "downloads": -1, "filename": "suitcase-0.10.tar.gz", "has_sig": false, "md5_digest": "74a2d1c4fa74d51262a35c5a4e815740", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 35249, "upload_time": "2016-10-20T16:40:36", "url": "https://files.pythonhosted.org/packages/c1/6c/46a4bedf7dac483a8ef205089d96d7f315fe3d794c489e269274c2413e92/suitcase-0.10.tar.gz" } ], "0.10.1": [ { "comment_text": "", "digests": { "md5": "1ff9b963b4eeaec65f28f3d91bf11f43", "sha256": "df25428bb6fd0acc45f018c12e6bef1120383e6e8131c2ca05f7e983e3ae22d9" }, "downloads": -1, "filename": "suitcase-0.10.1.tar.gz", "has_sig": false, "md5_digest": "1ff9b963b4eeaec65f28f3d91bf11f43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 35257, "upload_time": "2016-10-20T16:47:40", "url": "https://files.pythonhosted.org/packages/af/86/1a223667dd2208a2e5733e16e25cf44d6f97c58d908986b39f172fd0fd15/suitcase-0.10.1.tar.gz" } ], "0.10.2": [ { "comment_text": "", "digests": { "md5": "70edb624832dbf48e574ef5a96158e4f", "sha256": "8ad8a32b782a84d839224ed97a7331d2a81974bd646e5f8284742b3c280416f9" }, "downloads": -1, "filename": "suitcase-0.10.2.tar.gz", "has_sig": false, "md5_digest": "70edb624832dbf48e574ef5a96158e4f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 35989, "upload_time": "2016-10-20T17:45:23", "url": "https://files.pythonhosted.org/packages/c9/c1/07486d477f892cb38e6658a8f73266f84d00c55959d8033dfd13c202a5f1/suitcase-0.10.2.tar.gz" } ], "0.11.0": [ { "comment_text": "", "digests": { "md5": "74e21afa5c2b089cb174918fb7b5bbb2", "sha256": "496dc07790d0e0882bc121e08face7d63bd76740adaf87bd27de04539035ed0e" }, "downloads": -1, "filename": "suitcase-0.11.0-py3-none-any.whl", "has_sig": false, "md5_digest": "74e21afa5c2b089cb174918fb7b5bbb2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 46164, "upload_time": "2019-03-26T00:06:42", "url": "https://files.pythonhosted.org/packages/a6/18/5812df598febe51d87287feb82d6b37cf56a358ec11f89bc8e089971ee9f/suitcase-0.11.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5768f6ff2683d2923b0e353a90fc4ac7", "sha256": "41dcae3eed3999189c06b1a060b5057f21770049a660467487164649d6b83527" }, "downloads": -1, "filename": "suitcase-0.11.0.tar.gz", "has_sig": false, "md5_digest": "5768f6ff2683d2923b0e353a90fc4ac7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37466, "upload_time": "2019-03-26T00:06:44", "url": "https://files.pythonhosted.org/packages/3c/de/a0ae0222a60f10ed31ec1b09957746778c9bf9298b60a1098a6c184abbf4/suitcase-0.11.0.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "ecde52137c83087099169b091680f383", "sha256": "1ac699a18eec92f6e43218252613c854022545400749cc3fd870f412a2488e83" }, "downloads": -1, "filename": "suitcase-0.6.tar.gz", "has_sig": false, "md5_digest": "ecde52137c83087099169b091680f383", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29481, "upload_time": "2015-06-24T22:41:45", "url": "https://files.pythonhosted.org/packages/f1/91/42c9b51dc3a77cbd12c9789cb8e339cf8b6269096f4af3f686a17cd0b9bc/suitcase-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "6f5d6e58d3479c1022d81d7efef5c794", "sha256": "edd2cbf2c3e97a1edf7c5273cc229c75a27b56313cda0c98eb6fe91fee230236" }, "downloads": -1, "filename": "suitcase-0.7.tar.gz", "has_sig": false, "md5_digest": "6f5d6e58d3479c1022d81d7efef5c794", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29974, "upload_time": "2015-07-30T00:15:40", "url": "https://files.pythonhosted.org/packages/b1/6a/33bff1e263cf84fe5d87802b04f8e01ddc4f0d10a10c479e4669a7b26b9e/suitcase-0.7.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "f29e43d1a4dbd7f3c317c0d06b9eb279", "sha256": "cdaf4e40e53b0351079b8357ae35a14754e904b23e0ef1dfa648f55626919b11" }, "downloads": -1, "filename": "suitcase-0.8.tar.gz", "has_sig": false, "md5_digest": "f29e43d1a4dbd7f3c317c0d06b9eb279", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33716, "upload_time": "2015-10-03T05:07:39", "url": "https://files.pythonhosted.org/packages/5f/b3/1198cd555188c5c20cbd8273aac8912f81a8f2779e929b98b79c97321dd0/suitcase-0.8.tar.gz" } ], "0.9": [ { "comment_text": "", "digests": { "md5": "ed9a076d33fbe8d6a8c1dd264a6628a1", "sha256": "aa9a013e51216fce357cd74ace6fc364f442c7f6243eb3a1682d63ed27acac21" }, "downloads": -1, "filename": "suitcase-0.9.tar.gz", "has_sig": false, "md5_digest": "ed9a076d33fbe8d6a8c1dd264a6628a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34696, "upload_time": "2015-11-12T23:52:48", "url": "https://files.pythonhosted.org/packages/8f/c4/c23b1b15c2fa8ee85e1b2c6595129d5a02670c64b2bcdf877aca346f0df8/suitcase-0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "74e21afa5c2b089cb174918fb7b5bbb2", "sha256": "496dc07790d0e0882bc121e08face7d63bd76740adaf87bd27de04539035ed0e" }, "downloads": -1, "filename": "suitcase-0.11.0-py3-none-any.whl", "has_sig": false, "md5_digest": "74e21afa5c2b089cb174918fb7b5bbb2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 46164, "upload_time": "2019-03-26T00:06:42", "url": "https://files.pythonhosted.org/packages/a6/18/5812df598febe51d87287feb82d6b37cf56a358ec11f89bc8e089971ee9f/suitcase-0.11.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5768f6ff2683d2923b0e353a90fc4ac7", "sha256": "41dcae3eed3999189c06b1a060b5057f21770049a660467487164649d6b83527" }, "downloads": -1, "filename": "suitcase-0.11.0.tar.gz", "has_sig": false, "md5_digest": "5768f6ff2683d2923b0e353a90fc4ac7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37466, "upload_time": "2019-03-26T00:06:44", "url": "https://files.pythonhosted.org/packages/3c/de/a0ae0222a60f10ed31ec1b09957746778c9bf9298b60a1098a6c184abbf4/suitcase-0.11.0.tar.gz" } ] }