{ "info": { "author": "Brett Cannon", "author_email": "brett@python.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3 :: Only" ], "description": "``mnfy`` \u2014 minify/obfuscate Python 3 source code\n=================================================\n\n.. contents::\n\nWeb Pages\n---------\n\n* `Documentation `__\n* `Project site `__ (`issue tracker`_)\n* `PyPI/Cheeseshop `__\n\nWhat the heck is mnfy for?\n--------------------------\n\nThe mnfy project was created for two reasons:\n\n* To show that shipping bytecode files without source, as a form of obfuscation,\n is not the best option available\n* Provide a minification of Python source code when total byte size of source\n code is paramount\n\nWhen people ship Python code as only bytecode files (i.e. only ``.pyo`` files\nand no ``.py`` files), there are couple drawbacks. First and foremost, it\nprevents users from using your code with all available Python interpreters such\nas Jython_ and IronPython_. Another drawback is that it is a poor form of\nobfuscation as projects like Meta_ allow you to take bytecode and\nreverse-engineer the original source code as enough details are kept that the\nonly details missing are single-line comments.\n\nWhen the total number of bytes used to ship Python code is paramount, then\nyou want to minify the source code. Bytecode files actually contain so much\ndetail that the space savings can be miniscule (e.g. the ``decimal`` module from\nPython's standard libary, which is the largest single file in the stdlib, has a\nbytecode file that is only 5% smaller than its original source code).\n\n\nUsage\n=====\n\nA note about version numbers and Python version compatibility\n-------------------------------------------------------------\n\nThe version number for mnfy is `PEP 386`_ compliant, taking the form of\n``PPP.FFF.BBB``. The ``FFF.BBB`` represents the feature and bugfix version\nnumbers of mnfy itself. The ``PPP`` portion of the version number represents the\nPython version that mnfy is compatible with:\n``'{}{}'.format(*sys.version_info[:2])``.\n\nThe Python version that mnfy is compatible with is directly embedded in the version\nnumber as Python's AST is not guaranteed to be backwards-compatible. This means\nthat you should use each version of mnfy with a specific version of Python.\nSince mnfy works with source code and not bytecode you can safely use\nmnfy on code that must be backwards-compatible with older versions of Python,\njust make sure the interpreter you use with mnfy is correct and can parse the\nsource code (e.g. just because\nthe latest version of mnfy only works with Python 3.3 does not mean you cannot\nuse that release against source code that must work with Python 3.2, just make\nsure to use a Python 3.3 interpreter with mnfy and that the source code can be\nread by a Python 3.3 interpreter).\n\nCommand-line Usage\n------------------\n\n**TL;DR**: pass the file you want to minify as an argument to mnfy and it will\nprint to stdout the source code minified such that the AST is **exactly** the\nsame as the original source code. To get transformations that will change the\nAST to varying degrees you will need to specificy various flags.\n\nSee the help message for the project for full instructions on usage::\n\n python3 -m mnfy -h\n python3 mnfy.py -h\n\n\n\n.. _Jython: http://www.jython.org\n.. _IronPython: http://ironpython.net/\n.. _Meta: http://pypi.python.org/pypi/meta\n.. _PEP 386: http://python.org/dev/peps/pep-0386/\n.. _contextlib.nested(): http://docs.python.org/2.7/library/contextlib.html#contextlib.nested\n.. _math module: http://docs.python.org/3/library/math.html\n.. _issue tracker: https://github.com/brettcannon/mnfy/issues?state=open", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://mnfy.rtfd.org/", "keywords": null, "license": "Apache Licence 2.0", "maintainer": null, "maintainer_email": null, "name": "mnfy", "package_url": "https://pypi.org/project/mnfy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mnfy/", "project_urls": { "Homepage": "http://mnfy.rtfd.org/" }, "release_url": "https://pypi.org/project/mnfy/34.0.0/", "requires_dist": null, "requires_python": null, "summary": "Minify/obfuscate Python 3 source code", "version": "34.0.0" }, "last_serial": 1970246, "releases": { "33.0.0": [ { "comment_text": "", "digests": { "md5": "1382e6bf97f0d4d5e970b6c3a632ec15", "sha256": "5206e61087f4630975fc6e0a0958b52717fc50f44b82ac8da7865938a5b5c2fb" }, "downloads": -1, "filename": "mnfy-33.0.0.zip", "has_sig": false, "md5_digest": "1382e6bf97f0d4d5e970b6c3a632ec15", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22349, "upload_time": "2012-11-28T03:41:50", "url": "https://files.pythonhosted.org/packages/5e/7a/9b16eda0867ee19ddd4f1c5e3c1910d4160f7ef7d0d3ff616a1979dd2b78/mnfy-33.0.0.zip" } ], "33.0.1": [ { "comment_text": "", "digests": { "md5": "27cb79e2da1784b3d555913e25ea2654", "sha256": "7443d9d2f9c9f9e4912e5a7cea724e261502171c1a44e5083b0b2a8f87d9b90f" }, "downloads": -1, "filename": "mnfy-33.0.1.tar.gz", "has_sig": false, "md5_digest": "27cb79e2da1784b3d555913e25ea2654", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12736, "upload_time": "2013-09-20T23:08:40", "url": "https://files.pythonhosted.org/packages/4a/ea/055eceb3b2039c951ecefb628b9934cca88d2461bd1cf84215713bbd7450/mnfy-33.0.1.tar.gz" } ], "34.0.0": [ { "comment_text": "", "digests": { "md5": "cbf0de1d232e02a20311a46f919612a3", "sha256": "883bb9fece8cf9394e4c6ad7175aebe48efdbe3e837b1cbaff8957821f8b4bc3" }, "downloads": -1, "filename": "mnfy-34.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "cbf0de1d232e02a20311a46f919612a3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13351, "upload_time": "2014-11-14T17:06:45", "url": "https://files.pythonhosted.org/packages/12/01/387f90f4ce635246272a8055a190a1e07c4c432a287d676302f37a70cda6/mnfy-34.0.0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cbf0de1d232e02a20311a46f919612a3", "sha256": "883bb9fece8cf9394e4c6ad7175aebe48efdbe3e837b1cbaff8957821f8b4bc3" }, "downloads": -1, "filename": "mnfy-34.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "cbf0de1d232e02a20311a46f919612a3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13351, "upload_time": "2014-11-14T17:06:45", "url": "https://files.pythonhosted.org/packages/12/01/387f90f4ce635246272a8055a190a1e07c4c432a287d676302f37a70cda6/mnfy-34.0.0-py3-none-any.whl" } ] }