{ "info": { "author": "Cameron Simpson", "author_email": "cs@cskk.id.au", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Facilities for shared access to files.\n\n## Function `lockfile(path, ext=None, poll_interval=None, timeout=None)`\n\nA context manager which takes and holds a lock file.\n\nParameters:\n* `path`: the base associated with the lock file.\n* `ext`:\n the extension to the base used to construct the lock file name.\n Default: `\".lock\"`\n* `timeout`: maximum time to wait before failing,\n default None (wait forever).\n* `poll_interval`: polling frequency when timeout is not 0.\n\n## Class `SharedAppendFile`\n\nA base class to share a modifiable file between multiple users.\n\nThe use case was driven from the shared CSV files used by\n`cs.nodedb.csvdb.Backend_CSVFile`, where multiple users can\nread from a common CSV file, and coordinate updates with a\nlock file.\n\nThis presents the following interfaces:\n* `__iter__`: yields data chunks from the underlying file up\n to EOF; it blocks no more than reading from the file does.\n Note that multiple iterators share the same read pointer.\n\n* `open`: a context manager returning a writable file for writing\n updates to the file; it blocks reads from this instance\n (though not, of course, by other users of the file) and\n arranges that users of `__iter__` do not receive their own\n written data, thus arranging that `__iter__` returns only\n foreign file updates.\n\nSubclasses would normally override `__iter__` to parse the\nreceived data into their natural records.\n\n## Class `SharedAppendLines`\n\nMRO: `SharedAppendFile` \nA line oriented subclass of `SharedAppendFile`.\n\n## Class `SharedCSVFile`\n\nMRO: `SharedAppendLines`, `SharedAppendFile` \nShared access to a CSV file in UTF-8 encoding.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/cameron_simpson/css/commits/all", "keywords": "python2,python3", "license": "", "maintainer": "", "maintainer_email": "", "name": "cs.sharedfile", "package_url": "https://pypi.org/project/cs.sharedfile/", "platform": "", "project_url": "https://pypi.org/project/cs.sharedfile/", "project_urls": { "Homepage": "https://bitbucket.org/cameron_simpson/css/commits/all" }, "release_url": "https://pypi.org/project/cs.sharedfile/20190102/", "requires_dist": null, "requires_python": "", "summary": "facilities for shared access to files", "version": "20190102" }, "last_serial": 4652121, "releases": { "20190102": [ { "comment_text": "", "digests": { "md5": "9d53daf6ece394255b3f5b42aac53641", "sha256": "cbb2d511926590b3f5720b78b8111b593ec202d6618137de249c6c6642a54ec8" }, "downloads": -1, "filename": "cs.sharedfile-20190102.tar.gz", "has_sig": false, "md5_digest": "9d53daf6ece394255b3f5b42aac53641", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5455, "upload_time": "2019-01-02T09:00:19", "url": "https://files.pythonhosted.org/packages/9c/fd/d37ded690977e715b123b0ae5b791f935fff9ec59f49e68d17fa347592e2/cs.sharedfile-20190102.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9d53daf6ece394255b3f5b42aac53641", "sha256": "cbb2d511926590b3f5720b78b8111b593ec202d6618137de249c6c6642a54ec8" }, "downloads": -1, "filename": "cs.sharedfile-20190102.tar.gz", "has_sig": false, "md5_digest": "9d53daf6ece394255b3f5b42aac53641", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5455, "upload_time": "2019-01-02T09:00:19", "url": "https://files.pythonhosted.org/packages/9c/fd/d37ded690977e715b123b0ae5b791f935fff9ec59f49e68d17fa347592e2/cs.sharedfile-20190102.tar.gz" } ] }