{ "info": { "author": "Mike Johnson", "author_email": "mike@mrj0.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable" ], "description": "Vinyl\n===========================\n\nMutable record type for dealing with flat files like CSV or pipe delimited data.\n\nDealing with flat files is painful. Instead, use vinyl to declaratively describe and validate\ncommon flat file formats. Vinyl gives you the convenience of attribute-style access\nlike a namedtuple, but in a mutable data type suitable for easily transforming data.\n\n.. code:: python\n\n import os\n import csv\n from vinyl.record import Record\n from vinyl.fields import VarCharField, FixedCharField\n\n # declare the data format\n class TestRecord(Record):\n customer_name = VarCharField(max_length=50)\n customer_number = FixedCharField(field_length=10, pad_with='0', justify='right' )\n start_time = FixedCharField(value='00:00:00', field_length=8)\n\n # create an instance\n record = TestRecord()\n\n # read data from a file\n with open(os.path.join(os.path.dirname(__file__), 'example.txt')) as f:\n reader = csv.reader(f)\n # copy a row of CSV data to the recordinstance\n record._load(*reader.next())\n\n # check the name was read correctly\n assert record.customer_name == 'a customer name with max length=50'\n\n # set a different customer number\n record.customer_number = '3'\n\n # number is reformatted according to the field settings\n assert record.customer_number == '0000000003'\n\n # a static field\n assert record.start_time == '00:00:00'\n\n print repr(record)\n # >>> TestRecord(customer_name=u'a customer name with max length=50',\n # customer_number=u'0000000003', start_time=u'00:00:00')\n\nSupport\n-------\n\nFor issues and source control, use github:\n\nhttps://github.com/mrj0/vinyl/", "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/mrj0/vinyl/", "keywords": null, "license": "BSD License", "maintainer": null, "maintainer_email": null, "name": "vinyl", "package_url": "https://pypi.org/project/vinyl/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/vinyl/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/mrj0/vinyl/" }, "release_url": "https://pypi.org/project/vinyl/0.6/", "requires_dist": null, "requires_python": null, "summary": "Mutable record type for dealing with flat files like CSV or pipe-delimited data", "version": "0.6" }, "last_serial": 1862106, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "0c8cdaba63a2a07d45893528481a68d9", "sha256": "1ff27c8e59e1d26b34e52052347b2fe01cae1513d227ef972af8bee37b7b1c11" }, "downloads": -1, "filename": "vinyl-0.1.tar.gz", "has_sig": false, "md5_digest": "0c8cdaba63a2a07d45893528481a68d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3715, "upload_time": "2012-06-27T02:26:57", "url": "https://files.pythonhosted.org/packages/18/dd/f32d099c66b197309b54babbc3be1424d955f45a602b85509a0f3407b5ee/vinyl-0.1.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "67716c931eedd71cd2d57799f8ca4154", "sha256": "f1d4b300acb3e215c5fc9bbadaa9273fa388ea954fe561297e816dd432dc2e61" }, "downloads": -1, "filename": "vinyl-0.3.tar.gz", "has_sig": false, "md5_digest": "67716c931eedd71cd2d57799f8ca4154", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3855, "upload_time": "2012-06-27T02:29:10", "url": "https://files.pythonhosted.org/packages/53/27/d79f93ef9c7d0d4b44dfd5decd873c8a4926c3f76cdb6ff72f01cc7ab6a0/vinyl-0.3.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "808dadb10ca980e54d16c0d3b2a05704", "sha256": "3eb4026459ab604e5da54dd9763af6b6148f877cd0e77c5e148068ae4048171e" }, "downloads": -1, "filename": "vinyl-0.5.tar.gz", "has_sig": false, "md5_digest": "808dadb10ca980e54d16c0d3b2a05704", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4014, "upload_time": "2012-06-30T02:14:36", "url": "https://files.pythonhosted.org/packages/c1/6f/8002e1af4b5d4b23bfdafa028904e6da291e66a13ff58b52a19d6b792289/vinyl-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "1b1f5f14c02599e7916d47752ad9d08c", "sha256": "6c970642d7e81c76c3d8ad59bf8196b377a931781960f751772d64917457bd83" }, "downloads": -1, "filename": "vinyl-0.6.tar.gz", "has_sig": false, "md5_digest": "1b1f5f14c02599e7916d47752ad9d08c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4422, "upload_time": "2015-12-14T18:43:54", "url": "https://files.pythonhosted.org/packages/9a/69/d5dc91ba24a36f536da49fe584b16242e0fe9a80177ac06434a2b22b7017/vinyl-0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1b1f5f14c02599e7916d47752ad9d08c", "sha256": "6c970642d7e81c76c3d8ad59bf8196b377a931781960f751772d64917457bd83" }, "downloads": -1, "filename": "vinyl-0.6.tar.gz", "has_sig": false, "md5_digest": "1b1f5f14c02599e7916d47752ad9d08c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4422, "upload_time": "2015-12-14T18:43:54", "url": "https://files.pythonhosted.org/packages/9a/69/d5dc91ba24a36f536da49fe584b16242e0fe9a80177ac06434a2b22b7017/vinyl-0.6.tar.gz" } ] }