{ "info": { "author": "imtapps", "author_email": "webadmin@imtapps.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing", "Topic :: Utilities" ], "description": "This app allows you to convert objects into fixed width records.\n\nIn version 0.1.0 we introduce an entirely new (albeit similar) interface\nthat breaks all dependency on Django and removes the necessity of\nmanually setting the order of fields. We call it 'fixedwidth'.\n\nUsage:\n\n from djcopybook.fixedwidth import Record\n from djcopybook.fixedwidth import fields \n\n class Person(Record):\n first_name = fields.StringField(length=20)\n last_name = fields.StringField(length=30)\n siblings = fields.IntegerField(length=2)\n birth_date = fields.DateField(length=10, format=\"%Y-%m-%d\")\n\n >>> p = Person(first_name=\"Joe\", last_name=\"Smith\", siblings=3, birth_date=\"1982-09-11\")\n >>> p.birth_date\n datetime.date(1982, 9, 11)\n >>> p.to_record()\n 'Joe Smith 031982-09-11'\n\nYou can also set attributes after a record has been instantiated, give\nfields default values, and other fun stuff.\n\nWhen you have a record instance, the data values will always be their\npython value, and when you do a to_record on the Record as a whole or\nan individual field it will have the fixedwidth format.\n\n\nNew in version 0.1.1:\n ListField: lets you have one field whose values are made of another\n complete record. Similar to COBOL's OCCURS functionality. Declaring\n length on the ListField tells how many times that record repeats.\n\n USAGE:\n class PhoneNumber(Record):\n identifier = fields.StringField(length=10, default=\"Mobile\")\n area_code = fields.IntegerField(length=3)\n prefix = fields.IntegerField(length=3)\n line_number = fields.IntegerField(length=4)\n\n class Person(Record):\n first_name = fields.StringField(length=20)\n last_name = fields.StringField(length=30)\n siblings = fields.IntegerField(length=2)\n birth_date = fields.DateField(length=10, format=\"%Y-%m-%d\")\n phone_numbers = fields.ListField(record=PhoneNumber, length=3)\n\n >>> phone_one = PhoneNumber(area_code=515, prefix=555, line_number=2222)\n >>> person = Person(first_name=\"Joe\", last_name=\"Smith\", siblings=3,\n birth_date=\"1982-09-11\", phone_numbers=[phone_one])\n\n >>> person.to_record()\n 'Joe Smith 031982-09-11Mobile 5155552222Mobile 0000000000Mobile 0000000000'\n\n\nNew in version 0.1.2:\n Convert records from a fixed width format back into record objects\n\n USAGE:\n class Person(Record):\n first_name = fields.StringField(length=20)\n last_name = fields.StringField(length=30)\n siblings = fields.IntegerField(length=2)\n birth_date = fields.DateField(length=10, format=\"%Y-%m-%d\")\n\n >>> fixedwidth_record = 'Joe Smith 031982-09-11'\n >>> person = Person.from_record(fixedwidth_record)\n >>> person.first_name\n 'Joe'\n >>> person.last_name\n 'Smith'\n >>> person.siblings\n 3\n >>> person.birth_date\n datetime.date(1982, 9, 11)\n\n\nNew in version 0.1.6:\n FragmentField: Similar to the ListField, but only occurring one time.\n Useful if you have a common element included in multiple Records.\n\n USAGE:\n class Phone(Record):\n area_code = fields.IntegerField(length=3)\n prefix = fields.IntegerField(length=3)\n line_number = fields.IntegerField(length=4)\n\n class Contact(Record):\n name = fields.StringField(length=30)\n phone_number = fields.FragmentField(record=Phone)\n email = fields.StringField(length=30)\n\n >>> phone = PhoneNumber(area_code=515, prefix=555, line_number=2222)\n >>> contact = Contact(name=\"Joe\", phone_number=phone, email=\"joe@example.com\")\n >>> contact.to_record()\n 'Joe 5155552222joe@example.com '\n\n\n or:\n\n >>> contact = Contact(name=\"Joe\", email=\"joe@example.com\")\n >>> contact.phone_number.area_code = 515\n >>> contact.phone_number.prefix = 555\n >>> contact.phone_number.line_number = 2222\n >>> contact.to_record()\n 'Joe 5155552222joe@example.com '\n\n\nNew in version 0.1.7:\nYou can now populate a record object with a dictionary containing more items\nthan the record has fields. The record will use the values if it has the\nassociated fields, but will ignore extra data.\n\nThis is useful when populating records from a form's cleaned_data for instance\nif the form has more data than that specific record wants.\n\n\nNew in version 0.1.9:\n``Record`` now has an ``auto_truncate`` attribute you can set to\ntruncate each field down to the expected size instead of raising an error.\n USAGE:\n class Sample(Record):\n field = fields.StringField(length=5)\n\n >>> s = Sample(field='this is too long')\n >>> str(s)\n 'this '\n\n\nNotes:\n Because we are using OrderedDict, the new fixedwidth implementation\n will only work on Python 2.7 and above. (you can copy the OrderdDict\n class yourself if you need < 2.7)\n\n The previous Django model implementation is pending deprecation.", "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/imtapps/django-copybook", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-copybook", "package_url": "https://pypi.org/project/django-copybook/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-copybook/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/imtapps/django-copybook" }, "release_url": "https://pypi.org/project/django-copybook/1.2.1/", "requires_dist": null, "requires_python": null, "summary": "Convert Objects and Django models to/from fixed format records.", "version": "1.2.1" }, "last_serial": 1813619, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "7213c4475e064a5eb27b7b130451fcc2", "sha256": "778bd6a8076d8d17bf028422bacd4328056727b35a05aa13eebe07f60977fc71" }, "downloads": -1, "filename": "django-copybook-0.0.2.tar.gz", "has_sig": false, "md5_digest": "7213c4475e064a5eb27b7b130451fcc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6722, "upload_time": "2011-08-12T17:20:08", "url": "https://files.pythonhosted.org/packages/ba/91/65db32a518c1f24c7ceb2301fa549e70a39eb0803d86bd4423f6c4782e5a/django-copybook-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "2d705ee3e454cb5c76d4f609a19d90a3", "sha256": "d27e4bde76f6edc75c75f64be0b05218f78b1fec1f731391b1df378ca817fc07" }, "downloads": -1, "filename": "django-copybook-0.0.3.tar.gz", "has_sig": false, "md5_digest": "2d705ee3e454cb5c76d4f609a19d90a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6723, "upload_time": "2011-08-12T18:00:59", "url": "https://files.pythonhosted.org/packages/8c/aa/cc7f833de67020dd28ccf83bdf25fb0982f25223a47eedf3b7ff555c8d1a/django-copybook-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "740e7d1582dced0967297cba3b066da4", "sha256": "023164269ea156db1f6beb29a26cb3772218c4a83156bedf7cabaa760f800971" }, "downloads": -1, "filename": "django-copybook-0.0.4.tar.gz", "has_sig": false, "md5_digest": "740e7d1582dced0967297cba3b066da4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6725, "upload_time": "2011-08-12T18:09:35", "url": "https://files.pythonhosted.org/packages/87/11/765f6a846d251e849427174f08d77973a3aaddc14fd4c8b855e6c07279a3/django-copybook-0.0.4.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "7434058e0a728d81f5ae53b4c0c0e328", "sha256": "6bb3d4a95f93f0b70f290acda3ab459def675cdd712479f70ad7530d73b3869f" }, "downloads": -1, "filename": "django-copybook-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7434058e0a728d81f5ae53b4c0c0e328", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16344, "upload_time": "2011-09-01T18:14:12", "url": "https://files.pythonhosted.org/packages/2d/0d/0227c4f9caa1e9b9ae7305d44c2e3635c34c88824dbc06f1192e9ba603d6/django-copybook-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "46a2cb4dd5c4b6fcddbc859cfef05374", "sha256": "f383b048f025c2ddab201bd839a56ee3a9c29e243f324823bc626ff3fe6db019" }, "downloads": -1, "filename": "django-copybook-0.1.1.tar.gz", "has_sig": false, "md5_digest": "46a2cb4dd5c4b6fcddbc859cfef05374", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17778, "upload_time": "2011-09-01T21:58:04", "url": "https://files.pythonhosted.org/packages/ac/af/a2e04ff2e337b843dc8d6d88fa83ecdd4984a0c92a4519b6b805c113e01a/django-copybook-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "d7f836741cebe82485b8458e6f87a34e", "sha256": "5364e889c45fb71bbe3d32a8b676c37fd3a109ba5ab2bfa9833615c4adbf7d6a" }, "downloads": -1, "filename": "django-copybook-0.1.2.tar.gz", "has_sig": false, "md5_digest": "d7f836741cebe82485b8458e6f87a34e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18744, "upload_time": "2011-09-02T22:27:00", "url": "https://files.pythonhosted.org/packages/8b/ec/928857954e997a7751b05e51428cbce132c8cc55b20a321bbfab542b1a0e/django-copybook-0.1.2.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "cc676b048146a5591f2169c8c1a26b8a", "sha256": "03e03933bae1ec1b0b9c67b2f1e2a1f5decc8955dcd759d4f770e4ca9b177f05" }, "downloads": -1, "filename": "django-copybook-0.1.4.tar.gz", "has_sig": false, "md5_digest": "cc676b048146a5591f2169c8c1a26b8a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18195, "upload_time": "2011-11-21T18:58:22", "url": "https://files.pythonhosted.org/packages/73/5d/d5ba8d6f9c2e733a6759a7c3893ed35d062a56ad4fdca48a1c3249a1ea83/django-copybook-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "c7ac8cd8f5946b89c7477b2facbafafe", "sha256": "52d3f30ef6d9a78395187df5ed25006d01ecc3fd5276e99083b36c69a8f6226e" }, "downloads": -1, "filename": "django-copybook-0.1.5.tar.gz", "has_sig": false, "md5_digest": "c7ac8cd8f5946b89c7477b2facbafafe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18197, "upload_time": "2011-11-29T18:04:57", "url": "https://files.pythonhosted.org/packages/f5/4b/06990eb624b4b2e541b606ea618a3d00f622f5ae110d3019372f5a966d7d/django-copybook-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "35bb61143337eee0eb428d1468c7f854", "sha256": "0777f9b35cbed81973002229b48d70e17a9cb2d05f85b1faed101a44e6ffc908" }, "downloads": -1, "filename": "django-copybook-0.1.6.tar.gz", "has_sig": false, "md5_digest": "35bb61143337eee0eb428d1468c7f854", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19168, "upload_time": "2012-01-19T22:55:53", "url": "https://files.pythonhosted.org/packages/ed/1e/dfd67558bbaeedf78598148898a239774789d0a255e20f7a916efd1daa01/django-copybook-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "5c81979286350202016a5882679dccb5", "sha256": "19c39c2f440d038b094984d4a539d86a5ad56ed7323bfa3e41fdc72370bd6d59" }, "downloads": -1, "filename": "django-copybook-0.1.7.tar.gz", "has_sig": false, "md5_digest": "5c81979286350202016a5882679dccb5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19315, "upload_time": "2012-01-27T17:47:15", "url": "https://files.pythonhosted.org/packages/b8/e6/407aa1e47d98a03767c5ee714d45994d25409305f8bf42c3c0f9e6d6cd35/django-copybook-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "1848c88e35c0b3a2e68bf10fb5f2d18a", "sha256": "55b34778976f44aed5c1498f194768904774f90f72bae6df4194b13978a8dc38" }, "downloads": -1, "filename": "django-copybook-0.1.8.tar.gz", "has_sig": false, "md5_digest": "1848c88e35c0b3a2e68bf10fb5f2d18a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19470, "upload_time": "2012-02-08T20:08:27", "url": "https://files.pythonhosted.org/packages/96/83/60e4573ce8943ed98c8ec89f994e5826cd00923814dc145d2aa29bf67e14/django-copybook-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "50d38fa643c06f4a9b33c642c4b05203", "sha256": "c409bc59200287bea6b8eff679b4eb7ffe61de714c961e455ed5f50827bef3c5" }, "downloads": -1, "filename": "django-copybook-0.1.9.tar.gz", "has_sig": false, "md5_digest": "50d38fa643c06f4a9b33c642c4b05203", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19923, "upload_time": "2012-03-21T16:20:29", "url": "https://files.pythonhosted.org/packages/70/61/7743bdabc79ecc00aca2bd250c079377117f3dfa9008db034dfab373c976/django-copybook-0.1.9.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "b7ebbe83eb0dc46094973dc698ea2304", "sha256": "ab893b273278ce3a74f383e8490b63d5a2593ece2d12eae8959596b24b948551" }, "downloads": -1, "filename": "django-copybook-0.2.1.tar.gz", "has_sig": false, "md5_digest": "b7ebbe83eb0dc46094973dc698ea2304", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21804, "upload_time": "2013-01-22T17:34:50", "url": "https://files.pythonhosted.org/packages/55/48/3e148a4ff8aaafbd0380fa0bdeca7a8fb413644ceb30ba6d549ab5ed5515/django-copybook-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "2dc7679a7c68c8dbb3e6d320e09ac87e", "sha256": "d376a00e283891ab443c71ea8615d5503edaba0a43e6ecd546fe3ed82e564f70" }, "downloads": -1, "filename": "django-copybook-0.2.2.tar.gz", "has_sig": false, "md5_digest": "2dc7679a7c68c8dbb3e6d320e09ac87e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21931, "upload_time": "2013-01-22T18:23:44", "url": "https://files.pythonhosted.org/packages/75/19/aef071d36a7d8c1daad16c32f4405c22f58c1ad483a650f7b686fc66a5fb/django-copybook-0.2.2.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "9fa5745ccbbf5a050ea7569778575f2f", "sha256": "d561049b025ef5fdd29a0e60a02af2fe82819b5b0db9366e379150c121e0ff4b" }, "downloads": -1, "filename": "django-copybook-0.2.4.tar.gz", "has_sig": false, "md5_digest": "9fa5745ccbbf5a050ea7569778575f2f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22852, "upload_time": "2013-09-27T21:05:41", "url": "https://files.pythonhosted.org/packages/d8/8d/25ba310e52dc20e198512cc00c6f44b085533afe56043a4c6644cb909bae/django-copybook-0.2.4.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "ec4e633dad99f500cca5ccbb2e17b303", "sha256": "74608e5b822b80ea3175f2dcbf56d414d6f1b7cbb3a1a76926d53cd3cc68fd3d" }, "downloads": -1, "filename": "django-copybook-1.0.0.tar.gz", "has_sig": false, "md5_digest": "ec4e633dad99f500cca5ccbb2e17b303", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12462, "upload_time": "2013-10-25T16:45:53", "url": "https://files.pythonhosted.org/packages/bc/ac/25b31c59354119b5b9942b1f0c8eaefe477a7cc2b0424aa191ca142915ae/django-copybook-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "0d32c22bfb37de4e1a7402a6ea046576", "sha256": "2f13e19ec7f1412e24f383934ac6884df074e92039b18b9ba49f55ad41c6aa10" }, "downloads": -1, "filename": "django-copybook-1.0.1.tar.gz", "has_sig": false, "md5_digest": "0d32c22bfb37de4e1a7402a6ea046576", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12574, "upload_time": "2013-10-25T17:28:02", "url": "https://files.pythonhosted.org/packages/b4/24/4aa7c9439ff39d921961b557f24cdde364cca4fa7d3e4a3f4a97c54749a6/django-copybook-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "21fa9ad78807249951b37d99f0865a89", "sha256": "583351143f2d4e370aeccd4529914ab5c1776bcfb3e68478b2d3ccb978a7245b" }, "downloads": -1, "filename": "django-copybook-1.0.2.tar.gz", "has_sig": false, "md5_digest": "21fa9ad78807249951b37d99f0865a89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12629, "upload_time": "2013-10-25T17:50:30", "url": "https://files.pythonhosted.org/packages/cb/04/7ae89da8ebfa010377e2671a4b4cd25bdbe907adca6e6f280a9baa49cd43/django-copybook-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "fd1f1dd01a7e142709591218b3bba353", "sha256": "0401913e905883fa798f84ef577946dfd6c5644ec555346b1ce588f0e0a3c381" }, "downloads": -1, "filename": "django-copybook-1.0.3.tar.gz", "has_sig": false, "md5_digest": "fd1f1dd01a7e142709591218b3bba353", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12499, "upload_time": "2013-10-30T15:10:32", "url": "https://files.pythonhosted.org/packages/51/cc/53e668decce9cac989fde540777c5a91beefe95d8b5be5660d24fabe8a35/django-copybook-1.0.3.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "baf409b91206a789e541c2c92395e753", "sha256": "70cd8cebccb9873aef3e6a4cfca11c102a8e8cc374690be2da70bd37f3591daf" }, "downloads": -1, "filename": "django-copybook-1.2.0.tar.gz", "has_sig": false, "md5_digest": "baf409b91206a789e541c2c92395e753", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14794, "upload_time": "2015-11-12T15:57:03", "url": "https://files.pythonhosted.org/packages/44/26/fd1fea84c75d027d283f361d56f924a53ed54fcf61f366566b0342984015/django-copybook-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "fe37e7cbb42995b9ebc078c04876280e", "sha256": "e8797d4539be23bcdafa53d3a591a846de1e76cf6d4f9d86b5483099e292cda3" }, "downloads": -1, "filename": "django-copybook-1.2.1.tar.gz", "has_sig": false, "md5_digest": "fe37e7cbb42995b9ebc078c04876280e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14919, "upload_time": "2015-11-12T19:51:49", "url": "https://files.pythonhosted.org/packages/6a/bf/11b49de251f2c347dda7d6310941b5c21d5cc8ff0dd880a335b672c785d9/django-copybook-1.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fe37e7cbb42995b9ebc078c04876280e", "sha256": "e8797d4539be23bcdafa53d3a591a846de1e76cf6d4f9d86b5483099e292cda3" }, "downloads": -1, "filename": "django-copybook-1.2.1.tar.gz", "has_sig": false, "md5_digest": "fe37e7cbb42995b9ebc078c04876280e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14919, "upload_time": "2015-11-12T19:51:49", "url": "https://files.pythonhosted.org/packages/6a/bf/11b49de251f2c347dda7d6310941b5c21d5cc8ff0dd880a335b672c785d9/django-copybook-1.2.1.tar.gz" } ] }