{ "info": { "author": "Jeff Weiss", "author_email": "jweiss@redhat.com", "bugtrack_url": null, "classifiers": [], "description": "================\n Function_trace\n================\n\nFunction_trace is a simple debugging library, inspired by similar libs\nin Common Lisp and Clojure. It captures function call arguments and\nreturn values, and prints them in a nested fashion so you can easily\nsee which function is being called by which other function, what\narguments it was called with, and what its return value was.\n\n\nUsage\n=====\n\nTrace blocks of code with the ``trace_on`` context manager. It\naccepts either a list of functions to be traced, or a custom\ntracer object. When a class is traced, that includes all the methods\ndefined in that class, but not inherited methods. When a module is\ntraced, that includes all the functions in that module, but does not\ninclude any class methods defined in that module (you must specify the\nclass separately).\n\nBy default, the trace output is printed to stdout. You can modify\nthis behavior by replacing ``function_trace.tracer`` with a function\nthat does whatever you like with the trace. The tracer function\nshould have the signature ``(f, *args, **kwargs)`` which is the\nfunction to trace, and the arguments to call the function with. It\nshould call the function with the args at some point. Note it is\npreferable to catch any exceptions thrown by f, log them and re-raise\nthe exception.\n\n\nOptions\n-------\n* ``tracer`` lets you specify a custom tracer object. The simplest\n way to create it is to extend the ``Tracer`` class and override the\n ``trace_in`` and ``trace_out`` methods. With a customm tracer you\n can do things like write the trace in any format, like HTML, JSON,\n XML etc, or send it over the network. The common options to the\n builtin Tracer classes are:\n\n * ``include_hidden`` if set to True, also trace functions whose\n name starts with ``_``. Note, the ``__repr__`` function will\n never be traced, and currently any tracing of functions starting\n with ``__`` are disabled.\n * ``depths`` a dict where the keys are functions/methods and the\n values are integers representing the depth to which you want to\n trace that function/method. For example a depth of 0 means \"do\n not trace this function at all\", even if it calls functions that\n are being traced. A depth of 1 will trace this function but skip\n all tracing until it returns. A depth of 2 will trace another\n level deeper. Note, the depths represent the depth of the trace\n output, NOT the python call stack.\n\nExamples\n========\n\n::\n\n from function_trace import trace_on, StdoutTracer, all, mapcat\n\n with trace_on(StdoutTracer(mapcat(all, [Class1, module1, Class2, module2]), include_hidden=True,\n depths={module1.check_thing: 1,\n module2.unimportant_thing: 0\n Class1.silly_thing: 0})):\n module1.function1(\"arg1\", \"arg2\", option=True)\n x = new Class1()\n x.method1(arg1, arg2)\n\n\nOutput\n------\n\n::\n\n - module1.function1(\"arg1\", \"arg2\", option=True)\n | - module1.function2(\"arg2\")\n | | - module1.check_thing()\n | | -> True\n | -> \"myresult\"\n -> \"myresult\"\n - Class1.x(, \"arg1val\", \"arg2val\")\n | - module2.function1(\"arg2val\")\n | -> \"foo\"\n | - Class2.y(, \"arg1val\")\n | -> BadInputException(\"You can't call y with 'arg1val'!\")\n -> BadInputException(\"You can't call y with 'arg1val'!\")\n\n* Methods will show the first argument ``self``. By default,\n arguments and return values are printed using ``repr``, so if you\n want to see something more informative than ````, you can define ``__repr__`` on ``Class1`` to print\n whatever you like (probably the values of various fields of that\n object).\n\n* By default, exceptions that are raised by a function are printed as\n its return value, prefixed with ``!!!``. This makes it possible to\n see an exception propagating down the stack.", "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/RedHatQE/function_trace", "keywords": "trace debugging", "license": "PSF", "maintainer": null, "maintainer_email": null, "name": "function_trace", "package_url": "https://pypi.org/project/function_trace/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/function_trace/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/RedHatQE/function_trace" }, "release_url": "https://pypi.org/project/function_trace/1.1.4/", "requires_dist": null, "requires_python": null, "summary": "Hierarchical trace of function/method call arguments and return values", "version": "1.1.4" }, "last_serial": 1186591, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "5d4ca5ffbb0a57bd3c89df0675a8791c", "sha256": "d7b303ece700e9690e7f582e0d37b97914eaf6c0f63904cc2e7751c8fb9b8082" }, "downloads": -1, "filename": "function_trace-0.1.tar.gz", "has_sig": false, "md5_digest": "5d4ca5ffbb0a57bd3c89df0675a8791c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1950, "upload_time": "2014-03-31T14:39:05", "url": "https://files.pythonhosted.org/packages/af/24/24cb78398fa1df690c52086e59edb48593f8c16aedf4e79701d87b132585/function_trace-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "436dac5400f5d0eaa5424997041e2330", "sha256": "8ffdbee33803a4bdbb6023d230b9698e0a949caf783967429e087ab671df9be5" }, "downloads": -1, "filename": "function_trace-0.2.tar.gz", "has_sig": false, "md5_digest": "436dac5400f5d0eaa5424997041e2330", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1997, "upload_time": "2014-04-04T20:26:58", "url": "https://files.pythonhosted.org/packages/2c/c9/9ff527e74b616b8b9b4c1549447795f21cf8e98fb02a84f05a86855f4baa/function_trace-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "f1e7f897ebf106b9ad76b19363e31c8c", "sha256": "4befec5367a7e525591b7bc672af027a170edb134b3004a142fc06e03580ba8a" }, "downloads": -1, "filename": "function_trace-0.2.1.tar.gz", "has_sig": false, "md5_digest": "f1e7f897ebf106b9ad76b19363e31c8c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3152, "upload_time": "2014-04-07T15:01:43", "url": "https://files.pythonhosted.org/packages/99/98/c3fdf92077d5ccb9dd5290f25b171a15af2eae559a1463fab4bc7b6a2c2b/function_trace-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "a5089a0af221c1cea322f91071f48ad0", "sha256": "383040f6b5bb13bf9b6b5925c1bf94c9d0036ffaf0f3aee1f5e2ce1dc7b7fd2b" }, "downloads": -1, "filename": "function_trace-0.2.2.tar.gz", "has_sig": false, "md5_digest": "a5089a0af221c1cea322f91071f48ad0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3449, "upload_time": "2014-04-07T15:14:08", "url": "https://files.pythonhosted.org/packages/0f/44/dc534871dc42c93faaf9c7e1eab73afe773de7ec39de77d2bfb4fb06137f/function_trace-0.2.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "6926dffe5936e3d0f40ecf7712354676", "sha256": "e85538337c6046a528f46efb5facf27dda5ef3bcaeff1e18b9907db4017bdbec" }, "downloads": -1, "filename": "function_trace-0.3.tar.gz", "has_sig": false, "md5_digest": "6926dffe5936e3d0f40ecf7712354676", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3933, "upload_time": "2014-06-10T18:18:06", "url": "https://files.pythonhosted.org/packages/1d/03/9f547525fc74eee872c6b1538c302a130fb96e4e9269efefaf548fa41ca3/function_trace-0.3.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "0d9cbf371888ff7352a6e53a9625fbc6", "sha256": "ff92113dec8ac2ad0dc9a57317c6e8f5e74c369af7d93c3563e2ffd211fe747c" }, "downloads": -1, "filename": "function_trace-1.0.tar.gz", "has_sig": false, "md5_digest": "0d9cbf371888ff7352a6e53a9625fbc6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5280, "upload_time": "2014-07-01T19:28:04", "url": "https://files.pythonhosted.org/packages/1c/75/a39b7df690ff93b88e17c50572b0d8afd9651a35afe5ae5cbbbf042cb0d1/function_trace-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "231315d9b5a0d815a55d19d42a8e7223", "sha256": "570361d2efcc13b1c3638615753b009e1277291b1d15b2399bfb71b5000d80d8" }, "downloads": -1, "filename": "function_trace-1.0.1.tar.gz", "has_sig": false, "md5_digest": "231315d9b5a0d815a55d19d42a8e7223", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5274, "upload_time": "2014-07-02T01:25:02", "url": "https://files.pythonhosted.org/packages/49/6e/5f6ac4f4f753d3e3396da4b71ba8280f5ee8b0776811de5b5c66dfad1e10/function_trace-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "463e2ddd20817aef9837689f5c828b28", "sha256": "335844fe71de70b05086e2e69be3781f897706ebb8f494615c66fa322b8e0087" }, "downloads": -1, "filename": "function_trace-1.0.2.tar.gz", "has_sig": false, "md5_digest": "463e2ddd20817aef9837689f5c828b28", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5281, "upload_time": "2014-07-08T12:56:24", "url": "https://files.pythonhosted.org/packages/7b/87/422bf964ccdd4034e208a7dde4804b87f0844480fe9387d2b627fed49b86/function_trace-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "75225e006e4eb21949083dcb4a7d3c80", "sha256": "7b9688259652d9dc23a34c5ac28afd1c503906bc1ef444f5c08f1c74c9251e9f" }, "downloads": -1, "filename": "function_trace-1.0.3.tar.gz", "has_sig": false, "md5_digest": "75225e006e4eb21949083dcb4a7d3c80", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5289, "upload_time": "2014-07-10T12:40:38", "url": "https://files.pythonhosted.org/packages/77/f8/68c07fc3196ebc8d71a31a92aa867fd3225c5b5185187825ff1474092c83/function_trace-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "5d0699ce2b0e78f9a14556c86735e74f", "sha256": "361bf7889090bfe263f63f62c23befec813fd8666059c98761040b373a89dc60" }, "downloads": -1, "filename": "function_trace-1.0.4.tar.gz", "has_sig": false, "md5_digest": "5d0699ce2b0e78f9a14556c86735e74f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5294, "upload_time": "2014-07-10T18:09:02", "url": "https://files.pythonhosted.org/packages/ad/ed/ea72a8b5efbbea99bf2022edad3cf7204c428300f61669b1368aa00329a3/function_trace-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "cf015e798298544887d693c8c57ed9b6", "sha256": "d5d5fced9c17174e4f16ac457525d0122b4c08fe0c84151fdf12b1c48503e589" }, "downloads": -1, "filename": "function_trace-1.0.5.tar.gz", "has_sig": false, "md5_digest": "cf015e798298544887d693c8c57ed9b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5346, "upload_time": "2014-07-10T18:10:14", "url": "https://files.pythonhosted.org/packages/a5/42/71f2c3dae1cc92ba178322466cd369a58bc08025582c35cb650822b5a3f3/function_trace-1.0.5.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "cbfbb2a03b1f39029bbc21e803fbee99", "sha256": "e507f8d17b8316d46d27f13ea92537299cd13830bde5729e90827d1da7ba6d67" }, "downloads": -1, "filename": "function_trace-1.1.0.tar.gz", "has_sig": false, "md5_digest": "cbfbb2a03b1f39029bbc21e803fbee99", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7773, "upload_time": "2014-07-19T15:24:25", "url": "https://files.pythonhosted.org/packages/d8/ca/0ba7e510e8d4a2ad80f4fd9c030b79b53beada38c12977fa1d66ce9e1fcf/function_trace-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "617c44c81c573f5b17948547fa0d4e31", "sha256": "387e5de0e5577b548032b046af23c55ae75d3e7c1030978db4e8a2c38f2063b7" }, "downloads": -1, "filename": "function_trace-1.1.1.tar.gz", "has_sig": false, "md5_digest": "617c44c81c573f5b17948547fa0d4e31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7781, "upload_time": "2014-07-22T20:45:42", "url": "https://files.pythonhosted.org/packages/07/8e/bebe8cd665d004a24afe32a17b46a53c139830a03b36b2261785e03c2eb0/function_trace-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "7ac7f92ae4c335df365dcc6101773bd4", "sha256": "15e9fae94215ab67b371bafd51c981d39407085b4da125238b37a3aed57c462f" }, "downloads": -1, "filename": "function_trace-1.1.2.tar.gz", "has_sig": false, "md5_digest": "7ac7f92ae4c335df365dcc6101773bd4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7868, "upload_time": "2014-07-24T15:25:12", "url": "https://files.pythonhosted.org/packages/b9/20/5dc05cc91b147bffaab85da533d04ec6868fefa4fc2de2c71942680e1d64/function_trace-1.1.2.tar.gz" } ], "1.1.3": [ { "comment_text": "", "digests": { "md5": "2a7c60bc696f824cef6c2a089298d88f", "sha256": "33040c38deb38842f8035f2b2c238bcb17997a2ce6b28c5cdbe339512b7494b6" }, "downloads": -1, "filename": "function_trace-1.1.3.tar.gz", "has_sig": false, "md5_digest": "2a7c60bc696f824cef6c2a089298d88f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7891, "upload_time": "2014-08-04T20:06:17", "url": "https://files.pythonhosted.org/packages/04/82/c35e4540d79ed785d8c88cc731014d363a16903705915ec8a378c7fdb02b/function_trace-1.1.3.tar.gz" } ], "1.1.4": [ { "comment_text": "", "digests": { "md5": "e9fe4332df47dd9687b92aa61954b9d2", "sha256": "2d769a430132b9d292d5373dfd9111ec2b6906f680d5b8eba1df72d641c85496" }, "downloads": -1, "filename": "function_trace-1.1.4.tar.gz", "has_sig": false, "md5_digest": "e9fe4332df47dd9687b92aa61954b9d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8345, "upload_time": "2014-08-11T15:24:37", "url": "https://files.pythonhosted.org/packages/ae/a1/f8be7fb393a17f5a002ec2eb16ab0c93c258c8452ddfc3c30e70b1593e48/function_trace-1.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e9fe4332df47dd9687b92aa61954b9d2", "sha256": "2d769a430132b9d292d5373dfd9111ec2b6906f680d5b8eba1df72d641c85496" }, "downloads": -1, "filename": "function_trace-1.1.4.tar.gz", "has_sig": false, "md5_digest": "e9fe4332df47dd9687b92aa61954b9d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8345, "upload_time": "2014-08-11T15:24:37", "url": "https://files.pythonhosted.org/packages/ae/a1/f8be7fb393a17f5a002ec2eb16ab0c93c258c8452ddfc3c30e70b1593e48/function_trace-1.1.4.tar.gz" } ] }