{ "info": { "author": "Jan Killian", "author_email": "jan.killian@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "zipaccess\n=========\n\nPatches functions [modules]:file+open, and os.path:exists+isfile\nto enable accessing files inside zip archives using standard file functions.\n\nPackage:\n http://pypi.python.org/pypi/zipaccess\nProject:\n https://github.com/iki/zipaccess\nIssues:\n https://github.com/iki/zipaccess/issues\nUpdates:\n https://github.com/iki/zipaccess/commits/master.atom\nInstall via `pip `_:\n ``pip install zipaccess``\nInstall via `easy_install `_:\n ``easy_install zipaccess``\nSources via `git `_:\n ``git clone https://github.com/iki/zipaccess``\nSources via `hg-git `_:\n ``hg clone git://github.com/iki/zipaccess``\n\n\nUsage\n-----\n\nUse as a class. Do not instantiate it::\n\n class AnyZipAccess(zipaccess.ZipAccess):\n any_zip = True # custom modifications here\n\n AnyZipAccess.enable()\n\nOr use as a module::\n\n zipaccess.enable()\n zipaccess.addzip('data.zip')\n\nOptionally, register zipaccess.ZipAccess as os.zipaccess::\n\n zipaccess.enable(register=True)\n\nso other modules can easily use::\n\n try:\n os.zipaccess.enable(locals())\n except AttributeError:\n pass\n\n\nNote on `Google App Engine `_ (GAE)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nOn GAE, the __builtin__ module changes are not reflected, even in the local name space.\n\nTo use zip access in any GAE module, you need to enable it for that module locals::\n\n try:\n import zipaccess\n zipaccess.enable(locals())\n except ImportError:\n pass\n\nAlternatively, only enable zip access locally, if it was already registered::\n\n try:\n os.zipaccess.enable(locals())\n except AttributeError:\n pass\n\nOr enable it for target modules externally::\n\n zipaccess.enable([\n 'babel.core',\n 'babel.localedata',\n 'tipfy.template',\n 'werkzeug.debug.tbtools',\n ])\n # It imports all the modules though, which may be not what you want.\n # If you know, how to hook on module import, let me kindly know.\n\nNote, that os.path.isfile and os.path.exists are patched globally. Even on GAE,\nthey apply for all modules of given instance. If some modules do support\nzip files, they usually first check if regular file exists, and if not, they\nsplit the path and check if the zipfile exists.\nWith zip access enabled, the regular file check will succeed, which is ok\nas long as consequently used file() or open() functions are patched too.\n\nExample:\n\n The tipfy.debugger.get_loader() function checks if templates are located\n in a regular directory or in a zip file (``lib/dist.zip`` usually).\n Then it returns tipfy.template.Loader or tipfy.template.ZipLoader accordingly.\n With zipaccess enabled, the standard tipfy.template.Loader will be used,\n and therefore ``zipaccess.enable('tipfy.template')`` is needed to make it work.\n\n See https://github.com/moraes/tipfy/blob/master/tipfy/debugger/__init__.py#L26.", "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/iki/zipaccess", "keywords": "zip,file,access", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "zipaccess", "package_url": "https://pypi.org/project/zipaccess/", "platform": "any", "project_url": "https://pypi.org/project/zipaccess/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/iki/zipaccess" }, "release_url": "https://pypi.org/project/zipaccess/0.1rc1/", "requires_dist": null, "requires_python": null, "summary": "Access files inside zip archives using standard file functions", "version": "0.1rc1" }, "last_serial": 802296, "releases": { "0.1rc1": [ { "comment_text": "", "digests": { "md5": "50f897043482ba49c95597d60ef9cde3", "sha256": "d88cb5d60fa25b4528f12b53694eac6cdabb5df964e6771397ba0b3df20e7fac" }, "downloads": -1, "filename": "zipaccess-0.1rc1.zip", "has_sig": false, "md5_digest": "50f897043482ba49c95597d60ef9cde3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9633, "upload_time": "2011-06-20T15:57:53", "url": "https://files.pythonhosted.org/packages/bf/2c/28912dea3e313d978987ce8c45bf81b2fb4e1a37cb67646e4ce1cfe8fe83/zipaccess-0.1rc1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "50f897043482ba49c95597d60ef9cde3", "sha256": "d88cb5d60fa25b4528f12b53694eac6cdabb5df964e6771397ba0b3df20e7fac" }, "downloads": -1, "filename": "zipaccess-0.1rc1.zip", "has_sig": false, "md5_digest": "50f897043482ba49c95597d60ef9cde3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9633, "upload_time": "2011-06-20T15:57:53", "url": "https://files.pythonhosted.org/packages/bf/2c/28912dea3e313d978987ce8c45bf81b2fb4e1a37cb67646e4ce1cfe8fe83/zipaccess-0.1rc1.zip" } ] }