{ "info": { "author": "Liyu Gong", "author_email": "gongliyu@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "*compfile* Common interfaces for manipulating compressed files (lzma, gzip etc)\n\n[![Build Status](https://travis-ci.com/gongliyu/compfile.svg?branch=master)](https://travis-ci.com/gongliyu/compfile)\n[![Documentation Status](https://readthedocs.org/projects/compfile/badge/?version=latest)](https://compfile.readthedocs.io/en/latest/?badge=latest)\n[![Coverage Status](https://coveralls.io/repos/github/gongliyu/compfile/badge.svg?branch=master)](https://coveralls.io/github/gongliyu/compfile?branch=master)\n\n## Rationale\nSometimes, we need to deal with different compressed files. There are\nseveral packages/modules for compressed file manipulation, e.g.,\n*gzip* module for \"\\*.gz\" files, *lzma* module for \"\\*.lzma\" and\n\"\\*.xz\" files, etc. If we want to support different types of\ncompressed file in our project, probably we need to do the following:\n\n``` python\nif fnmatch.fnmatch(fname, \"*.gz\"):\n f = gzip.open(fname, 'rb')\n # do something with f\nelif fnmatch.fnmatch(fname, \"*.bz2'):\n f = bz2.open(fname, 'rb')\n # do something with f\nelse:\n # other stuffs\n```\n\nThe problems of the above approch are:\n* We need to repeat the compression type inference logic everywhere we\n want to support different compression types.\n* Different compression type manipulation modules may have different\n API convention.\n\n*compfile* is designed to solve the above problems. It abstracts the logic of compressed file manipulations and provides a single high level interface for users.\n\n## Installation\n\n### Install from PyPI\n\n``` shell\npip install compfile\n```\n\n### Install from Anaconda\n\n``` shell\nconda install -c liyugong compfile\n```\n\n### Install from GitHub\n\n``` shell\npip install git+https://github.com/gongliyu/compfile.git@master\n```\n\n## Simple example\n\nUsing *compfile* is pretty simple. Just construct a\n*compfile.CompFile* object or call *compfile.open*\n\n``` python\nwith compfile.open(fname, 'r') as f:\n # do something with f\n```\n\nThe object returned is a file object, so we can do ordinary file\nprocessing with it.\n\n## License\n\nThe *compfile* package is released under the [MIT License](LICENSE)\n\n## Documentation\n\nhttps://compfile.readthedocs.io\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gongliyu/compfile", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "compfile", "package_url": "https://pypi.org/project/compfile/", "platform": "", "project_url": "https://pypi.org/project/compfile/", "project_urls": { "Homepage": "https://github.com/gongliyu/compfile" }, "release_url": "https://pypi.org/project/compfile/0.0.3/", "requires_dist": [ "decoutils" ], "requires_python": "", "summary": "Common interface for compressed file manipulation", "version": "0.0.3" }, "last_serial": 4661298, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "e6d8ab05b9611583193daa9920c9b3c2", "sha256": "006a4aa066412ef03f34b29b61957a8c5e4201d5486f04826d49fb4f7255b488" }, "downloads": -1, "filename": "compfile-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e6d8ab05b9611583193daa9920c9b3c2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4561, "upload_time": "2018-12-06T23:52:00", "url": "https://files.pythonhosted.org/packages/36/4b/87a66be19c9727b090e6f5c1008a946ceb6bb206353b1ed12ade772f7edb/compfile-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "289433b30afe4350132d395628a4f081", "sha256": "1e71f74a437fe9334f9171a1cb05056bda6dff0e126179dd5eecbd54dc6bc8fc" }, "downloads": -1, "filename": "compfile-0.0.1.tar.gz", "has_sig": false, "md5_digest": "289433b30afe4350132d395628a4f081", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5404, "upload_time": "2018-12-06T23:52:03", "url": "https://files.pythonhosted.org/packages/de/14/a6c04ca93f0060faf6627d90aca49a9496f887bf6f5c0d8258dd34a47415/compfile-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "31540e42eb486afb5858a28d72b44a30", "sha256": "e58f58eb56d46904578f200652650c51a4fabc69fb8cb1abaa7dfc70abc12ae9" }, "downloads": -1, "filename": "compfile-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "31540e42eb486afb5858a28d72b44a30", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3905, "upload_time": "2018-12-14T21:01:10", "url": "https://files.pythonhosted.org/packages/f4/2e/d8212898c354fd59f8f6f6ffa2291acd7ce07afef84cd620edad5048ac6a/compfile-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c7bbca18d168f1332df3bb9c93880427", "sha256": "98a619604ec7a6d6bfeb8588025213039baa6048389f0627c11cd3c3737c057f" }, "downloads": -1, "filename": "compfile-0.0.2.tar.gz", "has_sig": false, "md5_digest": "c7bbca18d168f1332df3bb9c93880427", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4882, "upload_time": "2018-12-14T21:01:11", "url": "https://files.pythonhosted.org/packages/17/3d/d1a2e96fdf1e7482eaed4b37e494705d88e1536ede6b7900d42c9f548a1f/compfile-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "14f01549bffee106a6f227b2f8ed4436", "sha256": "79fc36935475551a7002693ab88093daf9751be436a01166976d4d8422f9860b" }, "downloads": -1, "filename": "compfile-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "14f01549bffee106a6f227b2f8ed4436", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3942, "upload_time": "2019-01-04T18:36:16", "url": "https://files.pythonhosted.org/packages/3a/b1/97389fbc3077b332623afa9af70ee38a65fc8d7341a757c3a18254aa655f/compfile-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "abf404cb76a97b077cb587fc9fed3cbd", "sha256": "d620f539904ab8e72d97d73065211824113999d82ba20acd9d097d2a1a3358ac" }, "downloads": -1, "filename": "compfile-0.0.3.tar.gz", "has_sig": false, "md5_digest": "abf404cb76a97b077cb587fc9fed3cbd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4965, "upload_time": "2019-01-04T18:36:17", "url": "https://files.pythonhosted.org/packages/24/be/5e7717ea7f99703d2fa451715068fef5de9a068ef1a00c5d03d782d7ef62/compfile-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "14f01549bffee106a6f227b2f8ed4436", "sha256": "79fc36935475551a7002693ab88093daf9751be436a01166976d4d8422f9860b" }, "downloads": -1, "filename": "compfile-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "14f01549bffee106a6f227b2f8ed4436", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3942, "upload_time": "2019-01-04T18:36:16", "url": "https://files.pythonhosted.org/packages/3a/b1/97389fbc3077b332623afa9af70ee38a65fc8d7341a757c3a18254aa655f/compfile-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "abf404cb76a97b077cb587fc9fed3cbd", "sha256": "d620f539904ab8e72d97d73065211824113999d82ba20acd9d097d2a1a3358ac" }, "downloads": -1, "filename": "compfile-0.0.3.tar.gz", "has_sig": false, "md5_digest": "abf404cb76a97b077cb587fc9fed3cbd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4965, "upload_time": "2019-01-04T18:36:17", "url": "https://files.pythonhosted.org/packages/24/be/5e7717ea7f99703d2fa451715068fef5de9a068ef1a00c5d03d782d7ef62/compfile-0.0.3.tar.gz" } ] }