{ "info": { "author": "Pawel Polewicz", "author_email": "p.polewicz@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: Jython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Logging" ], "description": "========\nLogfury\n========\n\nLogfury is for python library maintainers. It allows for responsible, low-boilerplate logging of method calls.\n\n*****************\nLicense\n*****************\n\nBSD 3-clause\n\n*****************************\nwhats with the weird import\n*****************************\n\n.. sourcecode:: python\n\n from logfury.v0_1 import DefaultTraceMeta\n\nIf you were to use logfury in your library, any change to the API could potentially break your program. Nobody wants that.\n\nThanks to this import trick I can keep the 0.1.x API very stable. At the same time I can change the functionality of the library and change default behavior of version 0.2.x etc, without changing the name of the package. This way YOU decide when to adopt potentially incompatible API changes, by incrementing the API version on import.\n\n\n*****************\nInstallation\n*****************\n\n^^^^^^^^^^^^^^^^^^^^\nCurrent stable\n^^^^^^^^^^^^^^^^^^^^\n\n::\n\n pip install logfury\n\n^^^^^^^^^^^^^^^^^^^^\nDevelopment version\n^^^^^^^^^^^^^^^^^^^^\n\n::\n\n git clone git@github.com:ppolewicz/logfury.git\n python setup.py install\n\n\n*****************\nBasic usage\n*****************\n\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\nDefaultTraceMeta metaclass\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. sourcecode:: pycon\n\n >>> import logging\n >>> import six\n >>>\n >>> from logfury.v0_1 import DefaultTraceMeta, limit_trace_arguments, disable_trace\n >>>\n >>>\n >>> logging.basicConfig()\n >>> logger = logging.getLogger(__name__)\n >>> logger.setLevel(logging.DEBUG)\n >>>\n >>>\n >>> @six.add_metaclass(DefaultTraceMeta)\n >>> class Foo(object):\n ... def baz(self, a, b, c=None):\n ... return True\n ... def get_blah(self):\n ... return 5\n ... def _hello(self):\n ... pass\n ... @disable_trace\n ... def world(self):\n ... pass\n ... def __repr__(self):\n ... return '<%s object>' % (self.__class__.__name__,)\n ...\n >>> class Bar(Foo):\n ... def baz(self, a, b, c=None):\n ... b += 1\n ... return super(Bar, self).baz(a, b, c)\n ... def world(self):\n ... pass\n ... @limit_trace_arguments(skip=['password'])\n ... def secret(self, password, other):\n ... pass\n ... @limit_trace_arguments(only=['other'])\n ... def secret2(self, password, other):\n ... pass\n ...\n >>> a = Foo()\n >>> a.baz(1, 2, 3)\n DEBUG:__main__:calling Foo.baz(self=, a=1, b=2, c=3)\n >>> a.baz(4, b=8)\n DEBUG:__main__:calling Foo.baz(self=, a=4, b=8)\n >>> a.get_blah() # nothing happens, since v0_1.DefaultTraceMeta does not trace \"get_.*\"\n >>> a._hello() # nothing happens, since v0_1.DefaultTraceMeta does not trace \"_.*\"\n >>> a.world() # nothing happens, since v0_1.DefaultTraceMeta does not trace \"_.*\"\n >>> b = Bar()\n >>> b.baz(4, b=8) # tracing is inherited\n DEBUG:__main__:calling Bar.baz(self=, a=4, b=8)\n DEBUG:__main__:calling Foo.baz(self=, a=4, b=9, c=None)\n >>> b.world() # nothing happens, since Foo.world() tracing was disabled and Bar inherited it\n >>> b.secret('correct horse battery staple', 'Hello world!')\n DEBUG:__main__:calling Bar.secret(self=, other='Hello world!') (hidden args: password)\n >>> b.secret2('correct horse battery staple', 'Hello world!')\n DEBUG:__main__:calling Bar.secret2(other='Hello world!') (hidden args: self, password)\n\n\n^^^^^^^^^^^^^^^^^^^^\ntrace_call decorator\n^^^^^^^^^^^^^^^^^^^^\n\n.. sourcecode:: pycon\n\n >>> import logging\n >>> from logfury import *\n >>> logging.basicConfig()\n >>> logger = logging.getLogger(__name__)\n >>>\n >>> @trace_call(logger)\n ... def foo(a, b, c=None):\n ... return True\n ...\n >>> foo(1, 2, 3)\n True\n >>> logger.setLevel(logging.DEBUG)\n >>> foo(1, 2, 3)\n DEBUG:__main__:calling foo(a=1, b=2, c=3)\n True\n >>> foo(1, b=2)\n DEBUG:__main__:calling foo(a=1, b=2)\n True\n >>>", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/ppolewicz/logfury/tarball/0.1.2", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ppolewicz/logfury", "keywords": "logging,tracing", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "logfury", "package_url": "https://pypi.org/project/logfury/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/logfury/", "project_urls": { "Download": "https://github.com/ppolewicz/logfury/tarball/0.1.2", "Homepage": "https://github.com/ppolewicz/logfury" }, "release_url": "https://pypi.org/project/logfury/0.1.2/", "requires_dist": [ "six (>=1.10)", "funcsigs", "check-manifest; extra == 'test'", "pyflakes; extra == 'test'", "readme-renderer; extra == 'test'", "testfixtures; extra == 'test'", "yapf; extra == 'test'" ], "requires_python": "", "summary": "Toolkit for responsible, low-boilerplate logging of library method calls", "version": "0.1.2" }, "last_serial": 2430981, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "f189f6d0d2ea774382f3e566d4896eb2", "sha256": "e0ce7f95bab6e5b2fd835b3d8ff5e226704476671d15340a99b00285f4c2d1fc" }, "downloads": -1, "filename": "logfury-0.1.2-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "f189f6d0d2ea774382f3e566d4896eb2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12440, "upload_time": "2016-10-09T22:53:05", "url": "https://files.pythonhosted.org/packages/55/71/c70df1ef41721b554c91982ebde423a5cf594261aa5132e39ade9196fa3b/logfury-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b1bc3990bbb6c426e36bdb2d3da09e7d", "sha256": "42da58fbbd4e6fdb9e5b6b9098e94c249ba9cebfae125643329c8636768edcd3" }, "downloads": -1, "filename": "logfury-0.1.2.tar.gz", "has_sig": true, "md5_digest": "b1bc3990bbb6c426e36bdb2d3da09e7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17222, "upload_time": "2016-10-30T00:07:43", "url": "https://files.pythonhosted.org/packages/e2/a0/66a7b78e1800af85e54701490cf8764cc6de6c0725d18b10a6fb13ce4d2d/logfury-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f189f6d0d2ea774382f3e566d4896eb2", "sha256": "e0ce7f95bab6e5b2fd835b3d8ff5e226704476671d15340a99b00285f4c2d1fc" }, "downloads": -1, "filename": "logfury-0.1.2-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "f189f6d0d2ea774382f3e566d4896eb2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12440, "upload_time": "2016-10-09T22:53:05", "url": "https://files.pythonhosted.org/packages/55/71/c70df1ef41721b554c91982ebde423a5cf594261aa5132e39ade9196fa3b/logfury-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b1bc3990bbb6c426e36bdb2d3da09e7d", "sha256": "42da58fbbd4e6fdb9e5b6b9098e94c249ba9cebfae125643329c8636768edcd3" }, "downloads": -1, "filename": "logfury-0.1.2.tar.gz", "has_sig": true, "md5_digest": "b1bc3990bbb6c426e36bdb2d3da09e7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17222, "upload_time": "2016-10-30T00:07:43", "url": "https://files.pythonhosted.org/packages/e2/a0/66a7b78e1800af85e54701490cf8764cc6de6c0725d18b10a6fb13ce4d2d/logfury-0.1.2.tar.gz" } ] }