{ "info": { "author": "Ram Prakash Jayapalan", "author_email": "ramp16888@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "File split made easy for python programmers!\n\nA python module that can split files of any size into multiple chunks,\nwith optimum use of memory and without compromising on performance. The\nmodule determines the splits based on the new line character in the\nfile, therefore not writing incomplete lines to the file splits. The\nfile splits are numbered from 1 to n as follows\n\n[filename]_1.ext, [filename]_2.ext, \u2026., [filename]_n.ext\n\nSystem Requirements\n-------------------\n\nOperating System: Windows/Linux/Mac\n\nPython version: Python 3\n\nUsage\n-----\n\nThe module is available as a part of PyPI and can be easily installed\nusing ``pip``\n\n::\n\n pip install filesplit\n\nCreate an instance of the FileSplit object by passing file path and\nsplit size as arguments.\n\n::\n\n from fsplit.filesplit import FileSplit\n\n fs = FileSplit(file='path/to/file', splitsize=500000000, output_dir='/path/to/output directory/')\n\n- \u201cfile\u201d and \u201csplitsize\u201d are required. \u201coutput_dir\u201d is optional and\n defaults to current directory.\n- \u201csplitsize\u201d should be given in bytes.\n\nWith the instance created, any of the following methods can be invoked\n\nsplit (include_header=False, callback=None)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nMethod that splits the file into multiple chunks. This method works in\nbinary mode under the hood which keeps the formatting and encoding of\nsplits as-is to that of the source which should be sufficient to handle\nany file types.\n\n::\n\n fs.split()\n\nIn case, if the file contains a header and if you want the header to be\navailable in all of your splits, you can optionally set the flag\n\u201cinclude_header\u201d to True. By default it is set to False.\n\n::\n\n fs.split(include_header=True)\n\nAlso, you can pass a callback function (optional) [func (str, long,\nlong)] that accepts three arguments - full path to the split, split file\nsize (bytes) and line count. The callback function will be called after\neach file split.\n\n::\n\n def func(f, s, c):\n print(\"file: {0}, size: {1}, count: {2}\".format(f, s, c))\n\n fs.split(callback=func)\n\nsplitbyencoding (rencoding=\u201cutf-8\u201d, wencoding=\u201cutf-8\u201d, include_header=False, callback=None)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis method is similar to the above ``split()`` method, except that the\nfile encoding of the splits can be explicitly specified. This is helpful\nif the file chunks has to be of specific encoding standard.\nThis method accepts two additional arguments to that of the ``split()`` method\n\n- \u201crencoding\u201d - encoding of the source file (default : \u2018utf-8\u2019)\n- \u201cwencoding\u201d - encoding of the output file chunks (default: \u2018utf-8\u2019)\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/ram-jayapalan/filesplit/archive/2.0.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ram-jayapalan/filesplit", "keywords": "file split filesplit splitfile chunks splits", "license": "", "maintainer": "", "maintainer_email": "", "name": "filesplit", "package_url": "https://pypi.org/project/filesplit/", "platform": "", "project_url": "https://pypi.org/project/filesplit/", "project_urls": { "Download": "https://github.com/ram-jayapalan/filesplit/archive/2.0.0.tar.gz", "Homepage": "https://github.com/ram-jayapalan/filesplit" }, "release_url": "https://pypi.org/project/filesplit/2.0.0/", "requires_dist": null, "requires_python": "", "summary": "Module to split file of any size into multiple chunks", "version": "2.0.0" }, "last_serial": 5008255, "releases": { "1.0.3": [ { "comment_text": "", "digests": { "md5": "86d1363e9565dc0f03d446e5c2bda9e0", "sha256": "e60531fd21c75a80595993cbea25745849b14f1b5dd189e6f5681c6dc2f02fac" }, "downloads": -1, "filename": "filesplit-1.0.3.tar.gz", "has_sig": false, "md5_digest": "86d1363e9565dc0f03d446e5c2bda9e0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3925, "upload_time": "2017-11-06T20:13:04", "url": "https://files.pythonhosted.org/packages/68/83/0a621d0bf9a3935cbea6913644271ae805af80b86d9ea43868c7710c64c8/filesplit-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "e918754ae2144b1a49042fc3d1b98a65", "sha256": "b3aa112a0a818b8bb00ee111de47563607324791d61c169b246d9b22fabb43aa" }, "downloads": -1, "filename": "filesplit-1.0.4.tar.gz", "has_sig": false, "md5_digest": "e918754ae2144b1a49042fc3d1b98a65", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3924, "upload_time": "2018-04-25T18:04:54", "url": "https://files.pythonhosted.org/packages/50/25/0e16671f5c19fa356a4e146fc650f79245e101913778218abb354b86db01/filesplit-1.0.4.tar.gz" } ], "1.0.4beta": [ { "comment_text": "", "digests": { "md5": "13d31d60d639af6f50f2033c04b296d6", "sha256": "990e6690da554ecf5546a8ebd49911c6445c8c787c4aec930068afe7a2bd3c66" }, "downloads": -1, "filename": "filesplit-1.0.4beta.tar.gz", "has_sig": false, "md5_digest": "13d31d60d639af6f50f2033c04b296d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3925, "upload_time": "2018-04-25T17:51:57", "url": "https://files.pythonhosted.org/packages/da/96/8393091fd640fca0bc25fa29c53a3258482a93ce3e54f1a528cae622c9ef/filesplit-1.0.4beta.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "59965de1800bcac94e77bb414ebd4288", "sha256": "d048fae66bdb795de8fcde88a5f1d2e7614d24c35e2ef8995b8ac009abccfb61" }, "downloads": -1, "filename": "filesplit-2.0.0.tar.gz", "has_sig": false, "md5_digest": "59965de1800bcac94e77bb414ebd4288", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3910, "upload_time": "2019-03-31T00:02:22", "url": "https://files.pythonhosted.org/packages/2e/18/d39475047fe432a4404f7a3a726183d4d70cee55c78ca6dfccc25304b2ae/filesplit-2.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "59965de1800bcac94e77bb414ebd4288", "sha256": "d048fae66bdb795de8fcde88a5f1d2e7614d24c35e2ef8995b8ac009abccfb61" }, "downloads": -1, "filename": "filesplit-2.0.0.tar.gz", "has_sig": false, "md5_digest": "59965de1800bcac94e77bb414ebd4288", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3910, "upload_time": "2019-03-31T00:02:22", "url": "https://files.pythonhosted.org/packages/2e/18/d39475047fe432a4404f7a3a726183d4d70cee55c78ca6dfccc25304b2ae/filesplit-2.0.0.tar.gz" } ] }