{ "info": { "author": "John Glasgow", "author_email": "jglasgow@northampton.edu", "bugtrack_url": null, "classifiers": [ "Operating System :: OS Independent", "Programming Language :: Python :: 3.7" ], "description": "## SimpleFixedWidth ##\n_A simple and very lightweight library for working with fixed width files._\n\n#### Fixed_Width_Spec ####\nclass **Field** \n\nSignature \n\n` Field(number: int, name: int, string: bool, size:int)`\n\n* number: int (Positional identifier for the field)\n* name: str (Name of the field)\n* string: bool (Indicates if the field is a string, if false it is numeric)\n* size: int (Length of the field)\n\nExample \n\n`Field(5, 'Name', True, 30)`\n\nclass **RecordType** \n\nSignature \n\n` RecordType(name=\"\", fields=[])`\n\n* name: str (Name of the RecordType, if you have more than one)\n* fields: list (List of fields for the specification tied to the RecordType)\n* field_widths: tuple (Returns tuple of the widths from the fields)\n* field_names: list (Returns list of the field names)\n\n#### Fixed_Width_Record ####\nfunction **get_fields**\n\nSlices a string 's' in segments 'args' wide. Negative widths represent ignored padding fields.\n\n**Parameters**\n* s: string\n* args: list of widths for the string, negative numbers are skipped\n\n**Returns** string 's' in a list, minus the skipped fields\n\nfunction **get_line**\n\nTakes a string and extracts the record identifier if it exists. \n\n**Parameters**\n\n* string (String to be sliced into a list of fields)\n* rec_type_start=-1 (If the string contains a record identifier, this will start to parse it out)\n* rec_type_end=-1 (If the string contains a record identifier, this will end to parse it out)\n\n**Returns** \nTuple of the record identifier and the string it was in.\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/N-C-C/simplefixedwidth", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "SimpleFixedWidth", "package_url": "https://pypi.org/project/SimpleFixedWidth/", "platform": "", "project_url": "https://pypi.org/project/SimpleFixedWidth/", "project_urls": { "Homepage": "https://github.com/N-C-C/simplefixedwidth" }, "release_url": "https://pypi.org/project/SimpleFixedWidth/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "A simple python library for quickly parsing records in a fixed width format.", "version": "0.0.2" }, "last_serial": 4475641, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "7a74d4166e63190a9f097c6ba84c8afb", "sha256": "ef2e054e6bc0568d75993b7a9de05b48599378f9731ad6ce0c60e72a671ceca9" }, "downloads": -1, "filename": "SimpleFixedWidth-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7a74d4166e63190a9f097c6ba84c8afb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3777, "upload_time": "2018-11-11T22:51:18", "url": "https://files.pythonhosted.org/packages/a8/01/696a0702af1284a2432298b5f5f66e06e5c2dd642f86ba08d98639511a89/SimpleFixedWidth-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "acca36a090a4f73b04e5199481247eb2", "sha256": "6645162db503dfd76df5510809705b275fcbccb0fbca93b3eb951df4c3abb885" }, "downloads": -1, "filename": "SimpleFixedWidth-0.0.1.tar.gz", "has_sig": false, "md5_digest": "acca36a090a4f73b04e5199481247eb2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2205, "upload_time": "2018-11-11T22:51:20", "url": "https://files.pythonhosted.org/packages/dc/67/b0e15083a313fb1d77ee8b3452cb0cc95c2efe67de8c6899100522761c84/SimpleFixedWidth-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "0d3ea483f6ffd5085dec526cfa92c8d6", "sha256": "b4e58dfa476465e6bd68a3c09d4a1df870ffce5ec996fd3372da4ff899822694" }, "downloads": -1, "filename": "SimpleFixedWidth-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "0d3ea483f6ffd5085dec526cfa92c8d6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4739, "upload_time": "2018-11-12T00:56:45", "url": "https://files.pythonhosted.org/packages/1e/1d/7f91cc71410d33e0451bc6b7139212376c980834a42f0ed2c13a391e9954/SimpleFixedWidth-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d23f33ae50c7067fc7558f3e321ebc12", "sha256": "59ce222698e2335d5901d4e35d9177d4132fb716fd9d428a77c26d3bd9bcd0a6" }, "downloads": -1, "filename": "SimpleFixedWidth-0.0.2.tar.gz", "has_sig": false, "md5_digest": "d23f33ae50c7067fc7558f3e321ebc12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2204, "upload_time": "2018-11-12T00:56:46", "url": "https://files.pythonhosted.org/packages/b4/06/414db257afa1940b78f1add4aa5fdaf5fa53f50a8b47e0340af034322a9b/SimpleFixedWidth-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0d3ea483f6ffd5085dec526cfa92c8d6", "sha256": "b4e58dfa476465e6bd68a3c09d4a1df870ffce5ec996fd3372da4ff899822694" }, "downloads": -1, "filename": "SimpleFixedWidth-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "0d3ea483f6ffd5085dec526cfa92c8d6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4739, "upload_time": "2018-11-12T00:56:45", "url": "https://files.pythonhosted.org/packages/1e/1d/7f91cc71410d33e0451bc6b7139212376c980834a42f0ed2c13a391e9954/SimpleFixedWidth-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d23f33ae50c7067fc7558f3e321ebc12", "sha256": "59ce222698e2335d5901d4e35d9177d4132fb716fd9d428a77c26d3bd9bcd0a6" }, "downloads": -1, "filename": "SimpleFixedWidth-0.0.2.tar.gz", "has_sig": false, "md5_digest": "d23f33ae50c7067fc7558f3e321ebc12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2204, "upload_time": "2018-11-12T00:56:46", "url": "https://files.pythonhosted.org/packages/b4/06/414db257afa1940b78f1add4aa5fdaf5fa53f50a8b47e0340af034322a9b/SimpleFixedWidth-0.0.2.tar.gz" } ] }