{ "info": { "author": "Utkarsh Upadhyay", "author_email": "musically.ut@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Utilities" ], "description": "seqfile\n=======\n\n|BuildStatus| |BuildStatusWin| |Coverage|\n\nGenerate sequential file names in a thread-safe way.\n\nUsage\n-----\n\nIf you want to create sequential files to write output to (say from\ndifferent threads or from consecutive runs of the same program), then\nyou can use this module from within your program or from the command\nline.\n\nFrom the commandline\n~~~~~~~~~~~~~~~~~~~~\n\n::\n\n $ seqfile\n usage: seqfile [-h] [-m MAX_ATTEMPTS] [-b BASE] prefix [suffix] [folder]\n seqfile: error: too few arguments\n\n # Assume files \"./a.0.txt\" and \"./a.3.txt\" exist.\n $ seqfile a. .txt .\n ./a.4.txt\n\n # Assume no other files exist.\n # This will create files 100 files with names test.*.txt in the current\n # folder.\n $ seq 100 | xargs -n 1 -P 100 -I{} \\\n bash -c \"fname=\\$(seqfile test. .txt); \\\n echo 'Do something awesome with {}' > \\$fname\"\n\nFrom your program\n~~~~~~~~~~~~~~~~~\n\n::\n\n # Assume files \"./a.0.txt\" and \"./a.3.txt\" exist.\n >> import seqfile\n\n # Providing prefix and suffix finds the next file in the sequence\n # ignoring any gaps\n >> seqfile.findNextFile('.', prefix='a.', suffix='.txt')\n './a.4.txt'\n\n # Providing a file name generator as fnameGen produces the first file\n # which it was successful in creating.\n >> seqfile.findNextFile('.', fnameGen=lambda x: 'a.' + str(x) + '.txt')\n './a.1.txt'\n\nThe returned file will exist, be empty, and can be opened for writing.\n\nInstalling\n----------\n\nThis package is available from `PyPi `.\n\n::\n\n pip install seqfile\n\nYou can install the bleeding edge directly from the source:\n\n::\n\n pip install git+https://github.com/musically-ut/seqfile.git@master#egg=seqfile\n\nTests\n-----\n\nThe tests can be run using ``nosetests`` (if all dependencies are installed in\nthe environment) or using ``python setup.py test``.\n\nCaveats\n-------\n\nIt is best not to provide unicode characters in the ``prefix``, ``suffix``, or\n``folder``. Though the support has been tested on all major OSes, it has not\nbeen verfied that all OS/filesystem combinations will work.\n\nAlso, the `O_CREAT | O_EXCEL` trick used to create files atomically may not\nwork on old linux kernels while writing to an NFS.\n\n\n.. |BuildStatus| image:: https://travis-ci.org/musically-ut/seqfile.svg?branch=master\n :target: https://travis-ci.org/musically-ut/seqfile\n.. |BuildStatusWin| image:: https://ci.appveyor.com/api/projects/status/6x28l2cgqupdjyue/branch/master?svg=true\n :target: https://ci.appveyor.com/project/musically-ut/seqfile\n.. |Coverage| image:: https://coveralls.io/repos/musically-ut/seqfile/badge.svg?branch=master\n :target: https://coveralls.io/r/musically-ut/seqfile?branch=master\n.. |PythonVersions| image:: https://pypip.in/py_versions/seqfile/badge.svg\n :target: https://pypi.python.org/pypi/seqfile/\n :alt: Supported Python versions\n.. |PyPiVersion| image:: https://pypip.in/version/seqfile/badge.svg\n :target: https://pypi.python.org/pypi/seqfile/\n :alt: Latest Version\n.. |License| image:: https://pypip.in/license/seqfile/badge.svg\n :target: https://pypi.python.org/pypi/seqfile/\n :alt: License", "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/musically-ut/seqfile", "keywords": "file threadsafe sequence", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "seqfile", "package_url": "https://pypi.org/project/seqfile/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/seqfile/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/musically-ut/seqfile" }, "release_url": "https://pypi.org/project/seqfile/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Find the next file in a sequence of files in a thread-safe way.", "version": "0.2.0" }, "last_serial": 1538593, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "9b48b53f5e6b050934bb8c3ed0a98968", "sha256": "0e9fbc53983c0c89530aacd490721bf440034e6a36f330486c7048f16905f697" }, "downloads": -1, "filename": "seqfile-0.0.1.tar.gz", "has_sig": true, "md5_digest": "9b48b53f5e6b050934bb8c3ed0a98968", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4087, "upload_time": "2015-04-19T18:34:43", "url": "https://files.pythonhosted.org/packages/66/1b/96078910b699c6d6f8849fd65b4e19048f482052d84c2caadd75708fdcb2/seqfile-0.0.1.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "9229e1f44116a91a16b82ba41f1b0e3f", "sha256": "80ed03daefefd561ff5976e6b4cbcec43e741b76df9ac660f0ba165e54717330" }, "downloads": -1, "filename": "seqfile-0.1.0.tar.gz", "has_sig": true, "md5_digest": "9229e1f44116a91a16b82ba41f1b0e3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 67982, "upload_time": "2015-04-21T11:35:38", "url": "https://files.pythonhosted.org/packages/44/dc/f04789fba88cc825ee1ce22367378561cbf0ae26878e7691d820fd15964f/seqfile-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "6820e3d8a341b2954931a98bbe85baba", "sha256": "fc2831537ee3547c9fc1e8d21e28c777e6cf52d2d07d5f8d51b241d57e955154" }, "downloads": -1, "filename": "seqfile-0.2.0.tar.gz", "has_sig": true, "md5_digest": "6820e3d8a341b2954931a98bbe85baba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 55955, "upload_time": "2015-05-08T09:00:45", "url": "https://files.pythonhosted.org/packages/1c/9d/2521a5126f9d7d92d5e5005490e80526bbb9b71228ff9621b2c3a122ccc3/seqfile-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6820e3d8a341b2954931a98bbe85baba", "sha256": "fc2831537ee3547c9fc1e8d21e28c777e6cf52d2d07d5f8d51b241d57e955154" }, "downloads": -1, "filename": "seqfile-0.2.0.tar.gz", "has_sig": true, "md5_digest": "6820e3d8a341b2954931a98bbe85baba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 55955, "upload_time": "2015-05-08T09:00:45", "url": "https://files.pythonhosted.org/packages/1c/9d/2521a5126f9d7d92d5e5005490e80526bbb9b71228ff9621b2c3a122ccc3/seqfile-0.2.0.tar.gz" } ] }