{ "info": { "author": "Roberto Abdelkader Mart\u00c3\u00adnez P\u00c3\u00a9rez", "author_email": "robertomartinezp@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Embedded Systems", "Topic :: System :: Archiving" ], "description": "acidfile\n========\n\n`acidfile` module provides the ACIDFile object. This object can be used as a\nregular file object but instead of write one copy of the data, it will write\nseveral copies to disk in an ACID manner.\n\nThis algorithm was explained by `Elvis Pf\u00fctzenreuter`_ in his blog post\n`Achieving ACID transactions with common files`_.\n\nLatest stable version can be found on `PyPI`_.\n\n.. image:: https://travis-ci.org/nilp0inter/acidfile.png?branch=develop\n :target: https://travis-ci.org/nilp0inter/acidfile\n\n.. image:: https://pypip.in/v/acidfile/badge.png\n :target: https://pypi.python.org/pypi/acidfile\n :alt: Latest PyPI version\n\n.. image:: https://pypip.in/d/acidfile/badge.png\n :target: https://pypi.python.org/pypi/acidfile\n :alt: Number of PyPI downloads\n\n`acidfile` is compatible with python 2.6, 2.7, 3.2, 3.3, 3.4 and pypy\n\nContribute:\n\n.. image:: http://api.flattr.com/button/flattr-badge-large.png\n :target: https://flattr.com/submit/auto?user_id=nilp0inter&url=https://github.com/nilp0inter/acidfile&title=acidfile&language=&tags=github&category=software\n :alt: Flattr this git repo\n\nInstallation\n------------\n\nLatest version can be installed via `pip`\n\n.. code-block:: bash\n\n $ pip install --upgrade acidfile\n\n\nRunning the tests\n-----------------\n\nClone this repository and install the develop requirements.\n\n.. code-block:: bash\n\n $ git clone https://github.com/nilp0inter/acidfile.git\n $ cd acidfile\n $ pip install -r requirements/develop.txt\n $ python setup.py develop\n $ tox\n\n\nUsage examples\n--------------\n\n\nBasic usage\n+++++++++++\n\n.. code-block:: python\n\n >>> from acidfile import ACIDFile\n\n >>> myfile = ACIDFile('/tmp/myfile.txt', 'w')\n >>> myfile.write(b'Some important data.')\n >>> myfile.close()\n\nAt the close invocation two copies will be written to disk: *myfile.txt.0* and\nbelow *myfile.txt.1*. Each one will have an creation timestamp and a HMAC\nsignature.\n\n.. code-block:: python\n\n >>> myfile = ACIDFile('/tmp/myfile.txt', 'r')\n >>> print myfile.read()\n 'Some important data.'\n >>> myfile.close()\n\nIf any of the files is damaged due to turning off without proper shutdown or\ndisk failure, manipulation, etc. It will be detected by the internal HMAC and\nthe other's file data would be used instead.\n\n.. note:: If you want to read an `acidfile`, never pass the full path of the\n real file, instead use the file name that you use in the creation step.\n\n | \u2717 ACIDFile('/tmp/myfile.txt.0', 'r')\n | \u2717 ACIDFile('/tmp/myfile.txt.1', 'r')\n | \u2713 ACIDFile('/tmp/myfile.txt', 'r')\n\n\nContext manager\n+++++++++++++++\n\nACIDFile can (and should) be used as a regular context manager:\n\n.. code-block:: python\n\n >>> with ACIDFile('/tmp/myfile.txt', 'w') as myfile:\n ... myfile.write(b'Some important data.')\n\n\nNumber of copies\n++++++++++++++++\n\nThe number of inner copies of the data can be configured through the **copies**\nparameter.\n\n\nChecksum Key\n++++++++++++\n\nThe key used for compute and check the internal HMAC signature can be setted\nby the **key** parameter.\n\nIt's recommended to change that key in order to protect against fraud, making\nmore difficult for a tamperer to put a fake file in place of the legitimate\none.\n\n.. _PyPI: https://pypi.python.org/pypi/acidfile\n.. _Elvis Pf\u00fctzenreuter: epx@epx.com.br\n.. _Achieving ACID transactions with common files: http://epx.com.br/artigos/arqtrans_en.php\n\n\n.. This is your project NEWS file which will contain the release notes.\n.. Example: http://www.python.org/download/releases/2.6/NEWS.txt\n.. The content of this file, along with README.rst, will appear in your\n.. project's PyPI page.\n\nNews\n====\n\n\n1.2.1\n-----\n\n* Using io.open in setup.py to read README and NEWS. This fix some\n problems installing the package.\n+ Python 3.4 support.\n\n\n1.2.0\n-----\n\n+ Python 2.6 support.\n+ Added Python 3.2 and pypy to tox tests.\n+ Added flattr button :D\n* Fixed flake8 and pylint warnings.\n\n\n1.1.0\n-----\n\n+ Python 3 support.\n+ Changed testing framework to `behave` because python 3 support.\n+ Using `tox` for multiple python version testing.\n\n\n1.0.0\n-----\n\n* First stable release.\n+ Documentation.\n\n\n0.0.1\n-----\n\n* Initial development.", "description_content_type": null, "docs_url": "https://pythonhosted.org/acidfile/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/nilp0inter/acidfile", "keywords": "ACID transactional file", "license": "GPLv3", "maintainer": null, "maintainer_email": null, "name": "acidfile", "package_url": "https://pypi.org/project/acidfile/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/acidfile/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/nilp0inter/acidfile" }, "release_url": "https://pypi.org/project/acidfile/1.2.1/", "requires_dist": null, "requires_python": null, "summary": "ACID transaction with common files", "version": "1.2.1" }, "last_serial": 1549963, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "c10ea5a8a9a20066df2d998f48bf8e07", "sha256": "15196bac3c3481c84519a41349451e411d4ca4de8e062dba1849a6bd7adf692a" }, "downloads": -1, "filename": "acidfile-1.0.0.tar.gz", "has_sig": false, "md5_digest": "c10ea5a8a9a20066df2d998f48bf8e07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5322, "upload_time": "2013-12-05T18:43:03", "url": "https://files.pythonhosted.org/packages/cc/4d/292b012cc1ca852da35519094f232ebbc860ee3f4bc1360fc99df133b2e1/acidfile-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "5addd1a862936ef5e9c278ac95683dd3", "sha256": "59c187d28dcb04444b8320736b8695f3981151614a3ecd5b820309a49ca468b3" }, "downloads": -1, "filename": "acidfile-1.1.0.tar.gz", "has_sig": false, "md5_digest": "5addd1a862936ef5e9c278ac95683dd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5653, "upload_time": "2013-12-07T05:31:43", "url": "https://files.pythonhosted.org/packages/2d/60/a84c52402ae57394317a061c46bd75508419151b5a8cdc50b634140cf966/acidfile-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "fd9e36bc1569107c1e75c109249e59bd", "sha256": "ce0677cead5e87c5a8e9826c56568e9ffee976919134cb65b61121b4463e8198" }, "downloads": -1, "filename": "acidfile-1.2.0.tar.gz", "has_sig": false, "md5_digest": "fd9e36bc1569107c1e75c109249e59bd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5965, "upload_time": "2014-01-08T15:50:35", "url": "https://files.pythonhosted.org/packages/eb/87/0ae2de74c6b3db0bc5bc83a10a5a7fc3f97e29c9e359d8d64479ff3b7292/acidfile-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "b9cc1f6c8fc78135b286967fb0d5f3d7", "sha256": "c77bbcc7454235029cab6a116d824cf896b0a0b133470a137bac3f792f6c7dbc" }, "downloads": -1, "filename": "acidfile-1.2.1.tar.gz", "has_sig": false, "md5_digest": "b9cc1f6c8fc78135b286967fb0d5f3d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6065, "upload_time": "2015-05-16T21:43:25", "url": "https://files.pythonhosted.org/packages/1f/4f/51ba5631b70efedd1ba0267ea0845bd7bb968c7cfef7b80a93ae6c9b15b4/acidfile-1.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b9cc1f6c8fc78135b286967fb0d5f3d7", "sha256": "c77bbcc7454235029cab6a116d824cf896b0a0b133470a137bac3f792f6c7dbc" }, "downloads": -1, "filename": "acidfile-1.2.1.tar.gz", "has_sig": false, "md5_digest": "b9cc1f6c8fc78135b286967fb0d5f3d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6065, "upload_time": "2015-05-16T21:43:25", "url": "https://files.pythonhosted.org/packages/1f/4f/51ba5631b70efedd1ba0267ea0845bd7bb968c7cfef7b80a93ae6c9b15b4/acidfile-1.2.1.tar.gz" } ] }