{ "info": { "author": "Roy Hyunjin Han", "author_email": "starsareblueandfaraway@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python" ], "description": "archiveIO\n=========\nHere are some decorators for reading and writing to compressed archives.\n\n\nInstallation\n------------\n::\n\n easy_install -U archiveIO\n\n\nUsage\n-----\n::\n\n import archiveIO\n import os\n from six import BytesIO\n\n # Define a function that generates archive contents\n @archiveIO.save\n def save(targetPath):\n open(targetPath, 'wt').write('xxx')\n # Define a function that processes archive contents\n @archiveIO.load\n def load(sourcePath):\n return open(sourcePath, 'rt').read()\n\n # Save archives\n save('sample.txt')\n save('sample.txt.zip')\n save('sample.txt.tar.gz')\n save('sample.txt.tar.bz2')\n save('sample.txt.tar')\n # Load archives\n assert 'xxx' == load('sample.txt')\n assert 'xxx' == load('sample.txt.zip')\n assert 'xxx' == load('sample.txt.tar.gz')\n assert 'xxx' == load('sample.txt.tar.bz2')\n assert 'xxx' == load('sample.txt.tar')\n\n # Create an archive containing two files\n @archiveIO.save\n def save(targetPath):\n open(targetPath + '.txt', 'wt')\n open(targetPath + '.csv', 'wt')\n targetPath = 'sample.zip'\n save(targetPath)\n # Target CSV files before TXT files\n @archiveIO.load(extensions=['.csv', '.txt'])\n def load(sourcePath):\n return os.path.basename(sourcePath)\n assert 'sample.csv' == load(targetPath)\n\n # Use MyException instead of IOError\n class MyException(Exception):\n pass\n @archiveIO.load(CustomException=MyException)\n def load(sourcePath):\n return sourcePath\n try:\n load('xxx.tar.gz')\n except MyException, error:\n print error\n\n # Compress directly into a string buffer\n archive = archiveIO.Archive(BytesIO(), '.tar.gz')\n archive.save([\n 'sample.txt',\n 'sample.txt.zip',\n ])\n # Uncompress into a temporary folder\n with archiveIO.TemporaryFolder() as temporaryFolder:\n for filePath in archive.load(temporaryFolder):\n print filePath\n\n\n0.5.0\n-----\n- Fixed Python 3 support\n\n0.4.4\n-----\n- Added option to target file extensions for uncompressed files\n\n0.4.3\n-----\n- Added CustomException coverage if opening archive fails\n\n0.4.2\n-----\n- Added CustomException option to load() decorator\n\n0.4.1\n-----\n- Excluded extraneous '.' when saving zip archives\n\n0.4.0\n-----\n- Added support for file-like objects when saving or loading archives\n- Added support for folderPaths when saving archives\n- Increased test coverage to 100%\n\n0.3.0\n-----\n- Added Archive class\n\n0.2.0\n-----\n- Ported code from zip_store\n- Added support for .tar.gz .tar.bz2 .tar", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/invisibleroads/archiveIO", "keywords": "zip tar.gz tar.bz2 tar", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "archiveIO", "package_url": "https://pypi.org/project/archiveIO/", "platform": "", "project_url": "https://pypi.org/project/archiveIO/", "project_urls": { "Homepage": "https://github.com/invisibleroads/archiveIO" }, "release_url": "https://pypi.org/project/archiveIO/0.5.1/", "requires_dist": null, "requires_python": "", "summary": "Convenience decorators for reading and writing to compressed archives", "version": "0.5.1" }, "last_serial": 3066984, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "30e3b9ae033f2035b1501f4072280d57", "sha256": "deaf2d53da8e663c6580487091d3e297cf54ffce9f6c85f1cb7ba5f7b569d09b" }, "downloads": -1, "filename": "archiveIO-0.2.tar.gz", "has_sig": false, "md5_digest": "30e3b9ae033f2035b1501f4072280d57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3702, "upload_time": "2011-05-24T18:21:27", "url": "https://files.pythonhosted.org/packages/c7/e2/36a7b632f71c41bf47326f76b6bb295a80c27722f87f9d460307dae0a60b/archiveIO-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "60f1d2616d3dbad4f0052f39734af476", "sha256": "9aa9051e3198d50ef55744bd9aa0bd7dd50c41931b9bed319cb5d0db82ae12f3" }, "downloads": -1, "filename": "archiveIO-0.3.tar.gz", "has_sig": false, "md5_digest": "60f1d2616d3dbad4f0052f39734af476", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4273, "upload_time": "2011-08-01T06:18:12", "url": "https://files.pythonhosted.org/packages/ed/05/b5878a058d07d6685b46db067b2b3ca50039757305ffc1f847945e750111/archiveIO-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "2743a1954893cf7c8399dad4f3d63293", "sha256": "1c611a49d42516c1b94276cb25c801bb823a2a4f441aef0fa19cee6c2d3525a6" }, "downloads": -1, "filename": "archiveIO-0.4.tar.gz", "has_sig": false, "md5_digest": "2743a1954893cf7c8399dad4f3d63293", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4716, "upload_time": "2011-12-24T10:54:27", "url": "https://files.pythonhosted.org/packages/1d/69/6d1f757b70c91c565c923664dac5b3c0198fc28ce0456ffe8e3561e53d82/archiveIO-0.4.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "5c94f56d3383b6572d161c631c0d32f3", "sha256": "b35830224a0c4376c32f80f44d0cefa017e8f9afb65f38ed5c56804a159d95cc" }, "downloads": -1, "filename": "archiveIO-0.4.1.tar.gz", "has_sig": false, "md5_digest": "5c94f56d3383b6572d161c631c0d32f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4849, "upload_time": "2012-02-10T21:21:55", "url": "https://files.pythonhosted.org/packages/4a/7a/b1d1132d1c2369343d0895add4d3cd5213925c3296cfadfdc851d5eab1da/archiveIO-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "e7cb3227cf27b61f855658309c44590a", "sha256": "a11b5171ccc1fcd4515d8114857ffacedfeeb4e435b47ac14c504ae029277e81" }, "downloads": -1, "filename": "archiveIO-0.4.2.tar.gz", "has_sig": false, "md5_digest": "e7cb3227cf27b61f855658309c44590a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4976, "upload_time": "2012-03-19T19:41:07", "url": "https://files.pythonhosted.org/packages/1a/58/1b0d0b176e3b00f6d2343de8b356be88dc2baebc3dc214756906cc0cee39/archiveIO-0.4.2.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "fb9cf70950e50ffa40d1d5828e3e8489", "sha256": "74d996c69c538f3df3cca5cbdf12a488ede4e5b1ee42bc09eadfce3bb5278ce6" }, "downloads": -1, "filename": "archiveIO-0.4.3.tar.gz", "has_sig": false, "md5_digest": "fb9cf70950e50ffa40d1d5828e3e8489", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5011, "upload_time": "2012-04-04T14:41:26", "url": "https://files.pythonhosted.org/packages/1b/91/69b7b63d700371f544de6e76a08ec472920452ee6c6e27bc8a0355784ac3/archiveIO-0.4.3.tar.gz" } ], "0.4.4": [ { "comment_text": "", "digests": { "md5": "ec4c09fe82965ab6af653aab7d4f794f", "sha256": "c71f96e3979960986f71053ff22e64168991ccf7e512fdd4dcaa8943f95f19c6" }, "downloads": -1, "filename": "archiveIO-0.4.4.tar.gz", "has_sig": false, "md5_digest": "ec4c09fe82965ab6af653aab7d4f794f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5736, "upload_time": "2012-06-27T12:08:00", "url": "https://files.pythonhosted.org/packages/21/af/0e9b135b8b2a64c02c32749a640e3da92e37d4792dfbe2d0956fd8269c6f/archiveIO-0.4.4.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "344b72b7df9d9a06d56818110fd4687e", "sha256": "7095e41c2d60d77a8502e0248ed9986104958609d1c2831c391223bb4a32d14f" }, "downloads": -1, "filename": "archiveIO-0.5.1.tar.gz", "has_sig": false, "md5_digest": "344b72b7df9d9a06d56818110fd4687e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5829, "upload_time": "2017-08-02T12:52:03", "url": "https://files.pythonhosted.org/packages/17/73/363d0b14fc52ebdbe0850f5f617af058920cbecad2ea05f7c9def29d8ce3/archiveIO-0.5.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "344b72b7df9d9a06d56818110fd4687e", "sha256": "7095e41c2d60d77a8502e0248ed9986104958609d1c2831c391223bb4a32d14f" }, "downloads": -1, "filename": "archiveIO-0.5.1.tar.gz", "has_sig": false, "md5_digest": "344b72b7df9d9a06d56818110fd4687e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5829, "upload_time": "2017-08-02T12:52:03", "url": "https://files.pythonhosted.org/packages/17/73/363d0b14fc52ebdbe0850f5f617af058920cbecad2ea05f7c9def29d8ce3/archiveIO-0.5.1.tar.gz" } ] }