{ "info": { "author": "The Atlantic", "author_email": "programmers@theatlantic.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "About\n-----\n\npython-monkey-business is a package that provides a decorator for\nmonkey-patching python functions at runtime.\n\nInstallation\n------------\n\nUsing pip::\n\n pip install python-monkey-business\n\nOr, to install from source::\n\n pip install -e git+https://github.com/theatlantic/python-monkey-business.git#egg=python-monkey-business\n\nIf the source is already checked out, use setuptools::\n\n python setup.py develop\n\nUsage\n-----\n\nTo use python-monkey-business to swap out a function in a class or module at runtime:\n\n.. code-block:: python\n\n import monkeybiz\n\n from foomodule import FooClass\n import barmodule\n\n\n # This replaces FooClass.bar with our method\n @monkeybiz.patch(FooClass)\n def bar(original_fn, *args, **kwargs):\n print \"Patched!\"\n return original_fn(*args, **kwargs)\n\n # This replaces barmodule.baz with our function\n @monkeybiz.patch(barmodule)\n def baz(original_fn, *args, **kwargs):\n #...\n\nThe first argument to ``monkeybiz.patch`` can be either a module, a class,\nor a list of modules and/or classes. The decorator also takes optional\n``name`` and ``avoid_doublewrap`` keyword arguments. If ``name`` is omitted,\nthe name of the function being patched will be the name of the function being\ndecorated. If ``avoid_doublewrap`` is True (the default), then functions and\nmethods can only be patched once using this function.\n\nUse ``monkeybiz.unpatch()`` to revert a monkey-patched function to its original.\n\nLicense\n-------\n\nThis code is licensed under the `Simplified BSD\nLicense `_. View the\n``LICENSE`` file under the root directory for complete license and\ncopyright information.", "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/theatlantic/python-monkey-business", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "python-monkey-business", "package_url": "https://pypi.org/project/python-monkey-business/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/python-monkey-business/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/theatlantic/python-monkey-business" }, "release_url": "https://pypi.org/project/python-monkey-business/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "Utility functions for monkey-patching python code", "version": "1.0.0" }, "last_serial": 5688538, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "eae4bc58ec27b53550f66a6afdbe40fa", "sha256": "6d4cf47f011945db838ccf04643acd49b82f7ad6ab7ecba4c8165385687a828a" }, "downloads": -1, "filename": "python_monkey_business-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "eae4bc58ec27b53550f66a6afdbe40fa", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5514, "upload_time": "2016-03-22T00:10:38", "url": "https://files.pythonhosted.org/packages/31/21/ebee71d10599a02b3f85716428d33bd51a48253a99b923bcb8bf3f874233/python_monkey_business-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7489fd3df813ed7a1fc70c142b2a3715", "sha256": "9976522989766f00b2aaa24ec96eacb91a6de7b7001d1452079323b071988e0e" }, "downloads": -1, "filename": "python-monkey-business-1.0.0.tar.gz", "has_sig": false, "md5_digest": "7489fd3df813ed7a1fc70c142b2a3715", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3982, "upload_time": "2016-03-22T00:10:03", "url": "https://files.pythonhosted.org/packages/6e/9b/50f42469190ef986850a6078c591640cadac1341883eeee8d847d04e1382/python-monkey-business-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "eae4bc58ec27b53550f66a6afdbe40fa", "sha256": "6d4cf47f011945db838ccf04643acd49b82f7ad6ab7ecba4c8165385687a828a" }, "downloads": -1, "filename": "python_monkey_business-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "eae4bc58ec27b53550f66a6afdbe40fa", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5514, "upload_time": "2016-03-22T00:10:38", "url": "https://files.pythonhosted.org/packages/31/21/ebee71d10599a02b3f85716428d33bd51a48253a99b923bcb8bf3f874233/python_monkey_business-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7489fd3df813ed7a1fc70c142b2a3715", "sha256": "9976522989766f00b2aaa24ec96eacb91a6de7b7001d1452079323b071988e0e" }, "downloads": -1, "filename": "python-monkey-business-1.0.0.tar.gz", "has_sig": false, "md5_digest": "7489fd3df813ed7a1fc70c142b2a3715", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3982, "upload_time": "2016-03-22T00:10:03", "url": "https://files.pythonhosted.org/packages/6e/9b/50f42469190ef986850a6078c591640cadac1341883eeee8d847d04e1382/python-monkey-business-1.0.0.tar.gz" } ] }