{ "info": { "author": "AJ Alt", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# FuckIt.py\n\n[![Build Status](https://img.shields.io/travis/ajalt/fuckitpy/master.svg)](https://travis-ci.org/ajalt/fuckitpy)\n[![PyPI version](https://img.shields.io/badge/pypi-4.8.1-brightgreen.svg)](https://pypi.python.org/pypi/fuckit/4.8.1)\n[![Coverage Status](https://img.shields.io/badge/coverage-110%25-brightgreen.svg)](https://coveralls.io/r/ajalt/fuckitpy?branch=master)\n[![Downloads](https://img.shields.io/badge/downloads-1.1M%2Fmonth-brightgreen.svg)](https://pypi.python.org/pypi/fuckit)\n\n### The Python Error Steamroller\nFuckIt.py uses state-of-the-art technology to make sure your Python code runs\nwhether it has any right to or not. Some code has an error? Fuck it.\n\n## Technology\nFuckIt.py uses a combination of dynamic compilation, Abstract Syntax Tree rewriting, live call stack modification, and love to get rid of all those pesky errors that make programming _so hard_.\n\n## API\nAll functionality is provided through the fuckit module. Add `import fuckit` to the top of your script, then use fuckit in any of the following ways:\n\n### As a replacement for import\nUse fuckit to replace an import when a module has errors.\nJust change `import some_shitty_module` to `fuckit('some_shitty_module')`. Note that you have to surround the module name with quotes and parentheses.\n\n```python\nimport fuckit\n#import some_shitty_module\nfuckit('some_shitty_module')\nsome_shitty_module.some_function()\n```\n\nStill getting errors? Chain fuckit calls. This module is like violence: if it doesn't work, you just need more of it.\n\n```python\nimport fuckit\nfuckit(fuckit('some_shitty_module'))\n# This is definitely going to run now.\nsome_shitty_module.some_function()\n```\n\n### As a decorator\nUse fuckit as a function decorator when a single function is giving you trouble. Exceptions will be silenced, and in most cases the function will continue to run, skipping the statements that cause errors.\n\n```python\n@fuckit\ndef func():\n problem_solved\n```\n\nYou can use fuckit as a class decorator, too.\n\n```python\n@fuckit\nclass C(object):\n def __init__(self):\n everything_works_now\n```\n\nKeep in mind that the decorator form of fuckit can't stop syntax errors. For those, you have to use the import form.\n\n### As a context manager\nUse fuckit as a context manager to save yourself from having to type out try/except block to silence exceptions yourself.\n\n```python\nwith fuckit:\n some_code\n```\n\nThis is functionally equivalent to the following:\n\n```python\ntry:\n some_code\nexcept Exception:\n pass\n```\n\nThe context manager form of fuckit can't allow the code to continue past an error like the decorator and import forms can. If you want the code to continue after an exception, wrap the code block in a function and use the decorator instead.\n\n\n\n## License\n DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n Version 2, December 2004\n\n\tCopyright (C) 2014-2018 AJ Alt\n\n\tEveryone is permitted to copy and distribute verbatim or modified\n\tcopies of this license document, and changing it is allowed as long\n\tas the name is changed.\n\n DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n \t0. You just DO WHAT THE FUCK YOU WANT TO.\n\n## Attribution\n\nThis module is inspired by Matt Diamond's [FuckIt.js](https://github.com/mattdiamond/fuckitjs).", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ajalt/fuckitpy", "keywords": "", "license": "WTFPL", "maintainer": "", "maintainer_email": "", "name": "fuckit", "package_url": "https://pypi.org/project/fuckit/", "platform": "any", "project_url": "https://pypi.org/project/fuckit/", "project_urls": { "Homepage": "https://github.com/ajalt/fuckitpy" }, "release_url": "https://pypi.org/project/fuckit/4.8.1/", "requires_dist": null, "requires_python": "", "summary": "The Python Error Steamroller", "version": "4.8.1" }, "last_serial": 3610777, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "8b02f4e47bc6d08dbef245af1a1fae32", "sha256": "d406759424bd6ac0eb9f23ce8ed9fbf026f562d76717d8786c1cf1ccd4d8a9c0" }, "downloads": -1, "filename": "fuckit-1.0.0.zip", "has_sig": false, "md5_digest": "8b02f4e47bc6d08dbef245af1a1fae32", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7377, "upload_time": "2013-08-17T21:46:54", "url": "https://files.pythonhosted.org/packages/d4/10/0036c7100f5b8e2a55a8cc610592b336529efeb594075e7808e836996e07/fuckit-1.0.0.zip" }, { "comment_text": "", "digests": { "md5": "b04eb97a5c1699d8c0ba5281c60e572b", "sha256": "601be6b38b7fd9300b9954c036d25c6bc8c45dd8e11d47fbc027ebd6a35129f5" }, "downloads": -1, "filename": "fuckit-1.0.1.zip", "has_sig": false, "md5_digest": "b04eb97a5c1699d8c0ba5281c60e572b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9404, "upload_time": "2013-12-07T13:07:59", "url": "https://files.pythonhosted.org/packages/08/a2/1fe1030ddfb8fda16a82c7977bfb497eb2b634d2091b1d243a3b16e722c0/fuckit-1.0.1.zip" } ], "4.8.0": [ { "comment_text": "", "digests": { "md5": "56a206c963d857bb1b97fef55acc2759", "sha256": "b15abb70c49cfdcc70216f1f9e373596cb807c3fbd8c91e2cfa101268c4a8ecb" }, "downloads": -1, "filename": "fuckit-4.8.0.zip", "has_sig": false, "md5_digest": "56a206c963d857bb1b97fef55acc2759", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9626, "upload_time": "2014-05-13T14:01:11", "url": "https://files.pythonhosted.org/packages/cf/cc/e89430ec3c754615db0c12141a01688cb6afa61061c0c821eb361ae8f16d/fuckit-4.8.0.zip" } ], "4.8.1": [ { "comment_text": "", "digests": { "md5": "ce5cfbee0652447b5c7f46afa938395a", "sha256": "059488e6aa2053da9db5eb5101e2498f608314da5118bf2385acb864568ccc25" }, "downloads": -1, "filename": "fuckit-4.8.1.zip", "has_sig": false, "md5_digest": "ce5cfbee0652447b5c7f46afa938395a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9773, "upload_time": "2018-02-23T23:17:02", "url": "https://files.pythonhosted.org/packages/cc/f4/0952081f9e52866f4a520e2d92d27ddf34f278d37204104e4be869c6911d/fuckit-4.8.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ce5cfbee0652447b5c7f46afa938395a", "sha256": "059488e6aa2053da9db5eb5101e2498f608314da5118bf2385acb864568ccc25" }, "downloads": -1, "filename": "fuckit-4.8.1.zip", "has_sig": false, "md5_digest": "ce5cfbee0652447b5c7f46afa938395a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9773, "upload_time": "2018-02-23T23:17:02", "url": "https://files.pythonhosted.org/packages/cc/f4/0952081f9e52866f4a520e2d92d27ddf34f278d37204104e4be869c6911d/fuckit-4.8.1.zip" } ] }