{ "info": { "author": "Trevor Joynson", "author_email": "github@skywww.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Plugins", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "License :: OSI Approved :: GNU General Public License (GPL)", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development", "Topic :: Software Development :: Libraries" ], "description": "pysanity\n========\n\nEmulates sanity for other people's dirty ass non-pep compliant code via only the /dirtiest/ of means.\n\nTested with Python 2.7, 3.5.\n\n|Test Status| |Coverage Status| |Documentation Status|\n\n- PyPi: https://pypi.python.org/pypi/pysanity\n\nAnd that means?\n---------------\n\nHi! I'm `pysanity` and I turn:\n\n.. code:: python\n\n import logging\n log = logging.getLogger(__name__)\n\nInto the much less brain numbing:\n\n.. code:: python\n\n from pysanity import logging\n log = logging.get_logger(__name__)\n\nAll the while keeping your precious code completion working as expected thanks to a not grossly over-dynamic nature.\n\nYou're welcome for my existence on PyPi.\n\nLogging you say?\n----------------\n\n*Hint:* Try this out and stop accepting needless boilerplate in your code, stdlib or not:\n\n.. code:: python\n\n import logging\n import logging.config\n import inspect\n\n\n def _namespace_from_calling_context():\n \"\"\"\n Derive a namespace from the module containing the caller's caller.\n\n :return str: the fully qualified python name of a module.\n \"\"\"\n return inspect.currentframe().f_back.f_back.f_globals['__name__']\n\n\n def get_logger(name=None):\n \"\"\"\n Gets a logger instance with sensible defaults according to caller context.\n\n :param str name: Logger name. Defaults to caller's `__name__`.\n :return logging.Logger: Logger instance\n \"\"\"\n if not name:\n name = _namespace_from_calling_context()\n\n return logging.getLogger(name)\n\n\nInstallation\n------------\n\n.. code:: sh\n\n pip install pysanity\n\n\nRunning tests\n-------------\n\nTox is used to handle testing multiple python versions.\n\n.. code:: sh\n\n tox\n\n\n.. |Test Status| image:: https://circleci.com/gh/akatrevorjay/pysanity.svg?style=svg\n :target: https://circleci.com/gh/akatrevorjay/pysanity\n.. |Coverage Status| image:: https://coveralls.io/repos/akatrevorjay/pysanity/badge.svg?branch=develop&service=github\n :target: https://coveralls.io/github/akatrevorjay/pysanity?branch=develop\n.. |Documentation Status| image:: https://readthedocs.org/projects/pysanity/badge/?version=latest\n :target: http://pysanity.readthedocs.org/en/latest/?badge=latest\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/akatrevorjay/pysanity", "keywords": "magic\nsanity\npep8\nlogging\ntwisted", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "pysanity", "package_url": "https://pypi.org/project/pysanity/", "platform": "", "project_url": "https://pypi.org/project/pysanity/", "project_urls": { "Homepage": "https://github.com/akatrevorjay/pysanity" }, "release_url": "https://pypi.org/project/pysanity/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "Emulates sanity for other people's dirty ass non-pep compliant code via only the /dirtiest/ of means.", "version": "0.0.1" }, "last_serial": 3021394, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "fe255fc049c5b3bdf94773a7f5e4192d", "sha256": "230750eb7d7320f6fea7760d02de22fe06f0e057b29f166fdc89cefc814df14e" }, "downloads": -1, "filename": "pysanity-0.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "fe255fc049c5b3bdf94773a7f5e4192d", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 7985, "upload_time": "2017-07-13T20:23:43", "url": "https://files.pythonhosted.org/packages/2b/57/5798de7fb3e005b2fa946c439e921f8cdf7c65e997be5d4b36c825a46562/pysanity-0.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "577200c89ab160381870169010f83242", "sha256": "e9b413b805c6f18d97514f7b4016f3e9a812a4c3a4dacd1161c76877ff397985" }, "downloads": -1, "filename": "pysanity-0.0.1.tar.gz", "has_sig": false, "md5_digest": "577200c89ab160381870169010f83242", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18264, "upload_time": "2017-07-13T20:23:41", "url": "https://files.pythonhosted.org/packages/63/69/07cce0e83ce5746a6e6613013fa781931c23f18af8dfebf20b80f2cad6c8/pysanity-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fe255fc049c5b3bdf94773a7f5e4192d", "sha256": "230750eb7d7320f6fea7760d02de22fe06f0e057b29f166fdc89cefc814df14e" }, "downloads": -1, "filename": "pysanity-0.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "fe255fc049c5b3bdf94773a7f5e4192d", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 7985, "upload_time": "2017-07-13T20:23:43", "url": "https://files.pythonhosted.org/packages/2b/57/5798de7fb3e005b2fa946c439e921f8cdf7c65e997be5d4b36c825a46562/pysanity-0.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "577200c89ab160381870169010f83242", "sha256": "e9b413b805c6f18d97514f7b4016f3e9a812a4c3a4dacd1161c76877ff397985" }, "downloads": -1, "filename": "pysanity-0.0.1.tar.gz", "has_sig": false, "md5_digest": "577200c89ab160381870169010f83242", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18264, "upload_time": "2017-07-13T20:23:41", "url": "https://files.pythonhosted.org/packages/63/69/07cce0e83ce5746a6e6613013fa781931c23f18af8dfebf20b80f2cad6c8/pysanity-0.0.1.tar.gz" } ] }